*/
#ifndef lint
-static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-mpls.c,v 1.5 2002-08-08 19:52:48 hannes Exp $ (LBL)";
+static const char rcsid[] _U_ =
+ "@(#) $Header: /tcpdump/master/tcpdump/print-mpls.c,v 1.10 2003-11-16 09:36:29 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
if (vflag &&
MPLS_LABEL(v) < sizeof(mpls_labelname) / sizeof(mpls_labelname[0]))
printf(" (%s)", mpls_labelname[MPLS_LABEL(v)]);
- if (MPLS_EXP(v))
- printf(", exp %u", MPLS_EXP(v));
+ printf(", exp %u", MPLS_EXP(v));
if (MPLS_STACK(v))
printf(", [S]");
printf(", ttl %u", MPLS_TTL(v));
* bit is set and tries to determine the network layer protocol
* 0x45-0x4f is IPv4
* 0x60-0x6f is IPv6
- * 0x83 is IS-IS
+ * 0x81-0x83 is OSI (CLNP,ES-IS,IS-IS)
* this technique is sometimes known as NULL encapsulation
* and decoding is particularly useful for control-plane traffic [BGP]
* which cisco by default sends MPLS encapsulated
case 0x4d:
case 0x4e:
case 0x4f:
- printf("\n\t");
- ip_print(p, length - (p - bp));
+ if (vflag>0) {
+ printf("\n\t");
+ ip_print(p, length - (p - bp));
+ }
+ else printf(", IP, length: %u",length);
break;
#ifdef INET6
case 0x60:
case 0x6d:
case 0x6e:
case 0x6f:
- printf("\n\t");
- ip6_print(p, length - (p - bp));
+ if (vflag>0) {
+ printf("\n\t");
+ ip6_print(p, length - (p - bp));
+ }
+ else printf(", IPv6, length: %u",length);
break;
#endif
+ case 0x81:
+ case 0x82:
case 0x83:
- printf("\n\t");
- isoclns_print(p, length - (p - bp), length - (p - bp), NULL, NULL);
+ if (vflag>0) {
+ printf("\n\t");
+ isoclns_print(p, length - (p - bp), length - (p - bp));
+ }
+ else printf(", OSI, length: %u",length);
break;
default:
/* ok bail out - we did not figure out what it is*/
printf("[|MPLS]");
}
+/*
+ * draft-ietf-mpls-lsp-ping-02.txt
+ */
+void
+mpls_lsp_ping_print(const u_char *pptr, u_int length)
+{
+ printf("UDP, LSP-PING, length: %u", length);
+ if (vflag >1)
+ print_unknown_data(pptr,"\n\t ", length);
+}