1
0
mirror of https://github.com/fumiama/water.git synced 2026-06-07 11:10:28 +08:00
Files
water/waterutil/tun.go
2013-03-25 14:49:39 -05:00

10 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)
}