#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-sl.c,v 1.53 2000-10-03 02:26:53 itojun Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-sl.c,v 1.54 2000-10-03 02:55:01 itojun Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
if (eflag)
sliplink_print(p, ip, length);
- switch (ip->ip_v) {
+ switch (IP_V(ip)) {
case 4:
ip_print((u_char *)ip, length);
break;
break;
#endif
default:
- printf ("ip v%d", ip->ip_v);
+ printf ("ip v%d", IP_V(ip));
}
if (xflag)
* has restored the IP header copy to IPPROTO_TCP.
*/
lastconn = ((struct ip *)&p[SLX_CHDR])->ip_p;
- hlen = ip->ip_hl;
+ hlen = IP_HL(ip);
hlen += TH_OFF((struct tcphdr *)&((int *)ip)[hlen]);
lastlen[dir][lastconn] = length - (hlen << 2);
printf("utcp %d: ", lastconn);
* 'cp - chdr' is the length of the compressed header.
* 'length - hlen' is the amount of data in the packet.
*/
- hlen = ip->ip_hl;
+ hlen = IP_HL(ip);
hlen += TH_OFF((struct tcphdr *)&((int32_t *)ip)[hlen]);
lastlen[dir][lastconn] = length - (hlen << 2);
printf(" %d (%d)", lastlen[dir][lastconn], cp - chdr);