www.usr.com/support/gpl/USR9113_release1.0.tar.gz
[bcm963xx.git] / userapps / opensource / net-snmp / agent / mibgroup / mibII / system_mib.c
index eb80c78..8b1c904 100755 (executable)
@@ -53,7 +53,7 @@
 #include "system_mib.h"
 #include "struct.h"
 
 #include "system_mib.h"
 #include "struct.h"
 
-#ifdef BUILD_SNMP_SYSOR_MIB
+#ifdef SNMP_SYSOR_MIB
 #include "sysORTable.h"
 #endif
 
 #include "sysORTable.h"
 #endif
 
@@ -295,7 +295,7 @@ struct variable1 system_variables[] = {
     {VERSION_DESCR, ASN_OCTET_STR, RONLY, var_system, 1, {1}},
     {VERSIONID, ASN_OBJECT_ID, RONLY, var_system, 1, {2}},
     {UPTIME, ASN_TIMETICKS, RONLY, var_system, 1, {3}},
     {VERSION_DESCR, ASN_OCTET_STR, RONLY, var_system, 1, {1}},
     {VERSIONID, ASN_OBJECT_ID, RONLY, var_system, 1, {2}},
     {UPTIME, ASN_TIMETICKS, RONLY, var_system, 1, {3}},
-#ifdef BUILD_SNMP_SET
+#ifdef SNMP_SET
     {SYSCONTACT, ASN_OCTET_STR, RWRITE, var_system, 1, {4}},
     {SYSTEMNAME, ASN_OCTET_STR, RWRITE, var_system, 1, {5}},
     {SYSLOCATION, ASN_OCTET_STR, RWRITE, var_system, 1, {6}},
     {SYSCONTACT, ASN_OCTET_STR, RWRITE, var_system, 1, {4}},
     {SYSTEMNAME, ASN_OCTET_STR, RWRITE, var_system, 1, {5}},
     {SYSLOCATION, ASN_OCTET_STR, RWRITE, var_system, 1, {6}},
@@ -303,8 +303,8 @@ struct variable1 system_variables[] = {
     {SYSCONTACT, ASN_OCTET_STR, RONLY, var_system, 1, {4}},
     {SYSTEMNAME, ASN_OCTET_STR, RONLY, var_system, 1, {5}},
     {SYSLOCATION, ASN_OCTET_STR, RONLY, var_system, 1, {6}},
     {SYSCONTACT, ASN_OCTET_STR, RONLY, var_system, 1, {4}},
     {SYSTEMNAME, ASN_OCTET_STR, RONLY, var_system, 1, {5}},
     {SYSLOCATION, ASN_OCTET_STR, RONLY, var_system, 1, {6}},
-#endif /* BUILD_SNMP_SET */
-#ifdef BUILD_SNMP_SYSOR_MIB
+#endif /* SNMP_SET */
+#ifdef SNMP_SYSOR_MIB
     {SYSSERVICES, ASN_INTEGER, RONLY, var_system, 1, {7}},
     {SYSORLASTCHANGE, ASN_TIMETICKS, RONLY, var_system, 1, {8}}
 #else
     {SYSSERVICES, ASN_INTEGER, RONLY, var_system, 1, {7}},
     {SYSORLASTCHANGE, ASN_TIMETICKS, RONLY, var_system, 1, {8}}
 #else
@@ -429,7 +429,7 @@ init_system_mib(void)
     REGISTER_MIB("mibII/system", system_variables, variable1,
                  system_variables_oid);
 
     REGISTER_MIB("mibII/system", system_variables, variable1,
                  system_variables_oid);
 
-#ifdef BUILD_SNMP_SYSOR_MIB
+#ifdef SNMP_SYSOR_MIB
     if (++system_module_count == 3)
         REGISTER_SYSOR_ENTRY(system_module_oid,
                              "The MIB module for SNMPv2 entities");
     if (++system_module_count == 3)
         REGISTER_SYSOR_ENTRY(system_module_oid,
                              "The MIB module for SNMPv2 entities");
@@ -476,11 +476,11 @@ init_system_mib(void)
         *
         *********************/
 
         *
         *********************/
 
-#ifdef BUILD_SNMP_SYSOR_MIB
+#ifdef SNMP_SYSOR_MIB
 #ifdef USING_MIBII_SYSORTABLE_MODULE
 extern struct timeval sysOR_lastchange;
 #endif
 #ifdef USING_MIBII_SYSORTABLE_MODULE
 extern struct timeval sysOR_lastchange;
 #endif
-#endif /* BUILD_SNMP_SYSOR_MIB */
+#endif /* SNMP_SYSOR_MIB */
 
 u_char         *
 var_system(struct variable *vp,
 
 u_char         *
 var_system(struct variable *vp,
@@ -506,7 +506,7 @@ var_system(struct variable *vp,
         return ((u_char *) & ulret);
     case SYSCONTACT:
         *var_len = strlen(sysContact);
         return ((u_char *) & ulret);
     case SYSCONTACT:
         *var_len = strlen(sysContact);
-#ifdef BUILD_SNMP_SET
+#ifdef SNMP_SET
         *write_method = writeSystem;
 #else
         *write_method = NULL;
         *write_method = writeSystem;
 #else
         *write_method = NULL;
@@ -514,7 +514,7 @@ var_system(struct variable *vp,
         return (u_char *) sysContact;
     case SYSTEMNAME:
         *var_len = strlen(sysName);
         return (u_char *) sysContact;
     case SYSTEMNAME:
         *var_len = strlen(sysName);
-#ifdef BUILD_SNMP_SET
+#ifdef SNMP_SET
         *write_method = writeSystem;
 #else
         *write_method = NULL;
         *write_method = writeSystem;
 #else
         *write_method = NULL;
@@ -522,7 +522,7 @@ var_system(struct variable *vp,
         return (u_char *) sysName;
     case SYSLOCATION:
         *var_len = strlen(sysLocation);
         return (u_char *) sysName;
     case SYSLOCATION:
         *var_len = strlen(sysLocation);
-#ifdef BUILD_SNMP_SET
+#ifdef SNMP_SET
         *write_method = writeSystem;
 #else
         *write_method = NULL;
         *write_method = writeSystem;
 #else
         *write_method = NULL;
@@ -536,13 +536,13 @@ var_system(struct variable *vp,
         long_return = sysServices;
         return (u_char *) & long_return;
 
         long_return = sysServices;
         return (u_char *) & long_return;
 
-#ifdef BUILD_SNMP_SYSOR_MIB
+#ifdef SNMP_SYSOR_MIB
 #ifdef USING_MIBII_SYSORTABLE_MODULE
     case SYSORLASTCHANGE:
         ulret = netsnmp_timeval_uptime(&sysOR_lastchange);
         return ((u_char *) & ulret);
 #endif
 #ifdef USING_MIBII_SYSORTABLE_MODULE
     case SYSORLASTCHANGE:
         ulret = netsnmp_timeval_uptime(&sysOR_lastchange);
         return ((u_char *) & ulret);
 #endif
-#endif /* BUILD_SNMP_SYSOR_MIB */
+#endif /* SNMP_SYSOR_MIB */
     default:
         DEBUGMSGTL(("snmpd", "unknown sub-id %d in var_system\n",
                     vp->magic));
     default:
         DEBUGMSGTL(("snmpd", "unknown sub-id %d in var_system\n",
                     vp->magic));
@@ -551,7 +551,7 @@ var_system(struct variable *vp,
 }
 
 
 }
 
 
-#ifdef BUILD_SNMP_SET
+#ifdef SNMP_SET
 int
 writeSystem(int action,
             u_char * var_val,
 int
 writeSystem(int action,
             u_char * var_val,
@@ -652,7 +652,7 @@ writeSystem(int action,
     }
     return SNMP_ERR_NOERROR;
 }                               /* end of writeSystem */
     }
     return SNMP_ERR_NOERROR;
 }                               /* end of writeSystem */
-#endif /* BUILD_SNMP_SET */
+#endif /* SNMP_SET */
 
         /*********************
         *
 
         /*********************
         *