goto cleanup;
#ifdef INET6
case PPP_IPV6:
- ip6_print(b+1, t - b - 1);
- goto cleanup;
+ ip6_print(gndo, b+1, t - b - 1);
+ goto cleanup;
#endif
default: /* no luck - try next guess */
- break;
+ break;
}
proto = EXTRACT_16BITS(b); /* next guess - load two octets */
#ifdef INET6
case ETHERTYPE_IPV6: /*XXX*/
case PPP_IPV6:
- ip6_print(p, length);
+ ip6_print(gndo, p, length);
break;
#endif
case ETHERTYPE_IPX: /*XXX*/
hdrlength += 1;
} else {
/* Un-compressed protocol field */
- ptype = ntohs(*(u_int16_t *)p);
+ ptype = EXTRACT_16BITS(p);
if (eflag)
printf("%04x ", ptype);
p += 2;
&& ph->phdr_ctl == PPP_CONTROL) {
if (eflag)
printf("%02x %02x ", q[0], q[1]);
- ptype = ntohs(ph->phdr_type);
+ ptype = EXTRACT_16BITS(&ph->phdr_type);
if (eflag && (ptype == PPP_VJC || ptype == PPP_VJNC)) {
printf("%s ", tok2str(ppptype2str,
"proto-#%d", ptype));
p += hdrlength;
switch (ptype) {
case PPP_IP:
- ip_print(p, length);
+ ip_print(gndo, p, length);
break;
#ifdef INET6
case PPP_IPV6:
- ip6_print(p, length);
+ ip6_print(gndo, p, length);
break;
#endif
case PPP_MPLS_UCAST:
p += hdrlength;
switch (ptype) {
case PPP_IP:
- ip_print(p, length);
+ ip_print(gndo, p, length);
break;
#ifdef INET6
case PPP_IPV6:
- ip6_print(p, length);
+ ip6_print(gndo, p, length);
break;
#endif
case PPP_MPLS_UCAST:
break;
#ifdef INET6
case PPP_IPV6:
- ip6_print(p, length);
+ ip6_print(gndo, p, length);
break;
#endif
case PPP_MPLS_UCAST:
case PPP_MPLS_MCAST:
- mpls_print(p, length);
+ mpls_print(gndo, p, length);
break;
default:
printf("%s ", tok2str(ppptype2str, "unknown PPP protocol (0x%04x)", ptype));