~ubuntu-branches/ubuntu/trusty/net-snmp/trusty

« back to all changes in this revision

Viewing changes to agent/mibgroup/kernel_sunos5.c

  • Committer: Bazaar Package Importer
  • Author(s): Jochen Friedrich
  • Date: 2010-06-10 18:02:54 UTC
  • mto: (1.4.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 44.
  • Revision ID: james.westby@ubuntu.com-20100610180254-6ezvupl2clicwdqf
ImportĀ upstreamĀ versionĀ 5.4.3~dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
static
82
82
mibcache        Mibcache[MIBCACHE_SIZE+1] = {
83
83
    {MIB_SYSTEM, 0, (void *) -1, 0, 0, 0, 0},
84
 
    {MIB_INTERFACES, 10 * sizeof(mib2_ifEntry_t), (void *) -1, 0, 30, 0,
 
84
    {MIB_INTERFACES, 50 * sizeof(mib2_ifEntry_t), (void *) -1, 0, 30, 0,
85
85
     0},
86
86
    {MIB_AT, 0, (void *) -1, 0, 0, 0, 0},
87
87
    {MIB_IP, sizeof(mib2_ip_t), (void *) -1, 0, 60, 0, 0},
904
904
    req = (struct opthdr *)(tor + 1);
905
905
    req->level = groupname;
906
906
    req->name = subgroupname;
 
907
    /*
 
908
     * non-zero len field is used to request extended MIB statistics
 
909
     * on Solaris 10 Update 4 and later. The LEGACY_MIB_SIZE macro is only
 
910
     * available for S10U4+, so we use that to see what action to take.
 
911
     */
 
912
#ifdef LEGACY_MIB_SIZE
 
913
    req->len = 1;       /* ask for extended MIBs */
 
914
#else
907
915
    req->len = 0;
 
916
#endif
908
917
    strbuf.len = tor->OPT_length + tor->OPT_offset;
909
918
    flags = 0;
910
919
    if ((rc = putmsg(sd, &strbuf, NULL, flags))) {
1746
1755
    if (ifp->ifType == 24)  /* Loopback */
1747
1756
        return (0);
1748
1757
 
1749
 
    if (getKstatInt(NULL, name, "ierrors", &ifp->ifInErrors) != 0) {
1750
 
        return (-1);
1751
 
    }
1752
 
 
1753
 
    if (getKstatInt(NULL, name, "oerrors", &ifp->ifOutErrors) != 0) {
1754
 
        return (-1);
1755
 
    }
 
1758
    /* some? VLAN interfaces don't have error counters, so ignore failure */
 
1759
    getKstatInt(NULL, name, "ierrors", &ifp->ifInErrors);
 
1760
    getKstatInt(NULL, name, "oerrors", &ifp->ifOutErrors);
1756
1761
 
1757
1762
    /* Try to grab some additional information */
1758
1763
    getKstatInt(NULL, name, "collisions", &ifp->ifCollisions);