Annotation of 43BSDReno/contrib/isode-beta/snmp/gawk-2.11/s-netstat/mib.interfaces, revision 1.1

1.1     ! root        1: BEGIN {
        !             2:        printf "%-4s %-4s %-14s %-15s %-7s %-5s %-7s %-5s %-4s %-5s\n",
        !             3:                "Name",
        !             4:                     "Mtu",
        !             5:                          "Net/Dest",
        !             6:                                "Address",
        !             7:                                      "Ipkts",
        !             8:                                          "Ierrs",
        !             9:                                               "Opkts",
        !            10:                                                     "Oerrs",
        !            11:                                                          "Drop",
        !            12:                                                               "Queue";
        !            13: 
        !            14:        didone = 0;
        !            15:        for (i in ifIndex) {
        !            16:            didone = 1;
        !            17: 
        !            18:            dest = "";
        !            19:            addr = "";
        !            20:            for (j in ipAdEntAddr) {
        !            21:                if (ipAdEntIfIndex == ifIndex) {
        !            22:                    split(addr = ipAdEntAddr, a, ".");
        !            23:                    split(ipAdEntNetMask, b, ".");
        !            24:                    dest = bit_and(a[1],b[1]) "." \
        !            25:                           bit_and(a[2],b[2]) "." \
        !            26:                           bit_and(a[3],b[3]) "." \
        !            27:                           bit_and(a[4],b[4]);
        !            28:                    break;
        !            29:                }
        !            30:            }
        !            31: 
        !            32:            printf (length(ifDescr) <= 4 ? "%-4s " : "%s\n     "),
        !            33:                ifDescr;
        !            34:            printf      "%-4d %-14s %-15s %-7d %-5d %-7d %-5d %-4d %-5d\n",
        !            35:                         ifMtu,
        !            36:                              dest,
        !            37:                                    addr,
        !            38:                                          ifInUcastPkts+ifInNUcastPkts,
        !            39:                                               ifInErrors,
        !            40:                                                    ifOutUcastPkts+ifOutNUcastPkts,
        !            41:                                                         ifOutErrors,
        !            42:                                                              ifOutDiscards,
        !            43:                                                                   ifOutQLen;
        !            44:            if (oflag)
        !            45:                for (j in clnpAdEntAddr) {
        !            46:                    if (clnpAdEntIfIndex == ifIndex) {
        !            47:                        printf "%-4s %-5s %-14s NS+%s\n",
        !            48:                               "",  "",  "",   clnpAdEntAddr;
        !            49:                        break;
        !            50:                    }
        !            51:                }
        !            52:        }
        !            53:        if (!didone && DIAGNOSTIC)
        !            54:            printf "ifTable: %s\n", DIAGNOSTIC;
        !            55: 
        !            56:       }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.