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;
Click to show internal directories.
Click to hide internal directories.