water/waterutil/tun.go
2013-03-25 14:49:39 -05:00

9 lines
152 B
Go

package waterutil
func IsIPv4(packet []byte) bool {
return 4 == (packet[0] >> 4)
}
func IsIPv6(packet []byte) bool {
return 6 == (packet[0] >> 4)
}