Deleted Added
full compact
print-lspping.c (147899) print-lspping.c (172683)
1/*
2 * Redistribution and use in source and binary forms, with or without
3 * modification, are permitted provided that: (1) source code
4 * distributions retain the above copyright notice and this paragraph
5 * in its entirety, and (2) distributions including binary code include
6 * the above copyright notice and this paragraph in its entirety in
7 * the documentation or other materials provided with the distribution.
8 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
9 * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
10 * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
11 * FOR A PARTICULAR PURPOSE.
12 *
13 * Original code by Hannes Gredler (hannes@juniper.net)
14 */
15
16#ifndef lint
17static const char rcsid[] _U_ =
1/*
2 * Redistribution and use in source and binary forms, with or without
3 * modification, are permitted provided that: (1) source code
4 * distributions retain the above copyright notice and this paragraph
5 * in its entirety, and (2) distributions including binary code include
6 * the above copyright notice and this paragraph in its entirety in
7 * the documentation or other materials provided with the distribution.
8 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
9 * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
10 * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
11 * FOR A PARTICULAR PURPOSE.
12 *
13 * Original code by Hannes Gredler (hannes@juniper.net)
14 */
15
16#ifndef lint
17static const char rcsid[] _U_ =
18 "@(#) $Header: /tcpdump/master/tcpdump/print-lspping.c,v 1.12.2.3 2005/05/03 08:12:31 hannes Exp $";
18 "@(#) $Header: /tcpdump/master/tcpdump/print-lspping.c,v 1.12.2.6 2006/06/23 02:07:27 hannes Exp $";
19#endif
20
21#ifdef HAVE_CONFIG_H
22#include "config.h"
23#endif
24
25#include <tcpdump-stdinc.h>
26

--- 47 unchanged lines hidden (view full) ---

74 u_int8_t seq_number[4];
75 u_int8_t ts_sent_sec[4];
76 u_int8_t ts_sent_usec[4];
77 u_int8_t ts_rcvd_sec[4];
78 u_int8_t ts_rcvd_usec[4];
79};
80
81#define LSPPING_VERSION 1
19#endif
20
21#ifdef HAVE_CONFIG_H
22#include "config.h"
23#endif
24
25#include <tcpdump-stdinc.h>
26

--- 47 unchanged lines hidden (view full) ---

