Move function to utilities source file.
This commit is contained in:
parent
d2fa2a2202
commit
88f8e88805
2 changed files with 10 additions and 0 deletions
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
|
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…
Add table
Reference in a new issue