Documentation ¶
Overview ¶
Encodes and decodes EtherTalk (DDP/AARP-over-Ethernet) packets.
Index ¶
Constants ¶
View Source
const ( EthHeaderSize = 13 LinkHeaderSize = 3 SNAPProtoSize = 5 )
Variables ¶
View Source
var ( SNAP = LinkHeader{0xAA, 0xAA, 0x03} AppleTalkProto = SNAPProto{[3]byte{0x08, 0x00, 0x07}, 0x809B} AARPProto = SNAPProto{[3]byte{0x00, 0x00, 0x00}, 0x80F3} AppleTalkBroadcast = ethernet.Addr{0x09, 0x00, 0x07, 0xff, 0xff, 0xff} )
Functions ¶
Types ¶
type LinkHeader ¶
type Packet ¶
type Packet struct { EthHeader LinkHeader // always equals SNAP in EtherTalk SNAPProto // always AppleTalkProto or AARPProto in EtherTalk Payload []byte // marshaled ddp.Packet or aarp.Packet Pad []byte }
Combines all data in an EtherTalk packet.
EtherTalk packets contain:
- an Ethernet header,
- an LLC (Logical Link Control) header, which must equal the SNAP (Subnetwork Access Protocol) LinkHeader value,
- the SNAP data, indicating either an AppleTalk (DDP) or AARP payload,
- the DDP or AARP payload itself, and
- optionally, extra padding as specified by the Ethernet header.
Click to show internal directories.
Click to hide internal directories.