74 u_int8_t seq_number[4];
75 u_int8_t ts_sent_sec[4];
76 u_int8_t ts_sent_usec[4];
77 u_int8_t ts_rcvd_sec[4];
78 u_int8_t ts_rcvd_usec[4];
79};
80
81#define LSPPING_VERSION 1
82#define FALSE 0
83#define TRUE 1
84
85static const struct tok lspping_msg_type_values[] = {
86 { 1, "MPLS Echo Request"},
87 { 2, "MPLS Echo Reply"},
88 { 0, NULL}
89};
90
91static const struct tok lspping_reply_mode_values[] = {

--- 40 unchanged lines hidden (view full) ---

132 u_int8_t type[2];
133 u_int8_t length[2];
134};
135
136#define LSPPING_TLV_TARGET_FEC_STACK 1
137#define LSPPING_TLV_DOWNSTREAM_MAPPING 2
138#define LSPPING_TLV_PAD 3
139#define LSPPING_TLV_ERROR_CODE 4
82
83static const struct tok lspping_msg_type_values[] = {
84 { 1, "MPLS Echo Request"},
85 { 2, "MPLS Echo Reply"},
86 { 0, NULL}
87};
88
89static const struct tok lspping_reply_mode_values[] = {

--- 40 unchanged lines hidden (view full) ---

130 u_int8_t type[2];
131 u_int8_t length[2];
132};
133
134#define LSPPING_TLV_TARGET_FEC_STACK 1
135#define LSPPING_TLV_DOWNSTREAM_MAPPING 2
136#define LSPPING_TLV_PAD 3
137#define LSPPING_TLV_ERROR_CODE 4
138#define LSPPING_TLV_BFD_DISCRIMINATOR 15 /* draft-ietf-bfd-mpls-02 */
139#define LSPPING_TLV_BFD_DISCRIMINATOR_LEN 4
140#define LSPPING_TLV_VENDOR_PRIVATE 0xfc00
141
142static const struct tok lspping_tlv_values[] = {
143 { LSPPING_TLV_TARGET_FEC_STACK, "Target FEC Stack" },
144 { LSPPING_TLV_DOWNSTREAM_MAPPING, "Downstream Mapping" },
145 { LSPPING_TLV_PAD, "Pad" },
146 { LSPPING_TLV_ERROR_CODE, "Error Code" },
140#define LSPPING_TLV_VENDOR_PRIVATE 0xfc00
141
142static const struct tok lspping_tlv_values[] = {
143 { LSPPING_TLV_TARGET_FEC_STACK, "Target FEC Stack" },
144 { LSPPING_TLV_DOWNSTREAM_MAPPING, "Downstream Mapping" },
145 { LSPPING_TLV_PAD, "Pad" },
146 { LSPPING_TLV_ERROR_CODE, "Error Code" },
147 { LSPPING_TLV_BFD_DISCRIMINATOR, "BFD Discriminator" },
147 { LSPPING_TLV_VENDOR_PRIVATE, "Vendor Enterprise Code" },
148 { 0, NULL}
149};
150
151#define LSPPING_TLV_TARGETFEC_SUBTLV_LDP_IPV4 1
152#define LSPPING_TLV_TARGETFEC_SUBTLV_LDP_IPV6 2
153#define LSPPING_TLV_TARGETFEC_SUBTLV_RSVP_IPV4 3
154#define LSPPING_TLV_TARGETFEC_SUBTLV_RSVP_IPV6 4

--- 672 unchanged lines hidden (view full) ---

827
828 /* FIXME print downstream labels */
829
830
831 tlv_hexdump=TRUE; /* dump the TLV until code complete */
832
833 break;
834
148 { LSPPING_TLV_VENDOR_PRIVATE, "Vendor Enterprise Code" },
149 { 0, NULL}
150};
151
152#define LSPPING_TLV_TARGETFEC_SUBTLV_LDP_IPV4 1
153#define LSPPING_TLV_TARGETFEC_SUBTLV_LDP_IPV6 2
154#define LSPPING_TLV_TARGETFEC_SUBTLV_RSVP_IPV4 3
155#define LSPPING_TLV_TARGETFEC_SUBTLV_RSVP_IPV6 4

--- 672 unchanged lines hidden (view full) ---

828
829 /* FIXME print downstream labels */
830
831
832 tlv_hexdump=TRUE; /* dump the TLV until code complete */
833
834 break;
835
836 case LSPPING_TLV_BFD_DISCRIMINATOR:
837 tptr += sizeof(struct lspping_tlv_header);
838 if (!TTEST2(*tptr, LSPPING_TLV_BFD_DISCRIMINATOR_LEN))
839 goto trunc;
840 printf("\n\t BFD Discriminator 0x%08x", EXTRACT_32BITS(tptr));
841 break;
835 /*
836 * FIXME those are the defined TLVs that lack a decoder
837 * you are welcome to contribute code ;-)
838 */
839
840 case LSPPING_TLV_PAD:
841 case LSPPING_TLV_ERROR_CODE:
842 case LSPPING_TLV_VENDOR_PRIVATE:

--- 18 unchanged lines hidden ---
842 /*
843 * FIXME those are the defined TLVs that lack a decoder
844 * you are welcome to contribute code ;-)
845 */
846
847 case LSPPING_TLV_PAD:
848 case LSPPING_TLV_ERROR_CODE:
849 case LSPPING_TLV_VENDOR_PRIVATE:

--- 18 unchanged lines hidden ---