Move function to utilities source file.
This commit is contained in:
parent
d2fa2a2202
commit
88f8e88805
BIN
.listener.go.kate-swp
Normal file
BIN
.listener.go.kate-swp
Normal file
Binary file not shown.
10
utils.go
10
utils.go
@ -18,3 +18,13 @@ func generateRandomMAC() net.HardwareAddr {
|
||||
|
||||
return mac
|
||||
}
|
||||
|
||||
// Check if IP address is all zero.
|
||||
func isZeroAddr(ip net.IP) bool {
|
||||
for _, b := range ip {
|
||||
if b != 0x0 {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user