X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/486704db7c840dcfb51f70f1812d9c3ad37ad39c..d6aacc676d8540f31d1df72b12b43fc9cde93df6:/print-snmp.c?ds=inline diff --git a/print-snmp.c b/print-snmp.c index f348cd3b..a2aa0742 100644 --- a/print-snmp.c +++ b/print-snmp.c @@ -60,7 +60,7 @@ #include "config.h" #endif -#include +#include #include #include @@ -69,7 +69,7 @@ #include #endif -#include "interface.h" +#include "netdissect.h" #undef OPAQUE /* defined in */ @@ -679,7 +679,7 @@ asn1_print(netdissect_options *ndo, int o = 0, first = -1; i = asnlen; - if (!ndo->ndo_sflag && !ndo->ndo_nflag && asnlen > 2) { + if (!ndo->ndo_mflag && !ndo->ndo_nflag && asnlen > 2) { const struct obj_abrev *a = &obj_abrev_list[0]; size_t a_len = strlen(a->oid); for (; a->node; a++) { @@ -695,7 +695,7 @@ asn1_print(netdissect_options *ndo, } } - for (; !ndo->ndo_sflag && i-- > 0; p++) { + for (; !ndo->ndo_mflag && i-- > 0; p++) { ND_TCHECK(*p); o = (o << ASN_SHIFT7) + (*p & ~ASN_BIT8); if (*p & ASN_LONGLEN) @@ -901,7 +901,7 @@ smi_decode_oid(netdissect_options *ndo, int o = 0, first = -1, i = asnlen; unsigned int firstval; - for (*oidlen = 0; ndo->ndo_sflag && i-- > 0; p++) { + for (*oidlen = 0; ndo->ndo_mflag && i-- > 0; p++) { ND_TCHECK(*p); o = (o << ASN_SHIFT7) + (*p & ~ASN_BIT8); if (*p & ASN_LONGLEN) @@ -1054,7 +1054,7 @@ smi_print_variable(netdissect_options *ndo, static int smi_print_value(netdissect_options *ndo, - SmiNode *smiNode, u_char pduid, struct be *elem) + SmiNode *smiNode, u_short pduid, struct be *elem) { unsigned int i, oid[128], oidlen; SmiType *smiType; @@ -1197,7 +1197,7 @@ smi_print_value(netdissect_options *ndo, */ static void varbind_print(netdissect_options *ndo, - u_char pduid, const u_char *np, u_int length) + u_short pduid, const u_char *np, u_int length) { struct be elem; int count = 0, ind;