Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BehaviorOptions ¶
type BehaviorOptions struct {
SourceAddress *string `yaml:"set-source-address,omitempty"` // mandatory for End.M.GTP6.(E|D)
}
type Bsid ¶
type Bsid struct {
BsidPrefix *string `yaml:"bsid-prefix,omitempty"`
SegmentsList []string `yaml:"segments-list"`
}
func (*Bsid) ReverseSegmentsList ¶
func (*Bsid) ToIPRoute2 ¶
type Control ¶ added in v0.0.22
type Control struct {
Uri jsonapi.ControlURI `yaml:"uri"` // may contain domain name instead of ip address
BindAddr netip.AddrPort `yaml:"bind-addr"` // in the form `ip:port`
}
type Endpoint ¶
type Endpoint struct {
Provider Provider `yaml:"provider"` // Linux, NextMN, …
Prefix string `yaml:"prefix"` // Prefix = LOC+FUNC example of prefix: fd00:51D5:0000:1:1:11/80
Behavior iana.EndpointBehavior `yaml:"behavior"` // example of behavior: End.DX4
Options *BehaviorOptions `yaml:"options,omitempty"`
}
type Headend ¶
type Headend struct {
Name string `yaml:"name"`
To string `yaml:"to"` // IP Prefix this Headend will handle (can be the same as GTP4HeadendPrefix if you have a single Headend)
Provider Provider `yaml:"provider"`
Behavior HeadendBehavior `yaml:"behavior"`
Policy *[]Policy `yaml:"policy,omitempty"`
SourceAddressPrefix *string `yaml:"source-address-prefix"`
MTU *string `yaml:"mtu,omitempty"` // suggested value is 1400 (same as UERANSIM) if the path includes a End.M.GTP4.E
}
type HeadendBehavior ¶
type HeadendBehavior uint32
const ( H_Encaps HeadendBehavior = iota // encapsulate the packet into a new IPv6 Header with a SRH H_Inline // add a SRH to an existing IPv6 Header H_M_GTP4_D // RFC 9433, section 6.7 )
func (HeadendBehavior) String ¶
func (hb HeadendBehavior) String() string
func (*HeadendBehavior) UnmarshalYAML ¶
func (p *HeadendBehavior) UnmarshalYAML(n *yaml.Node) error
Unmarshal YAML to HeadendBehavior
type Headends ¶
type Headends []*Headend
func (Headends) FilterWithBehavior ¶
func (he Headends) FilterWithBehavior(provider Provider, behavior HeadendBehavior) Headends
func (Headends) FilterWithoutBehavior ¶ added in v0.0.12
func (he Headends) FilterWithoutBehavior(provider Provider, behavior HeadendBehavior) Headends
type Hooks ¶
type Hooks struct {
PreInitHook *string `yaml:"pre-init-hook,omitempty"` // script to execute before interfaces are configured
PostInitHook *string `yaml:"post-init-hook,omitempty"` // script to execute after interfaces are configured
PreExitHook *string `yaml:"pre-exit-hook,omitempty"` // script to execute before interfaces are configured
PostExitHook *string `yaml:"post-exit-hook,omitempty"` // script to execute after interfaces are configured
}
type SRv6Config ¶
type SRv6Config struct {
Hooks *Hooks `yaml:"hooks"`
// interface with controller
Control Control `yaml:"control"`
ControllerURI jsonapi.ControlURI `yaml:"controller-uri"` // example: http://192.0.2.2:8080
// Backbone IPv6 address
BackboneIP n4tosrv6.BackboneIP `yaml:"backbone-ip"`
// headends
LinuxHeadendSetSourceAddress *netip.Addr `yaml:"linux-headend-set-source-address,omitempty"`
GTP4HeadendPrefix *netip.Prefix `yaml:"gtp4-headend-prefix,omitempty"` // example of prefix: 10.0.0.1/32 (if you use a single GTP4 headend) or 10.0.1.0/24 (with more headends)
IPV4HeadendPrefix *netip.Prefix `yaml:"ipv4-headend-prefix,omitempty"` // example of prefix: 10.0.0.1/32 (if you use a single IPV4 headend) or 10.0.1.0/24 (with more headends)
Headends Headends `yaml:"headends"`
// endpoints
Locator *n4tosrv6.Locator `yaml:"locator,omitempty"` // example of locator: fd00:51D5:0000:1::/64
Endpoints Endpoints `yaml:"endpoints"`
Logger *Logger `yaml:"logger,omitempty"`
}
func ParseConf ¶
func ParseConf(file string) (*SRv6Config, error)
Click to show internal directories.
Click to hide internal directories.