- if ((off & 0x1fff) == 0) {
- cp = (const u_char *)ip + hlen;
- nh = ip->ip_p;
-
-#ifndef IPPROTO_SCTP
-#define IPPROTO_SCTP 132
-#endif
- if (nh != IPPROTO_TCP && nh != IPPROTO_UDP &&
- nh != IPPROTO_SCTP) {
- (void)printf("%s > %s: ", ipaddr_string(&ip->ip_src),
- ipaddr_string(&ip->ip_dst));
- }
-again:
- switch (nh) {
-
-#ifndef IPPROTO_AH
-#define IPPROTO_AH 51
-#endif
- case IPPROTO_AH:
- nh = *cp;
- advance = ah_print(cp, (const u_char *)ip);
- cp += advance;
- len -= advance;
- goto again;
-
-#ifndef IPPROTO_ESP
-#define IPPROTO_ESP 50
-#endif
- case IPPROTO_ESP:
- {
- int enh, padlen;
- advance = esp_print(cp, (const u_char *)ip, &enh, &padlen);
- cp += advance;
- len -= advance + padlen;
- if (enh < 0)
- break;
- nh = enh & 0xff;
- goto again;
- }
-
-#ifndef IPPROTO_IPCOMP
-#define IPPROTO_IPCOMP 108
-#endif
- case IPPROTO_IPCOMP:
- {
- int enh;
- advance = ipcomp_print(cp, (const u_char *)ip, &enh);
- cp += advance;
- len -= advance;
- if (enh < 0)
- break;
- nh = enh & 0xff;
- goto again;
- }
-
- case IPPROTO_SCTP:
- sctp_print(cp, (const u_char *)ip, len);
- break;
-
- case IPPROTO_TCP:
- tcp_print(cp, len, (const u_char *)ip, (off &~ 0x6000));
- break;
-
- case IPPROTO_UDP:
- udp_print(cp, len, (const u_char *)ip, (off &~ 0x6000));
- break;
-
- case IPPROTO_ICMP:
- icmp_print(cp, len, (const u_char *)ip);
- break;
-
-#ifndef IPPROTO_IGRP
-#define IPPROTO_IGRP 9
-#endif
- case IPPROTO_IGRP:
- igrp_print(cp, len, (const u_char *)ip);
- break;
-
- case IPPROTO_ND:
- (void)printf(" nd %d", len);
- break;