Implement IP depacketizer
Closed this issue · 0 comments
rowanG077 commented
Feature description
This is a depacketizer similar to MAC packetizer #25
Expected behaviour
The bytes containing the IP header are stripped of the packet stream and parsed into the metaType.
Expected steps
This can be achieved using the generic dpacketizer
from #25. The expected type is:
fromIPFrame
:: HiddenClockResetEnable dom
=> Circuit (PacketStream dom n EthernetHeader) (PacketStream dom n IPHeader)
Perhaps it's better to first define a IPHeaderLite
which only contains the fields which we support and then a seperate IPHeader -> IPHeaderLite
function sets all fields to constants.
This plays nicely with the mapping functions in the generic depacketizer
.
Additional context
Note here is that the header has a checksum. This needs to be validated. So it depends on #75.