Date: Tue, 06 Aug 2002 14:46:53 +0430 From: "soheil h" <soheil_h_y@hotmail.com> To: freebsd-questions@FreeBSD.ORG Subject: TCP header on IP packet Message-ID: <F15Ls51jx5aXXOP6lDi0000d400@hotmail.com>
next in thread | raw e-mail | index | archive | help
PLEASE HELP ME .... SOS .... Hi list which of these cast is true for accessing the tcphdr outof the 'struct mbuf' in the ip_input function of ip_input.c ? struct mbuf m; struct ip * ip = mtod(m, ip); int iphlen; struct tcphdr* th; hlen = IP_VHL_HL(ip->ip_vhl) << 2; 1. th = (struct tcphdr *)(ip + 1); 2. th = (struct tcphdr *)((caddr_t)ip + hlen); PLEASE HELP ME I THINK THE SECOND ONE IS TRUE BUT IT DOESN' Work . _________________________________________________________________ Join the world’s largest e-mail service with MSN Hotmail. http://www.hotmail.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F15Ls51jx5aXXOP6lDi0000d400>