mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-20 21:33:57 -07:00
All that cgo crap compiles!
This commit is contained in:
parent
3341c4a670
commit
ccc9be2d4d
3 changed files with 107 additions and 39 deletions
|
@ -18,3 +18,15 @@ type MulticastGroup struct {
|
|||
MAC MAC
|
||||
ADI uint32
|
||||
}
|
||||
|
||||
// Less returns true if this MulticastGroup is less than another.
|
||||
func (mg *MulticastGroup) Less(mg2 *MulticastGroup) bool {
|
||||
return (mg.MAC < mg2.MAC || (mg.MAC == mg2.MAC && mg.ADI < mg2.ADI))
|
||||
}
|
||||
|
||||
// key returns an array usable as a key for a map[]
|
||||
func (mg *MulticastGroup) key() (k [2]uint64) {
|
||||
k[0] = uint64(mg.MAC)
|
||||
k[1] = uint64(mg.ADI)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue