#include "interface.h"
#include "addrtoname.h"
-#include "extract.h"
+#include "extract.h"
#include "nlpid.h"
#define DTP_HEADER_LEN 1
if (length < DTP_HEADER_LEN)
goto trunc;
- tptr = pptr;
+ tptr = pptr;
- if (!TTEST2(*tptr, DTP_HEADER_LEN))
+ if (!TTEST2(*tptr, DTP_HEADER_LEN))
goto trunc;
- printf("DTPv%u, length %u",
+ printf("DTPv%u, length %u",
(*tptr),
length);
while (tptr < (pptr+length)) {
- if (!TTEST2(*tptr, 4))
+ if (!TTEST2(*tptr, 4))
goto trunc;
type = EXTRACT_16BITS(tptr);
- len = EXTRACT_16BITS(tptr+2);
+ len = EXTRACT_16BITS(tptr+2);
/* infinite loop check */
if (type == 0 || len == 0) {
printf(", %s", tptr+4);
break;
- case DTP_STATUS_TLV:
+ case DTP_STATUS_TLV:
case DTP_DTP_TYPE_TLV:
printf(", 0x%x", *(tptr+4));
break;
default:
break;
- }
+ }
tptr += len;
}