MCPcopy Create free account

hub / github.com/mdlayher/packet / functions

Functions45 in github.com/mdlayher/packet

↓ 11 callersMethodopError
opError is a convenience for the function opError that also passes the local and remote addresses of the Conn.
packet.go:171
↓ 3 callersFunctionopError
opError unpacks err if possible, producing a net.OpError with the input parameters in order to implement net.PacketConn. As a convenience, opError ret
packet.go:228
↓ 3 callersMethodopError
opError is a convenience for the function opError that also passes the address of the rawConn.
packet.go:204
↓ 2 callersMethodClose
Close closes the connection.
packet.go:91
↓ 2 callersFunctionhex
(v uint16)
packet_internal_test.go:76
↓ 2 callersFunctionhtons
htons converts a short (uint16) from host-to-network byte order.
packet_linux.go:238
↓ 1 callersFunctionListen
Listen opens a packet sockets connection on the specified interface, using the given socket type and protocol values. The socket type must be one of
packet.go:60
↓ 1 callersMethodReadFrom
ReadFrom implements the net.PacketConn ReadFrom method.
packet.go:100
↓ 1 callersMethodSetBPF
SetBPF attaches an assembled BPF program to the Conn.
packet.go:125
↓ 1 callersMethodSetReadDeadline
SetReadDeadline implements the net.PacketConn SetReadDeadline method.
packet.go:115
↓ 1 callersMethodStats
Stats retrieves statistics about the Conn from the Linux kernel. Note that calling Stats will reset the kernel's internal counters for this Conn. If
packet.go:153
↓ 1 callersMethodString
String returns the string representation of an Addr.
packet.go:221
↓ 1 callersFunctionbind
bind binds the *socket.Conn to finalize *Conn setup.
packet_linux.go:136
↓ 1 callersFunctionfromSockaddr
fromSockaddr converts an opaque unix.Sockaddr to *Addr. If sa is nil, it returns nil. It panics if sa is not of type *unix.SockaddrLinklayer.
packet_linux.go:182
↓ 1 callersFunctionlisten
listen is the entry point for Listen on Linux.
packet_linux.go:101
↓ 1 callersMethodreadFrom
readFrom implements the net.PacketConn ReadFrom method using recvfrom(2).
packet_linux.go:24
↓ 1 callersMethodsetPromiscuous
setPromiscuous wraps setsockopt(2) for the unix.PACKET_MR_PROMISC option.
packet_linux.go:54
↓ 1 callersMethodstats
stats wraps getsockopt(2) for tpacket_stats* types.
packet_linux.go:72
↓ 1 callersFunctiontestConn
testConn produces a *packet.Conn bound to the returned *net.Interface. The caller does not need to call Close on the *packet.Conn.
packet_linux_test.go:92
↓ 1 callersFunctiontestInterface
testInterface looks for a suitable Ethernet interface to bind a *packet.Conn.
packet_linux_test.go:111
↓ 1 callersMethodtoSockaddr
toSockaddr converts a net.Addr to an opaque unix.Sockaddr. It returns an error if the fields cannot be packed into a *unix.SockaddrLinklayer.
packet_linux.go:198
↓ 1 callersMethodwriteTo
writeTo implements the net.PacketConn WriteTo method.
packet_linux.go:38
MethodClose
()
packet_others.go:28
MethodControl
Control implements the syscall.RawConn Control method.
packet.go:188
MethodLocalAddr
LocalAddr returns the local network address. The Addr returned is shared by all invocations of LocalAddr, so do not modify it.
packet.go:97
MethodNetwork
Network returns the address's network name, "packet".
packet.go:218
MethodRead
Control implements the syscall.RawConn Read method.
packet.go:193
MethodSetBPF
(_ []bpf.RawInstruction)
packet_others.go:32
MethodSetDeadline
SetDeadline implements the net.PacketConn SetDeadline method.
packet.go:110
MethodSetDeadline
(_ time.Time)
packet_others.go:29
MethodSetPromiscuous
SetPromiscuous enables or disables promiscuous mode on the Conn, allowing it to receive traffic that is not addressed to the Conn's network interface.
packet.go:131
MethodSetReadDeadline
(_ time.Time)
packet_others.go:30
MethodSetWriteDeadline
SetWriteDeadline implements the net.PacketConn SetWriteDeadline method.
packet.go:120
MethodSetWriteDeadline
(_ time.Time)
packet_others.go:31
MethodSyscallConn
SyscallConn returns a raw network connection. This implements the syscall.Conn interface.
packet.go:157
MethodSyscallConn
()
packet_others.go:33
FunctionTestConnListen
(t *testing.T)
packet_linux_test.go:22
FunctionTest_htons
(t *testing.T)
packet_internal_test.go:16
MethodWrite
Control implements the syscall.RawConn Write method.
packet.go:198
MethodWriteTo
WriteTo implements the net.PacketConn WriteTo method.
packet.go:105
Functionlisten
(_ *net.Interface, _ Type, _ int, _ *Config)
packet_others.go:19
MethodreadFrom
(_ []byte)
packet_others.go:21
MethodsetPromiscuous
(_ bool)
packet_others.go:23
Methodstats
()
packet_others.go:24
MethodwriteTo
(_ []byte, _ net.Addr)
packet_others.go:22