Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/danderson/goppp
/ functions
Functions
34 in github.com/danderson/goppp
⨍
Functions
34
◇
Types & classes
3
↓ 11 callers
Method
Close
Close closes the PPPoE session.
pppoe/pppoe.go:154
↓ 6 callers
Method
Write
Write writes a packet to the PPPoE session.
pppoe/pppoe.go:190
↓ 5 callers
Method
SetReadDeadline
SetReadDeadline sets the deadline for future Read operations.
pppoe/pppoe.go:201
↓ 4 callers
Method
String
()
pppoe/pppoe.go:25
↓ 4 callers
Function
closeSessionFd
(fd int)
pppoe/session.go:18
↓ 4 callers
Function
encodeDiscoveryPacket
encodeDiscoveryPacket marshals a PPPoE Discovery packet into raw bytes.
pppoe/discovery.go:330
↓ 4 callers
Function
parseDiscoveryPacket
parseDiscoveryPacket parses a PPPoE Discovery packet into a discoveryPacket.
pppoe/discovery.go:286
↓ 2 callers
Function
canUseDocker
()
internal/testutil/util.go:14
↓ 1 callers
Function
CheckPrivilegeForContainerTests
CheckPrivilegeForContainerTests returns nil if Docker and raw socket based tests can be run.
internal/testutil/util.go:33
↓ 1 callers
Function
New
New runs PPPoE discovery on the given interface, and creates a Conn that can send PPP frames on the resulting PPPoE session.
pppoe/pppoe.go:58
↓ 1 callers
Method
Read
Read reads a packet from the PPPoE session.
pppoe/pppoe.go:185
↓ 1 callers
Function
StartServer
StartServer runs a PPP+PPPoE server in a Docker container. It returns a closer function (which should be defer-ed), or an error if server startup fail
internal/testutil/util.go:46
↓ 1 callers
Function
canUseRawSockets
()
internal/testutil/util.go:19
↓ 1 callers
Method
closeOnPADT
()
pppoe/pppoe.go:125
↓ 1 callers
Function
connectSessionFd
(fd int, ifName string, remote net.HardwareAddr, sessionID uint16)
pppoe/session.go:22
↓ 1 callers
Function
newChannel
(sessionFd int)
pppoe/session.go:31
↓ 1 callers
Function
newDiscoveryConn
newDiscoveryConn creates a net.PacketConn that can receive PPPoE discovery packets.
pppoe/discovery.go:117
↓ 1 callers
Function
newSessionFd
Stolen from /usr/include/linux/if_pppox.h
pppoe/session.go:14
↓ 1 callers
Function
parsePADO
parsePADO parses a raw PADO packet and extracts the PPPoE cookie.
pppoe/discovery.go:161
↓ 1 callers
Function
parsePADS
(buf []byte)
pppoe/discovery.go:220
↓ 1 callers
Function
pppoeDiscovery
pppoeDiscovery executes PPPoE discovery and returns a PPPoE session ID.
pppoe/discovery.go:62
↓ 1 callers
Function
readPADO
readPADO waits to receive a valid PPPoE Active Discovery Offer (PADO) packet, and returns relevant information from it.
pppoe/discovery.go:138
↓ 1 callers
Function
readPADS
(ctx context.Context, conn net.PacketConn, concentrator net.Addr)
pppoe/discovery.go:193
↓ 1 callers
Function
readPADT
(conn net.PacketConn, concentrator net.HardwareAddr, sessionID uint16)
pppoe/discovery.go:231
↓ 1 callers
Function
sendPADI
sendPADI broadcasts a PADI packet. While trivial, it's separated out so tests can invoke it.
pppoe/discovery.go:131
↓ 1 callers
Function
sendPADR
(conn net.PacketConn, concentrator net.Addr, cookie []byte)
pppoe/discovery.go:179
↓ 1 callers
Function
sendPADT
(conn net.PacketConn, concentrator net.HardwareAddr, sessionID uint16)
pppoe/discovery.go:263
Method
LocalAddr
LocalAddr returns the local address of the PPPoE connection. PPPoE Conns don't have an interesting local address to share, so this returns nil for now
pppoe/pppoe.go:143
Method
Network
()
pppoe/pppoe.go:24
Method
RemoteAddr
RemoteAddr returns the address of the connected PPPoE concentrator, as an *Addr.
pppoe/pppoe.go:149
Method
SetDeadline
SetDeadline sets both the read and write deadlines for future Read and Write operations.
pppoe/pppoe.go:196
Method
SetWriteDeadline
SetWriteDeadline sets the deadline for future Write operations.
pppoe/pppoe.go:206
Function
TestNew
(t *testing.T)
pppoe/pppoe_test.go:12
Function
TestParseDiscovery
(t *testing.T)
pppoe/discovery_test.go:9