www.usr.com/support/gpl/USR9113_release1.0.tar.gz
[bcm963xx.git] / userapps / opensource / net-snmp / agent / mibgroup / mibII / interfaces.c
index 3c8abb1..3f03184 100755 (executable)
 #include "struct.h"
 #include "util_funcs.h"
 
 #include "struct.h"
 #include "util_funcs.h"
 
-#ifdef BUILD_SNMP_SYSOR_MIB
+#ifdef SNMP_SYSOR_MIB
 #include "sysORTable.h"
 #endif
 
 #include "sysORTable.h"
 #endif
 
+#include "../../../../../kernel/linux/include/linux/sockios.h" // BRCM global socket ioctl
 #include <bcmtypes.h>
 #include <bcmatmapi.h>
 #include <bcmnet.h>
 #include <bcmtypes.h>
 #include <bcmatmapi.h>
 #include <bcmnet.h>
@@ -217,11 +218,11 @@ struct variable3 interfaces_variables[] = {
     {IFMTU, ASN_INTEGER, RONLY, var_ifEntry, 3, {2, 1, 4}},
     {IFSPEED, ASN_GAUGE, RONLY, var_ifEntry, 3, {2, 1, 5}},
     {IFPHYSADDRESS, ASN_OCTET_STR, RONLY, var_ifEntry, 3, {2, 1, 6}},
     {IFMTU, ASN_INTEGER, RONLY, var_ifEntry, 3, {2, 1, 4}},
     {IFSPEED, ASN_GAUGE, RONLY, var_ifEntry, 3, {2, 1, 5}},
     {IFPHYSADDRESS, ASN_OCTET_STR, RONLY, var_ifEntry, 3, {2, 1, 6}},
-#ifdef BUILD_SNMP_SET
+#ifdef SNMP_SET
     {IFADMINSTATUS, ASN_INTEGER, RWRITE, var_ifEntry, 3, {2, 1, 7}}, /* brcm, linux can write */
 #else
     {IFADMINSTATUS, ASN_INTEGER, RONLY, var_ifEntry, 3, {2, 1, 7}}, 
     {IFADMINSTATUS, ASN_INTEGER, RWRITE, var_ifEntry, 3, {2, 1, 7}}, /* brcm, linux can write */
 #else
     {IFADMINSTATUS, ASN_INTEGER, RONLY, var_ifEntry, 3, {2, 1, 7}}, 
-#endif /* BUILD_SNMP_SET */
+#endif /* SNMP_SET */
     {IFOPERSTATUS, ASN_INTEGER, RONLY, var_ifEntry, 3, {2, 1, 8}},
     {IFLASTCHANGE, ASN_TIMETICKS, RONLY, var_ifEntry, 3, {2, 1, 9}},
     {IFINOCTETS, ASN_COUNTER, RONLY, var_ifEntry, 3, {2, 1, 10}},
     {IFOPERSTATUS, ASN_INTEGER, RONLY, var_ifEntry, 3, {2, 1, 8}},
     {IFLASTCHANGE, ASN_TIMETICKS, RONLY, var_ifEntry, 3, {2, 1, 9}},
     {IFINOCTETS, ASN_COUNTER, RONLY, var_ifEntry, 3, {2, 1, 10}},
@@ -258,10 +259,10 @@ init_interfaces(void)
      */
     REGISTER_MIB("mibII/interfaces", interfaces_variables, variable3,
                  interfaces_variables_oid);
      */
     REGISTER_MIB("mibII/interfaces", interfaces_variables, variable3,
                  interfaces_variables_oid);
-#ifdef BUILD_SNMP_SYSOR_MIB
+#ifdef SNMP_SYSOR_MIB
     REGISTER_SYSOR_ENTRY(interfaces_module_oid,
                          "The MIB module to describe generic objects for network interface sub-layers");
     REGISTER_SYSOR_ENTRY(interfaces_module_oid,
                          "The MIB module to describe generic objects for network interface sub-layers");
-#endif /* BUILD_SNMP_SYSOR_MIB */
+#endif /* SNMP_SYSOR_MIB */
 
     snmpd_register_config_handler("interface", parse_interface_config,
                                   free_interface_config,
 
     snmpd_register_config_handler("interface", parse_interface_config,
                                   free_interface_config,
@@ -448,12 +449,12 @@ header_ifEntry(struct variable *vp,
     memcpy((char *) name, (char *) newname,
            ((int) vp->namelen + 1) * sizeof(oid));
     *length = vp->namelen + 1;
     memcpy((char *) name, (char *) newname,
            ((int) vp->namelen + 1) * sizeof(oid));
     *length = vp->namelen + 1;
-#ifdef BUILD_SNMP_SET
+#ifdef SNMP_SET
     /* brcm: write is now supported on linux as well */
     *write_method = writeIfEntry;
 #else
     *write_method = NULL;
     /* brcm: write is now supported on linux as well */
     *write_method = writeIfEntry;
 #else
     *write_method = NULL;
-#endif /* BUILD_SNMP_SET */
+#endif /* SNMP_SET */
     *var_len = sizeof(long);    /* default to 'long' results */
 
     DEBUGMSGTL(("mibII/interfaces", "... get I/F stats "));
     *var_len = sizeof(long);    /* default to 'long' results */
 
     DEBUGMSGTL(("mibII/interfaces", "... get I/F stats "));
@@ -2954,7 +2955,7 @@ writeIfEntry(int action,
 #endif                          /* WIN32 */
 
 #ifdef linux
 #endif                          /* WIN32 */
 
 #ifdef linux
-#ifdef BUILD_SNMP_SET
+#ifdef SNMP_SET
 static int setPppConnAdminDown(char *devName);
 int
 writeIfEntry(int action,
 static int setPppConnAdminDown(char *devName);
 int
 writeIfEntry(int action,
@@ -3076,5 +3077,5 @@ int setPppConnAdminDown(char *devName)
 
   return status;
 }
 
   return status;
 }
-#endif /* BUILD_SNMP_SET */
+#endif /* SNMP_SET */
 #endif /* linux */
 #endif /* linux */