summaryrefslogtreecommitdiff
path: root/print-ahcp.c
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2018-05-02 17:15:04 +0200
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2018-05-04 13:47:49 +0200
commitba8936b39b0ce2ff02f3aeb307df4c27657652d8 (patch)
tree71f8f3b775d7adfb7b2be374c634f749525c10eb /print-ahcp.c
parentc45392de183543487bfebf52a5d2ccbeb9cef462 (diff)
downloadtcpdump-ba8936b39b0ce2ff02f3aeb307df4c27657652d8.tar.gz
Print truncations with nd_print_trunc() instead of tstr[] strings
Remove the tstr[] strings. Update the output of some tests accordingly. Moreover: Add or update some ndo_protocol fields.
Diffstat (limited to 'print-ahcp.c')
-rw-r--r--print-ahcp.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/print-ahcp.c b/print-ahcp.c
index 9ac7de05..0f6a49f1 100644
--- a/print-ahcp.c
+++ b/print-ahcp.c
@@ -39,7 +39,6 @@
#include "extract.h"
#include "addrtoname.h"
-static const char tstr[] = " [|ahcp]";
#define AHCP_MAGIC_NUMBER 43
#define AHCP_VERSION_1 1
@@ -121,7 +120,7 @@ invalid:
ND_TCHECK_LEN(cp, ep - cp);
return 0;
trunc:
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
return -1;
}
@@ -139,7 +138,7 @@ invalid:
ND_TCHECK_LEN(cp, ep - cp);
return 0;
trunc:
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
return -1;
}
@@ -163,7 +162,7 @@ invalid:
ND_TCHECK_LEN(cp, ep - cp);
return 0;
trunc:
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
return -1;
}
@@ -187,7 +186,7 @@ invalid:
ND_TCHECK_LEN(cp, ep - cp);
return 0;
trunc:
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
return -1;
}
@@ -211,7 +210,7 @@ invalid:
ND_TCHECK_LEN(cp, ep - cp);
return 0;
trunc:
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
return -1;
}
@@ -235,7 +234,7 @@ invalid:
ND_TCHECK_LEN(cp, ep - cp);
return 0;
trunc:
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
return -1;
}
@@ -296,7 +295,7 @@ invalid:
ND_TCHECK_LEN(cp, ep - cp);
return;
trunc:
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
}
static void
@@ -341,7 +340,7 @@ invalid:
ND_TCHECK_LEN(cp, ep - cp);
return;
trunc:
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
}
void
@@ -408,5 +407,5 @@ invalid:
ND_TCHECK_LEN(cp, ep - cp);
return;
trunc:
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
}