mirror of
https://github.com/fumiama/water
synced 2026-04-22 23:17:20 +08:00
10 lines
152 B
Go
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)
|
|
}
|