mirror of
https://github.com/fumiama/water.git
synced 2026-06-08 04:00:26 +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)
|
|
}
|