[Click] Accessing port values from header
Daniel Braund
D.Braund-01 at student.lboro.ac.uk
Thu Apr 6 13:03:54 EDT 2006
Hi. I am running in circles trying to figure out how to extract the port value
for a packet in a similar manner to the way I extract a packets source and
destination addresses:
packet_src=iph->ip_src.s_addr;
packet_dst=iph->ip_dst.s_addr;
essentially I want to know if I can do something like
packet_port=iph->ip_dst.port;
I have looked, but cannot find a list or description of what values I can plug
into here to gain the data I want. Does one exist somewhere? Also, s_addr I
assume implies string, is there a binary/hex variant?
Thanks in advance for any insight you can offer me.
Daniel
More information about the click
mailing list