In include/linux/ip.h,
if I passed in sk_buff to ip_hdr and ipip_hdr
Do ip_hdr_net->saddr and ip_hdr_trans->saddr point to the same thing? I tried it on code. It doesn't. It seems that only ip_hdr_net->saddr point to source IP address, which make sense. Because network layer has IP but not on transport layer. So questions: (1) what is differences between ip_hdr and ipip_hdr? Why we have them? No documentation whatever to figure it out. (2) should I use ntohX function to convert ip_hdr member data when accessing them? eg, ip_hdr_net->saddr. |
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies