]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Update a ndo flag name
authorFrancois-Xavier Le Bail <[email protected]>
Wed, 9 Sep 2015 11:26:34 +0000 (13:26 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Wed, 9 Sep 2015 11:32:20 +0000 (13:32 +0200)
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/.

netdissect.h
print-snmp.c
tcpdump.c

index 748743c3eea7a3e4d00c0e17162bf5a84aceb065..861957d84a96f3d77cb5d32bfc60f0fdb7133ca2 100644 (file)
@@ -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 */
index e6141ca4df7331dd2caa309980a5298172d3ff6e..43464c184557a3d64d2658bc01933f7ff945a7d4 100644 (file)
@@ -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)
index a1ca0e59008c9af64c26e98342396cfc6d4f9d15..c7cf17550b87559461ce33fa63b138b9d19473d0 100644 (file)
--- 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);