[ee122] Extracting our datagram from packet_parser
fowler at eecs.berkeley.edu
Mon Dec 10 10:05:05 PST 2007
On Dec 10, 2007 9:49 AM, <waden at berkeley.edu> wrote:
> Hi, right now Im working on the packet_parser and I just wanted to make
> sure that our full UDP datagram with payload is encapsulated within the
> real UDP/IP/ETHERNET headers.
Your UDP payload, which includes your custom protocol's header and
payload, are encapsulated within the headers Ethernet>IP>UDP>
> Second, that the capture_len variable
> refers to the length in bytes of the "packet" argument, because when I
> printf the variable at the beginning of the function its only between like
> 50 and 80. Thanks!
>From the comments:
* Note that "capture_len" is the length of the packet *as captured by the
* tracing program*, and thus might be less than the full length of the
* packet. However, the packet pointer only holds that much data, so
* we have to be careful not to read beyond it.
More information about the ee122