datapath

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package datapath implements linux data path for PPPoE/PPP;

TODO: currently datapath does NOT do following:
	- create default route with nexthop as the TUN interface
	- apply DNS server address

Index

Constants

View Source
const DefaultMaxFrameSize = 1500

DefaultMaxFrameSize is the default max PPP frame size could be received from the TUN interface

Variables

This section is empty.

Functions

This section is empty.

Types

type TUNIF

type TUNIF struct {
	// contains filtered or unexported fields
}

TUNIF is the TUN interface for a opened PPP session

func NewTUNIf

func NewTUNIf(ctx context.Context, pppproto *lcp.PPP, name string, assignedAddrs []net.IP, v6ifid []byte, peermru uint16) (*TUNIF, error)

NewTUNIf creates a new TUN interface the pppproto, using name as interface name, add ifv4addr to the TUN interface; also creates an IPv6 link local address via v6ifid, set MTU to peermru;

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL