File: l2tpd.go

package info (click to toggle)
golang-github-katalix-go-l2tp 0.1.8-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 632 kB
  • sloc: ansic: 127; sh: 10; makefile: 4
file content (36 lines) | stat: -rw-r--r-- 638 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package main

import (
	"github.com/go-kit/kit/log"
	"github.com/katalix/go-l2tp/pppoe"
)

type l2tpSessionUp struct {
	pppoeSessionID pppoe.PPPoESessionID
	l2tpTunnelID   uint32
	l2tpSessionID  uint32
}

type l2tpSessionDown struct {
	pppoeSessionID pppoe.PPPoESessionID
	l2tpTunnelID   uint32
	l2tpSessionID  uint32
}

type l2tpEventHandler interface {
	handleEvent(event interface{})
}

type l2tpdRunner interface {
	spawn(sessionID pppoe.PPPoESessionID,
		ifName string,
		peerMAC [6]byte,
		lnsIPAddr string,
		logger log.Logger,
		eventHandler l2tpEventHandler) (l2tpd, error)
}

type l2tpd interface {
	wait() error
	terminate()
}