mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-29 14:45:07 +03:00
More godoc improvements
This commit is contained in:
parent
b5ac65cacb
commit
f19a4e4398
4 changed files with 44 additions and 14 deletions
|
@ -57,13 +57,21 @@ type router_recvPacket struct {
|
|||
sinfo *sessionInfo
|
||||
}
|
||||
|
||||
// RejectedPacketReason is the type code used to represent the reason that a
|
||||
// packet was rejected.
|
||||
type RejectedPacketReason int
|
||||
|
||||
const (
|
||||
// The router rejected the packet because it is too big for the session
|
||||
// The router rejected the packet because it exceeds the session MTU for the
|
||||
// given destination. In TUN/TAP, this results in the generation of an ICMPv6
|
||||
// Packet Too Big message.
|
||||
PacketTooBig = 1 + iota
|
||||
)
|
||||
|
||||
// RejectedPacket represents a rejected packet from the router. This is passed
|
||||
// back to the adapter so that the adapter can respond appropriately, e.g. in
|
||||
// the case of TUN/TAP, a "PacketTooBig" reason can be used to generate an
|
||||
// ICMPv6 Packet Too Big response.
|
||||
type RejectedPacket struct {
|
||||
Reason RejectedPacketReason
|
||||
Packet []byte
|
||||
|
|
|
@ -41,6 +41,10 @@ type tcp struct {
|
|||
conns map[linkInfo](chan struct{})
|
||||
}
|
||||
|
||||
// TcpListener is a stoppable TCP listener interface. These are typically
|
||||
// returned from calls to the ListenTCP() function and are also used internally
|
||||
// to represent listeners created by the "Listen" configuration option and for
|
||||
// multicast interfaces.
|
||||
type TcpListener struct {
|
||||
Listener net.Listener
|
||||
Stop chan bool
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue