initial commit

This commit is contained in:
Song Gao 2013-03-25 14:49:39 -05:00
parent a9977e0a62
commit 4a028c3fe3
7 changed files with 377 additions and 0 deletions

9
waterutil/tun.go Normal file
View file

@ -0,0 +1,9 @@
package waterutil
func IsIPv4(packet []byte) bool {
return 4 == (packet[0] >> 4)
}
func IsIPv6(packet []byte) bool {
return 6 == (packet[0] >> 4)
}