Deleted Added
full compact
print-ldp.c (147899) print-ldp.c (162017)
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 * and Steinar Haug (sthaug@nethelp.no)
15 */
16
17#ifndef lint
18static 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 * and Steinar Haug (sthaug@nethelp.no)
15 */
16
17#ifndef lint
18static const char rcsid[] _U_ =
19 "@(#) $Header: /tcpdump/master/tcpdump/print-ldp.c,v 1.8.2.5 2005/06/16 01:10:35 guy Exp $";
19 "@(#) $Header: /tcpdump/master/tcpdump/print-ldp.c,v 1.8.2.6 2005/07/11 20:24:34 hannes Exp $";
20#endif
21
22#ifdef HAVE_CONFIG_H
23#include "config.h"
24#endif
25
26#include <tcpdump-stdinc.h>
27

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

297 case LDP_TLV_ADDRESS_LIST:
298 af = EXTRACT_16BITS(tptr);
299 tptr+=2;
300 printf("\n\t Adress Family: ");
301 if (af == AFNUM_INET) {
302 printf("IPv4, addresses:");
303 for (i=0; i<(tlv_tlen-2)/4; i++) {
304 printf(" %s",ipaddr_string(tptr));
20#endif
21
22#ifdef HAVE_CONFIG_H
23#include "config.h"
24#endif
25
26#include <tcpdump-stdinc.h>
27

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

297 case LDP_TLV_ADDRESS_LIST:
298 af = EXTRACT_16BITS(tptr);
299 tptr+=2;
300 printf("\n\t Adress Family: ");
301 if (af == AFNUM_INET) {
302 printf("IPv4, addresses:");
303 for (i=0; i<(tlv_tlen-2)/4; i++) {
304 printf(" %s",ipaddr_string(tptr));
305 tptr+=4;
305 tptr+=sizeof(struct in_addr);
306 }
307 }
308#ifdef INET6
309 else if (af == AFNUM_INET6) {
310 printf("IPv6, addresses:");
311 for (i=0; i<(tlv_tlen-2)/16; i++) {
312 printf(" %s",ip6addr_string(tptr));
306 }
307 }
308#ifdef INET6
309 else if (af == AFNUM_INET6) {
310 printf("IPv6, addresses:");
311 for (i=0; i<(tlv_tlen-2)/16; i++) {
312 printf(" %s",ip6addr_string(tptr));
313 tptr+=16;
313 tptr+=sizeof(struct in6_addr);
314 }
315 }
316#endif
317 break;
318
319 case LDP_TLV_COMMON_SESSION:
320 printf("\n\t Version: %u, Keepalive: %us, Flags: [Downstream %s, Loop Detection %s]",
321 EXTRACT_16BITS(tptr), EXTRACT_16BITS(tptr+2),

--- 294 unchanged lines hidden ---
314 }
315 }
316#endif
317 break;
318
319 case LDP_TLV_COMMON_SESSION:
320 printf("\n\t Version: %u, Keepalive: %us, Flags: [Downstream %s, Loop Detection %s]",
321 EXTRACT_16BITS(tptr), EXTRACT_16BITS(tptr+2),

--- 294 unchanged lines hidden ---