Parser 1
Parse with precision: Extract fields from packets like a protocol pro!
PROBLEM STATEMENT: In this problem, we get started with the concept of packet parsing. To begin with, we look at a relatively simpler problem of extracting fields from packets when the offset of that field from the start of the packet is clearly known. Logic like this is quite common in later stages of a pipelined packet parsing logic where the protocol level headers have been cleared and the payload is now being scanned for useful information.
The module will get the start-byte-offset of the field to be extracted as an input. (count from 0) The size of the field (in bytes) can range from 4 to 8 bytes. Packets are smaller than 128 bytes from SOP to EOP and packet size is always a multiple of 4 bytes.

Interface Definition
The module consists of two interfaces
Loading the interactive workspace...