Deleted Added
full compact
print-l2tp.c (111726) print-l2tp.c (124486)
1/*
2 * Copyright (c) 1991, 1993, 1994, 1995, 1996, 1997
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that: (1) source code distributions
7 * retain the above copyright notice and this paragraph in its entirety, (2)
8 * distributions including binary code include the above copyright notice and

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

471 return;
472 }
473
474 printf(" ");
475
476 TCHECK(*ptr); /* Flags & Length */
477 len = EXTRACT_16BITS(ptr) & L2TP_AVP_HDR_LEN_MASK;
478
1/*
2 * Copyright (c) 1991, 1993, 1994, 1995, 1996, 1997
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that: (1) source code distributions
7 * retain the above copyright notice and this paragraph in its entirety, (2)
8 * distributions including binary code include the above copyright notice and

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

471 return;
472 }
473
474 printf(" ");
475
476 TCHECK(*ptr); /* Flags & Length */
477 len = EXTRACT_16BITS(ptr) & L2TP_AVP_HDR_LEN_MASK;
478
479 /* If it is not long enough to decode the entire AVP, we'll
480 abandon. */
479 /* If it is not long enough to contain the header, we'll give up. */
480 if (len < 6)
481 goto trunc;
482
483 /* If it goes past the end of the remaining length of the packet,
484 we'll give up. */
485 if (len > (u_int)length)
486 goto trunc;
487
488 /* If it goes past the end of the remaining length of the captured
489 data, we'll give up. */
481 TCHECK2(*ptr, len);
482 /* After this point, no need to worry about truncation */
483
484 if (EXTRACT_16BITS(ptr) & L2TP_AVP_HDR_FLAG_MANDATORY) {
485 printf("*");
486 }
487 if (EXTRACT_16BITS(ptr) & L2TP_AVP_HDR_FLAG_HIDDEN) {
488 hidden = TRUE;

--- 214 unchanged lines hidden ---
490 TCHECK2(*ptr, len);
491 /* After this point, no need to worry about truncation */
492
493 if (EXTRACT_16BITS(ptr) & L2TP_AVP_HDR_FLAG_MANDATORY) {
494 printf("*");
495 }
496 if (EXTRACT_16BITS(ptr) & L2TP_AVP_HDR_FLAG_HIDDEN) {
497 hidden = TRUE;

--- 214 unchanged lines hidden ---