Documentation
¶
Index ¶
- func IPSrSetSourceAddress(ctx context.Context, address netip.Addr) error
- type DummyIface
- type Table
- func (t Table) AddDefaultRoutesBlackhole(ctx context.Context) error
- func (t Table) AddRoute(ctx context.Context, args ...string) error
- func (t Table) AddRoute4(ctx context.Context, args ...string) error
- func (t Table) AddRoute4Tun(ctx context.Context, prefix string, dev string) error
- func (t Table) AddRoute6(ctx context.Context, args ...string) error
- func (t Table) AddRoute6Tun(ctx context.Context, prefix string, dev string) error
- func (t Table) AddRule4(ctx context.Context, to string) error
- func (t Table) AddRule6(ctx context.Context, to string) error
- func (t Table) AddSeg6Encap(ctx context.Context, prefix string, segmentsList string, dev string) error
- func (t Table) AddSeg6EncapWithMTU(ctx context.Context, prefix string, segmentsList string, dev string, ...) error
- func (t Table) AddSeg6Inline(ctx context.Context, prefix string, segmentsList string, dev string) error
- func (t Table) AddSeg6Local(ctx context.Context, sid string, behavior iana.EndpointBehavior, dev string) error
- func (t Table) DelDefaultRoutesBlackhole(ctx context.Context) error
- func (t Table) DelRoute(ctx context.Context, args ...string) error
- func (t Table) DelRoute4(ctx context.Context, args ...string) error
- func (t Table) DelRoute4Tun(ctx context.Context, prefix string, dev string) error
- func (t Table) DelRoute6(ctx context.Context, args ...string) error
- func (t Table) DelRoute6Tun(ctx context.Context, prefix string, dev string) error
- func (t Table) DelRule4(ctx context.Context, to string) error
- func (t Table) DelRule6(ctx context.Context, to string) error
- func (t Table) DelSeg6Encap(ctx context.Context, prefix string, segmentsList string, dev string) error
- func (t Table) DelSeg6Inline(ctx context.Context, prefix string, segmentsList string, dev string) error
- func (t Table) DelSeg6Local(ctx context.Context, sid string, behavior iana.EndpointBehavior, dev string) error
- type TunIface
- func (t *TunIface) CancelDropIcmpRedirect(ctx context.Context) error
- func (t *TunIface) CreateAndUp(ctx context.Context) error
- func (t *TunIface) Delete(ctx context.Context) error
- func (t *TunIface) DropIcmpRedirect(ctx context.Context) error
- func (t *TunIface) IPv4TTL() (uint8, error)
- func (t *TunIface) IPv6HopLimit() (uint8, error)
- func (t *TunIface) MTU() (int64, error)
- func (t *TunIface) Name() string
- func (t *TunIface) Read(b []byte) (int, error)
- func (t *TunIface) Write(b []byte) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DummyIface ¶
type DummyIface struct {
// contains filtered or unexported fields
}
IPRoute2 Dummy interface
func (DummyIface) CreateAndUp ¶
func (iface DummyIface) CreateAndUp(ctx context.Context) error
Create iproute2 dummy interface and set link up
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
IPRoute2 Table
func (Table) AddDefaultRoutesBlackhole ¶
Add default blackhole routes
func (Table) AddRoute4Tun ¶
Add IPv4 Route to Tun iface
func (Table) AddRoute6Tun ¶
Add IPv6 Route to Tun iface
func (Table) AddSeg6Encap ¶
func (t Table) AddSeg6Encap(ctx context.Context, prefix string, segmentsList string, dev string) error
Add Linux Headend with encap
func (Table) AddSeg6EncapWithMTU ¶
func (t Table) AddSeg6EncapWithMTU(ctx context.Context, prefix string, segmentsList string, dev string, mtu string) error
Add Linux Headend with encap and MTU
func (Table) AddSeg6Inline ¶
func (t Table) AddSeg6Inline(ctx context.Context, prefix string, segmentsList string, dev string) error
Add Linux Headend with inline Inline mode is only for incomming packets already having an IPv6 header
func (Table) AddSeg6Local ¶
func (t Table) AddSeg6Local(ctx context.Context, sid string, behavior iana.EndpointBehavior, dev string) error
Add Linux SRv6 Endpoint
func (Table) DelDefaultRoutesBlackhole ¶
Delete default blackhole routes
func (Table) DelRoute4Tun ¶
Delete IPv4 Route to Tun iface
func (Table) DelRoute6Tun ¶
Delete IPv6 Route to Tun iface
func (Table) DelSeg6Encap ¶
func (t Table) DelSeg6Encap(ctx context.Context, prefix string, segmentsList string, dev string) error
Delete Linux Headend with encap
func (Table) DelSeg6Inline ¶
func (t Table) DelSeg6Inline(ctx context.Context, prefix string, segmentsList string, dev string) error
Delete Linux Headend with inline Inline mode is only for incomming packets already having an IPv6 header
func (Table) DelSeg6Local ¶
func (t Table) DelSeg6Local(ctx context.Context, sid string, behavior iana.EndpointBehavior, dev string) error
Delete Linux SRv6 Endpoint
type TunIface ¶
type TunIface struct {
// contains filtered or unexported fields
}
TunIface
func (*TunIface) CancelDropIcmpRedirect ¶ added in v0.0.13
Cancel Drop ICMP/ICMPv6 redirects on the interface
func (*TunIface) CreateAndUp ¶
Create the TunIface and set it up
func (*TunIface) DropIcmpRedirect ¶ added in v0.0.13
Drop ICMP/ICMPv6 redirects on the interface
func (*TunIface) IPv6HopLimit ¶
IPv6 Hop Limit of the TunIface