- class (Num c, Binary h) => L3Header h a c | h -> a, a -> h, h -> c where
- getChecksum :: h -> c
- setChecksum :: h -> c -> h
- src :: h -> a
- dst :: h -> a
- zeroChecksum :: h -> h
- computeChecksum :: h -> c
- fillChecksum :: h -> h
- pseudoHeader :: h -> ByteString
- valid :: h -> Bool
- class Binary a => L3Address a h | a -> h, h -> a where
- localBroadcast :: a -> a
- globalBroadcast :: a
Documentation
class (Num c, Binary h) => L3Header h a c | h -> a, a -> h, h -> c whereSource
A class of network headers that assumes a checksum is present.
getChecksum :: h -> cSource
Returns the checksum from the header
setChecksum :: h -> c -> hSource
Sets the checksum in the header
Returns a source
for the header.
Returns a destination
for the header.
zeroChecksum :: h -> hSource
Returns a header with all the same fields except the checksum is zeroed
computeChecksum :: h -> cSource
Computes the checksum
fillChecksum :: h -> hSource
Computes the checksum, returns a header with the proper checksum
pseudoHeader :: h -> ByteStringSource
Used by various layer 4 protocols (UDP, TCP), a pseudo header is needed to compute the checksum
Returns True iff the checksum is valid
class Binary a => L3Address a h | a -> h, h -> a whereSource
A class of network addresses that assumes there is a broadcast
concept.
localBroadcast :: a -> aSource