summaryrefslogtreecommitdiffstats
path: root/contrib/tcpdump/print-m3ua.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/tcpdump/print-m3ua.c')
-rw-r--r--contrib/tcpdump/print-m3ua.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/contrib/tcpdump/print-m3ua.c b/contrib/tcpdump/print-m3ua.c
index 33f8777..1f974b2 100644
--- a/contrib/tcpdump/print-m3ua.c
+++ b/contrib/tcpdump/print-m3ua.c
@@ -22,20 +22,20 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#define NETDISSECT_REWORKED
+/* \summary: Message Transfer Part 3 (MTP3) User Adaptation Layer (M3UA) printer */
+
+/* RFC 4666 */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
-#include <tcpdump-stdinc.h>
+#include <netdissect-stdinc.h>
-#include "interface.h"
+#include "netdissect.h"
#include "extract.h"
static const char tstr[] = " [|m3ua]";
-static const char cstr[] = " (corrupt)";
-
-/* RFC 4666 */
#define M3UA_REL_1_0 1
@@ -218,7 +218,7 @@ tag_value_print(netdissect_options *ndo,
case M3UA_PARAM_CORR_ID:
/* buf and size don't include the header */
if (size < 4)
- goto corrupt;
+ goto invalid;
ND_TCHECK2(*buf, size);
ND_PRINT((ndo, "0x%08x", EXTRACT_32BITS(buf)));
break;
@@ -229,8 +229,8 @@ tag_value_print(netdissect_options *ndo,
}
return;
-corrupt:
- ND_PRINT((ndo, "%s", cstr));
+invalid:
+ ND_PRINT((ndo, "%s", istr));
ND_TCHECK2(*buf, size);
return;
trunc:
@@ -259,7 +259,7 @@ m3ua_tags_print(netdissect_options *ndo,
while (p < buf + size) {
if (p + sizeof(struct m3ua_param_header) > buf + size)
- goto corrupt;
+ goto invalid;
ND_TCHECK2(*p, sizeof(struct m3ua_param_header));
/* Parameter Tag */
hdr_tag = EXTRACT_16BITS(p);
@@ -267,7 +267,7 @@ m3ua_tags_print(netdissect_options *ndo,
/* Parameter Length */
hdr_len = EXTRACT_16BITS(p + 2);
if (hdr_len < sizeof(struct m3ua_param_header))
- goto corrupt;
+ goto invalid;
/* Parameter Value */
align = (p + hdr_len - buf) % 4;
align = align ? 4 - align : 0;
@@ -277,8 +277,8 @@ m3ua_tags_print(netdissect_options *ndo,
}
return;
-corrupt:
- ND_PRINT((ndo, "%s", cstr));
+invalid:
+ ND_PRINT((ndo, "%s", istr));
ND_TCHECK2(*buf, size);
return;
trunc:
@@ -305,7 +305,7 @@ m3ua_print(netdissect_options *ndo,
/* size includes the header */
if (size < sizeof(struct m3ua_common_header))
- goto corrupt;
+ goto invalid;
ND_TCHECK(*hdr);
if (hdr->v != M3UA_REL_1_0)
return;
@@ -329,8 +329,8 @@ m3ua_print(netdissect_options *ndo,
m3ua_tags_print(ndo, buf + sizeof(struct m3ua_common_header), EXTRACT_32BITS(&hdr->len) - sizeof(struct m3ua_common_header));
return;
-corrupt:
- ND_PRINT((ndo, "%s", cstr));
+invalid:
+ ND_PRINT((ndo, "%s", istr));
ND_TCHECK2(*buf, size);
return;
trunc:
OpenPOWER on IntegriCloud