Documentation ¶
Index ¶
- Constants
- func DecodeBytes(dst *[]byte, src []byte, idx int) int
- func DecodeMacAddr(src []byte, idx int) (net.HardwareAddr, int)
- func DecodeNetworkId(dst string, src []byte, idx int) int
- func DecodeUint16(dst *uint16, src []byte, idx int) int
- func DecodeUint8(dst *byte, src []byte, idx int) int
- func Encode(h Header) ([]byte, error)
- func EncodeBytes(dst, src []byte, idx int) int
- func EncodeUint16(dst []byte, src uint16, idx int) int
- func EncodeUint8(dst []byte, src uint8, idx int) int
- type Header
- type Packet
Constants ¶
View Source
const ( Version uint8 = 1 DefaultTTL uint8 = 100 )
View Source
const ( MAC_SIZE = 6 IP_SIZE = 16 HeaderBuffSize = 44 HandshakeBuffSize = 76 IPBuffSize = 20 )
View Source
const (
FvpnPktBuffSize = 2048
)
Variables ¶
This section is empty.
Functions ¶
func DecodeMacAddr ¶
func DecodeMacAddr(src []byte, idx int) (net.HardwareAddr, int)
func EncodeBytes ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.