|
Hi!
1. Under stationConfigTable
there is stationConfigTableEntry, when i say snmpwalk on
stationConfigTable walk is performing good. when i perform snmpwalk
on stationConfigTableEntry, it is not performing, even i added debug
statements, what i found is, it is walking upto one variable after
one variable(i.e., upto mediumOccupancyLimit) it is stopping, what
coud be the reason. below i have attached var_XXX function.
2.when
i am trying to get single variable using snmpget,get is not
performing.
3. I want know to
how to add instances ie., ifIndex to below routine, i'm not
getting any idea
unsigned char
* var_dot11StationConfigTable(struct variable
*vp,
oid *
name,
size_t
*length,
int
exact,
size_t *var_len, WriteMethod **
write_method) { snmp_print_log("\n %s \n
",__FUNCTION__);
//snmp_print_log("name ::%d\n
",*name); /* *
variables we may use later
*/ static long
long_ret; static u_long
ulong_ret; unsigned long i = 0; static
int ifIndex=1; static
unsigned char string[SPRINT_MAX_LEN]; static
oid
objid[MAX_OID_LEN]; static struct counter64
c64; stationConfigTable
*station_table;
station_table=(stationConfigTable
*)malloc(sizeof(stationConfigTable));
station_table=set_default_values();
if
(header_simple_table(vp, name, length, exact, var_len,
write_method,ifIndex))
return NULL; snmp_print_log("header_simple_table
::\n");
/* * this is where we do the value
assignments for the mib results.
*/ switch (vp->magic) { #if
0 case
DOT11STATIONID:
*write_method =
write_dot11StationID;
*var_len=
strlen(station_table->station);
/* XXX */ return
(u_char *) & VAR; #endif case
DOT11MEDIUMOCCUPANCYLIMIT: snmp_print_log("DOT11MEDIUMOCCUPANCYLIMIT
\n"); *var_len=sizeof(station_table->mediumOccupancyLimit); *write_method
=
write_dot11MediumOccupancyLimit; snmp_print_log("mediumOccupancyLimit
:: %d",station_table->mediumOccupancyLimit); return
(u_char *)
&station_table->mediumOccupancyLimit;
case
DOT11CFPOLLABLE: snmp_print_log("DOT11CFPOLLABLE
\n"); *var_len=sizeof(station_table->cfPollable);
/* XXX */ return (u_char *)
&station_table->cfPollable; case
DOT11CFPPERIOD: *var_len=sizeof(station_table->cfpPeriod); *write_method
= write_dot11CFPPeriod; return (u_char * )
&station_table->cfpPeriod; /* XXX
*/
case
DOT11CFPMAXDURATION: *var_len=sizeof(station_table->cfpMaxDuration); *write_method
= write_dot11CFPMaxDuration; return (u_char * )
&station_table->cfpMaxDuration;
case
DOT11AUTHENTICATIONRESPONSETIMEOUT: *var_len=sizeof(station_table->authRespTimeOut);
*write_method =
write_dot11AuthenticationResponseTimeOut; return
(u_char * )
&station_table->authRespTimeOut;
case
DOT11PRIVACYOPTIONIMPLEMENTED: *var_len=sizeof(station_table->privacyOptionImplemented); return
(u_char* )
&station_table->privacyOptionImplemented;
case
DOT11POWERMANAGEMENTMODE: *var_len=sizeof(station_table->powerMgmtMode);
*write_method =
write_dot11PowerManagementMode; return (u_char* )
&station_table->powerMgmtMode;
case
DOT11DESIREDSSID: *var_len =
strlen(station_table->desiredSsid);
*write_method =
write_dot11DesiredSSID;
return (u_char* )
station_table->desiredSsid;
case
DOT11DESIREDBSSTYPE: *var_len=sizeof(station_table->desiredBssType); *write_method
= write_dot11DesiredBSSType; return (u_char * )
&station_table->desiredBssType;
case
DOT11OPERATIONALRATESET: *var_len = strlen
(station_table->operationalRateSet); *write_method
=
write_dot11OperationalRateSet;
return (u_char* )
station_table->operationalRateSet;
case
DOT11BEACONPERIOD: *var_len=sizeof(station_table->beaconPeriod);
*write_method = write_dot11BeaconPeriod; return
(u_char* )
&station_table->beaconPeriod;
case
DOT11DTIMPERIOD: *var_len=sizeof(station_table->dtimPeriod); *write_method
= write_dot11DTIMPeriod; return (u_char* )
&station_table->dtimPeriod;
case
DOT11ASSOCIATIONRESPONSETIMEOUT: *var_len=sizeof(station_table->associationResponseTimeOut); *write_method
= write_dot11AssociationResponseTimeOut; return
(u_char* )
&station_table->associationResponseTimeOut;
case
DOT11DISASSOCIATEREASON: *var_len=sizeof(station_table->disassociateReason); return
(u_char* )
&station_table->disassociateReason;
case
DOT11DISASSOCIATESTATION:
*var_len=strlen(station_table->disassociateStation); return
(u_char * )&station_table->disassociateStation
; case
DOT11DEAUTHENTICATEREASON: *var_len=sizeof(station_table->deauthenticateReason);
return (u_char* )
&station_table->deauthenticateReason;
case
DOT11DEAUTHENTICATESTATION: *var_len=
strlen(station_table->deauthenticateStation); return
(u_char *
)&(station_table->deauthenticateStation);
case
DOT11AUTHENTICATEFAILSTATUS: *var_len=sizeof(station_table->authenticateFailStatus); return
(u_char* )
&station_table->authenticateFailStatus;
case
DOT11AUTHENTICATEFAILSTATION: *var_len=
strlen(station_table->authenticateFailStation); return
(u_char*
)&(station_table->authenticateFailStation);
case
DOT11MULTIDOMAINCAPABILITYIMPLEMENTED: *write_method
=
write_dot11MultiDomainCapabilityImplemented; *var_len=sizeof(station_table->multiDomainCapabilityImplemented); return
(u_char* )
&station_table->multiDomainCapabilityImplemented;
case
DOT11MULTIDOMAINCAPABILITYENABLED: *var_len=sizeof(station_table->multiDomainCapabilityEnabled); *write_method
=
write_dot11MultiDomainCapabilityEnabled; return
(u_char* )
&station_table->multiDomainCapabilityEnabled;
case
DOT11COUNTRYSTRING: *var_len=strlen(station_table->countryString); return
(u_char *
)station_table->countryString;
default:
ERROR_MSG("");
} free(station_table);
return NULL; }
|