hans-2.4.0.0: IPv4 Network Stack

Safe HaskellNone
LanguageHaskell98

Hans.Message.Arp

Synopsis

Documentation

data ArpPacket hw p Source

Constructors

ArpPacket 

Fields

arpHwType :: !Word16
 
arpPType :: !Word16
 
arpOper :: ArpOper
 
arpSHA :: hw
 
arpSPA :: p
 
arpTHA :: hw
 
arpTPA :: p
 

Instances

(Show hw, Show p) => Show (ArpPacket hw p) 

parseArpPacket :: Get hw -> Get p -> ByteString -> Either String (ArpPacket hw p) Source

Parse an Arp packet, given a way to parse hardware and protocol addresses.

renderArpPacket :: (Address hw, Address p) => Putter hw -> Putter p -> ArpPacket hw p -> ByteString Source

Render an Arp packet, given a way to render hardware and protocol addresses.

data ArpOper Source

Arp operations.

Constructors

ArpRequest

0x1

ArpReply

0x2

Instances

parseArpOper :: Get ArpOper Source

Parse an Arp operation.

renderArpOper :: Putter ArpOper Source

Render an Arp operation.