Safe Haskell | None |
---|---|
Language | Haskell98 |
- arpEntryTimeout :: POSIXTime
- data ArpEntry
- = ArpEntry {
- arpMac :: Mac
- arpTimeout :: POSIXTime
- | ArpPending { }
- = ArpEntry {
- data ArpResult
- type ArpTable = Map IP4 ArpEntry
- stepArpTable :: POSIXTime -> ArpTable -> (ArpTable, [IP4])
- addArpEntry :: POSIXTime -> IP4 -> Mac -> ArpTable -> ArpTable
- addPending :: POSIXTime -> IP4 -> ArpTable -> ArpTable
- lookupArpEntry :: IP4 -> ArpTable -> ArpResult
Documentation
addPending :: POSIXTime -> IP4 -> ArpTable -> ArpTable Source
Assumption: there is not already a pending ARP query recorded in the ARP table for the given IP address.
lookupArpEntry :: IP4 -> ArpTable -> ArpResult Source
If the ARP table has a fully realized entry for the given IP address, then return it. Otherwise return Pending if we're waiting for this info, or Unknown if nothing is currently known about it.