mirror of
https://github.com/yggdrasil-network/water.git
synced 2025-05-19 16:35:10 +03:00
initial commit
This commit is contained in:
parent
a9977e0a62
commit
4a028c3fe3
7 changed files with 377 additions and 0 deletions
9
waterutil/tun.go
Normal file
9
waterutil/tun.go
Normal 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)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue