mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-29 06:35:07 +03:00
Revise multicast format to include protocol version, discriminator for TLS roots
This commit is contained in:
parent
002b984c04
commit
57d9a2399f
5 changed files with 112 additions and 11 deletions
|
@ -8,6 +8,10 @@ func (m *Multicast) _applyOption(opt SetupOption) {
|
|||
m.config._interfaces[v] = struct{}{}
|
||||
case GroupAddress:
|
||||
m.config._groupAddr = v
|
||||
case Discriminator:
|
||||
m.config._discriminator = append(m.config._discriminator[:0], v...)
|
||||
case DiscriminatorMatch:
|
||||
m.config._discriminatorMatch = v
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,6 +28,10 @@ type MulticastInterface struct {
|
|||
}
|
||||
|
||||
type GroupAddress string
|
||||
type Discriminator []byte
|
||||
type DiscriminatorMatch func([]byte) bool
|
||||
|
||||
func (a MulticastInterface) isSetupOption() {}
|
||||
func (a GroupAddress) isSetupOption() {}
|
||||
func (a Discriminator) isSetupOption() {}
|
||||
func (a DiscriminatorMatch) isSetupOption() {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue