Documentation
¶
Overview ¶
Copyright 2023 Louis Royer and the NextMN-SRv6 contributors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. SPDX-License-Identifier: MIT
Copyright 2023 Louis Royer and the NextMN-SRv6 contributors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. SPDX-License-Identifier: MIT
Copyright 2023 Louis Royer and the NextMN-SRv6 contributors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. SPDX-License-Identifier: MIT
Copyright 2023 Louis Royer and the NextMN-SRv6 contributors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. SPDX-License-Identifier: MIT
Copyright 2023 Louis Royer and the NextMN-SRv6 contributors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. SPDX-License-Identifier: MIT
Copyright 2023 Louis Royer and the NextMN-SRv6 contributors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. SPDX-License-Identifier: MIT
Copyright 2023 Louis Royer and the NextMN-SRv6 contributors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. SPDX-License-Identifier: MIT
Copyright 2024 Louis Royer and the NextMN-SRv6 contributors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. SPDX-License-Identifier: MIT
Copyright 2023 Louis Royer and the NextMN-SRv6 contributors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. SPDX-License-Identifier: MIT
Copyright 2023 Louis Royer and the NextMN-SRv6 contributors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. SPDX-License-Identifier: MIT
Copyright 2023 Louis Royer and the NextMN-SRv6 contributors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. SPDX-License-Identifier: MIT
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 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 HTTPAddress netip.Addr `yaml:"http-address"` HTTPPort *string `yaml:"http-port,omitempty"` // default: 80 // TODO: use a better type for this information ControllerURI string `yaml:"controller-uri"` // example: http://192.0.2.2/8080 // Backbone IPv6 address // TODO: use a better type for this information BackboneIP netip.Addr `yaml:"backbone-ip"` // headends LinuxHeadendSetSourceAddress *string `yaml:"linux-headend-set-source-address,omitempty"` GTP4HeadendPrefix *string `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 *string `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 *string `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)