From: Francois-Xavier Le Bail Date: Wed, 9 Sep 2015 11:26:34 +0000 (+0200) Subject: Update a ndo flag name X-Git-Tag: tcpdump-4.8.0~157 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/a306c9e7be719a9839686e71e6217f822bd98813 Update a ndo flag name Even if frontend/backend separation is ongoing, keep coherence between option name and flag name at the moment. Option name is 'm', thus s/ndo_sflag/ndo_mflag/. --- diff --git a/netdissect.h b/netdissect.h index 748743c3..861957d8 100644 --- a/netdissect.h +++ b/netdissect.h @@ -94,7 +94,7 @@ struct netdissect_options { int ndo_nflag; /* leave addresses as numbers */ int ndo_Nflag; /* remove domains from printed host names */ int ndo_qflag; /* quick (shorter) output */ - int ndo_sflag; /* use the libsmi to translate OIDs */ + int ndo_mflag; /* use the libsmi to translate OIDs */ int ndo_Sflag; /* print raw TCP sequence numbers */ int ndo_tflag; /* print packet arrival time */ int ndo_uflag; /* Print undecoded NFS handles */ diff --git a/print-snmp.c b/print-snmp.c index e6141ca4..43464c18 100644 --- a/print-snmp.c +++ b/print-snmp.c @@ -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) diff --git a/tcpdump.c b/tcpdump.c index a1ca0e59..c7cf1755 100644 --- a/tcpdump.c +++ b/tcpdump.c @@ -959,7 +959,7 @@ main(int argc, char **argv) if (smiLoadModule(optarg) == 0) { error("could not load MIB module %s", optarg); } - ndo->ndo_sflag = 1; + ndo->ndo_mflag = 1; #else (void)fprintf(stderr, "%s: ignoring option `-m %s' ", program_name, optarg);