Documentation
¶
Overview ¶
Package l2tp is komando's own L2TP client (RFC 2661): one tunnel with one session carrying PPP, which logs in and brings up IPv4. It runs over any datagram link; for L2TP/IPsec that is ESP in transport mode (internal/ipsec), so nothing on the computer changes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNoAnswer = ppp.ErrTimeout
ErrNoAnswer: the server stopped answering while the session came up (often because it still holds an older session of the same user).
Functions ¶
This section is empty.
Types ¶
type Tunnel ¶
type Tunnel struct {
// contains filtered or unexported fields
}
Tunnel is a connected L2TP session: IPv4 packets in and out.
func Dial ¶
func Dial(ctx context.Context, link Link, user, password string, allowPAP bool, log func(string, ...any)) (*Tunnel, error)
Dial sets up the tunnel and session and logs in with PPP. allowPAP lets the server pick PAP, which sends the password itself (ppp.Peer.AllowPAP).
func (*Tunnel) WritePacket ¶
WritePacket sends one IPv4 packet.