print-eigrp.c (225736) | print-eigrp.c (252283) |
---|---|
1/* 2 * Copyright (c) 1998-2004 Hannes Gredler <hannes@tcpdump.org> 3 * The TCPDUMP project 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that: (1) source code 7 * distributions retain the above copyright notice and this paragraph 8 * in its entirety, and (2) distributions including binary code include --- 266 unchanged lines hidden (view full) --- 275 276 eigrp_tlv_header = (const struct eigrp_tlv_header *)tptr; 277 eigrp_tlv_len=EXTRACT_16BITS(&eigrp_tlv_header->length); 278 eigrp_tlv_type=EXTRACT_16BITS(&eigrp_tlv_header->type); 279 280 281 if (eigrp_tlv_len < sizeof(struct eigrp_tlv_header) || 282 eigrp_tlv_len > tlen) { | 1/* 2 * Copyright (c) 1998-2004 Hannes Gredler <hannes@tcpdump.org> 3 * The TCPDUMP project 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that: (1) source code 7 * distributions retain the above copyright notice and this paragraph 8 * in its entirety, and (2) distributions including binary code include --- 266 unchanged lines hidden (view full) --- 275 276 eigrp_tlv_header = (const struct eigrp_tlv_header *)tptr; 277 eigrp_tlv_len=EXTRACT_16BITS(&eigrp_tlv_header->length); 278 eigrp_tlv_type=EXTRACT_16BITS(&eigrp_tlv_header->type); 279 280 281 if (eigrp_tlv_len < sizeof(struct eigrp_tlv_header) || 282 eigrp_tlv_len > tlen) { |
283 print_unknown_data(tptr+sizeof(sizeof(struct eigrp_tlv_header)),"\n\t ",tlen); | 283 print_unknown_data(tptr+sizeof(struct eigrp_tlv_header),"\n\t ",tlen); |
284 return; 285 } 286 287 printf("\n\t %s TLV (0x%04x), length: %u", 288 tok2str(eigrp_tlv_values, 289 "Unknown", 290 eigrp_tlv_type), 291 eigrp_tlv_type, --- 171 unchanged lines hidden (view full) --- 463 464 default: 465 if (vflag <= 1) 466 print_unknown_data(tlv_tptr,"\n\t ",tlv_tlen); 467 break; 468 } 469 /* do we want to see an additionally hexdump ? */ 470 if (vflag > 1) | 284 return; 285 } 286 287 printf("\n\t %s TLV (0x%04x), length: %u", 288 tok2str(eigrp_tlv_values, 289 "Unknown", 290 eigrp_tlv_type), 291 eigrp_tlv_type, --- 171 unchanged lines hidden (view full) --- 463 464 default: 465 if (vflag <= 1) 466 print_unknown_data(tlv_tptr,"\n\t ",tlv_tlen); 467 break; 468 } 469 /* do we want to see an additionally hexdump ? */ 470 if (vflag > 1) |
471 print_unknown_data(tptr+sizeof(sizeof(struct eigrp_tlv_header)),"\n\t ", | 471 print_unknown_data(tptr+sizeof(struct eigrp_tlv_header),"\n\t ", |
472 eigrp_tlv_len-sizeof(struct eigrp_tlv_header)); 473 474 tptr+=eigrp_tlv_len; 475 tlen-=eigrp_tlv_len; 476 } 477 return; 478trunc: 479 printf("\n\t\t packet exceeded snapshot"); 480} | 472 eigrp_tlv_len-sizeof(struct eigrp_tlv_header)); 473 474 tptr+=eigrp_tlv_len; 475 tlen-=eigrp_tlv_len; 476 } 477 return; 478trunc: 479 printf("\n\t\t packet exceeded snapshot"); 480} |