This is a discussion on about the problem of index within the SNMP Coders forums, part of the Networking and Network Related category; --===============1920737901== Content-Type: multipart/alternative; boundary="----=_Part_202862_6293869.1174641757607" ------=_Part_202862_6293869.1174641757607 Content-Type: text/plain; charset=ISO-8859-1; ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
--===============1920737901==
Content-Type: multipart/alternative; boundary="----=_Part_202862_6293869.1174641757607" ------=_Part_202862_6293869.1174641757607 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Dear All: I am Clement. I meet a problem about write 802dot11MIB table. the MIB is as following: __________________________________________________ _________________________________________ [802dot11MIB-dot11GroupAddressesTable]: dot11GroupAddressesTable OBJECT-TYPE SYNTAX SEQUENCE OF Dot11GroupAddressesEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION "A conceptual table containing a set of MAC addresses identifying the multicast addresses for which this STA will receive frames. The default value of this attribute shall be null." ::= { dot11mac 3 } dot11GroupAddressesEntry OBJECT-TYPE SYNTAX Dot11GroupAddressesEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION "An Entry (conceptual row) in the Group Addresses Table. ifIndex - Each IEEE 802.11 interface is represented by an ifEntry. Interface tables in this MIB module are indexed by ifIndex." INDEX { ifIndex, dot11GroupAddressesIndex} ::= { dot11GroupAddressesTable 1 } Dot11GroupAddressesEntry ::= SEQUENCE { dot11GroupAddressesIndex Integer32, dot11Address MacAddress, dot11GroupAddressesStatus RowStatus } dot11GroupAddressesIndex OBJECT-TYPE SYNTAX Integer32 MAX-ACCESS not-accessible STATUS current DESCRIPTION "The auxiliary variable used to identify instances of the columnar objects in the Group Addresses Table." ::= { dot11GroupAddressesEntry 1 } dot11Address OBJECT-TYPE SYNTAX MacAddress MAX-ACCESS read-create STATUS current DESCRIPTION "MAC address identifying a multicast addresses from which this STA will receive frames." ::= { dot11GroupAddressesEntry 2 } dot11GroupAddressesStatus OBJECT-TYPE SYNTAX RowStatus MAX-ACCESS read-create STATUS current DESCRIPTION "The status column used for creating, modifying, and deleting instances of the columnar objects in the Group Addresses Table." DEFVAL { active } ::= { dot11GroupAddressesEntry 3 } ----------------------------------------------------------------------------------- the problem is about dot11GroupAddressesIndex, I don't know how to implement this object exactly. To implement it, i write the codes as belowing: [Implementation] typedef struct { int index; char wifi_Address[6]; /* MacAddress */ char wifi_GroupAddressesStatus; /*RowStatus*/ }dot11GroupAddressesTable; netsnmp_variable_list * dot11StationConfigTable_get_first_data_point(void **my_loop_context, void **my_data_context, netsnmp_variable_list * put_index_data, netsnmp_iterator_info *mydata) { netsnmp_variable_list *vptr; LoopContext = 1; dot11GroupAddressesTable[LoopContext].index = LoopContext; *my_loop_context = &LoopContext; vptr = put_index_data; snmp_set_var_value(vptr, (u_char *)&LoopContext, sizeof(LoopContext)); vptr = vptr->next_variable; return put_index_data; } ---------------------------------------------------------------- When I perform snmpwork, I got the following result: IEEE802dot11-MIB::dot11GroupAddressesStatus.1.0 = INTEGER: active(1) IEEE802dot11-MIB::dot11GroupAddressesStatus.2.0 = INTEGER: active(1) IEEE802dot11-MIB::dot11GroupAddressesStatus.3.0 = INTEGER: active(1) IEEE802dot11-MIB::dot11GroupAddressesStatus.4.0 = INTEGER: active(1) but the exact result should be IEEE802dot11-MIB::dot11GroupAddressesStatus.1 = INTEGER: active(1) IEEE802dot11-MIB::dot11GroupAddressesStatus.2 = INTEGER: active(1) IEEE802dot11-MIB::dot11GroupAddressesStatus.3 = INTEGER: active(1) IEEE802dot11-MIB::dot11GroupAddressesStatus.4 = INTEGER: active(1) I don't realize how to solve this problem , can any one give me suggestion? thank you. Best Regards, Clement Hsu ------=_Part_202862_6293869.1174641757607 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Dear All:<br><br>I am Clement. I meet a problem about write 802dot11MIB table. the MIB is as following:<br><br><br>____________________________ __________________________________________________ _____________<br><br>[802dot11MIB-dot11GroupAddressesTable]: <br><br>dot11GroupAddressesTable OBJECT-TYPE<br> SYNTAX SEQUENCE OF Dot11GroupAddressesEntry <br> MAX-ACCESS not-accessible<br> STATUS current<br> &nb sp; DESCRIPTION<br>   ; "A conceptual table containing a set of MAC addresses<br> & nbsp; identifying the multicast addresses for which this STA <br> &nbs p; will receive frames. The default value of this attribute<br> & nbsp; shall be null."<br> ::= { dot11mac 3 }<br><br>dot11GroupAddressesEntry OBJECT-TYPE<br> SYNTAX Dot11GroupAddressesEntry <br> MAX-ACCESS not-accessible<br> STATUS current<br> &nb sp; DESCRIPTION<br>   ; "An Entry (conceptual row) in the Group Addresses Table.<br><br> ifIndex - Each IEEE 802.11 interface is represented by an <br> &nbs p; ifEntry. Interface tables in this MIB module are indexed<br> &nb sp; by ifIndex."<br> &n bsp; INDEX { ifIndex, <br> &nbs p; dot11GroupAddressesIndex}<br> ::= { dot11GroupAddressesTable 1 } <br><br>Dot11GroupAddressesEntry ::= <br> SEQUENCE { dot11GroupAddressesIndex   ; Integer32,<br> dot11Address &n bsp; &nbs p; MacAddress,<br>   ; dot11GroupAddressesStatus RowStatus } <br><br>dot11GroupAddressesIndex OBJECT-TYPE<br> SYNTAX Integer32<br> & nbsp; MAX-ACCESS not-accessible<br> STATUS current<br> &nb sp; DESCRIPTION<br>   ; "The auxiliary variable used to identify instances <br> &nbs p; of the columnar objects in the Group Addresses Table."<br> ::= { dot11GroupAddressesEntry 1 }<br><br>dot11Address OBJECT-TYPE<br> SYNTAX MacAddress<br> MAX-ACCESS read-create<br> &nbs p; STATUS current <br> DESCRIPTION<br>   ; "MAC address identifying a multicast addresses<br> & nbsp; from which this STA will receive frames."<br> ::= { dot11GroupAddressesEntry 2 }<br><br>dot11GroupAddressesStatus OBJECT-TYPE <br> SYNTAX RowStatus<br> & nbsp; MAX-ACCESS read-create<br> &nbs p; STATUS current<br> &nb sp; DESCRIPTION<br>   ; "The status column used for creating, modifying, and<br> & nbsp; deleting instances of the columnar objects in the Group <br> &nbs p; Addresses Table."<br> &nbs p; DEFVAL { active }<br> ::= { dot11GroupAddressesEntry 3 }<br><br><br><br><br><br><br><br><br><br>----------------------------------------------------------------------------------- <br><br><br>the problem is about dot11GroupAddressesIndex, I don't know how to implement <br>this object exactly. To implement it, i write the codes as belowing:<br><br><br><br><br>[Implementation]<br><br><br><br><br> typedef struct<br>{<br>int index;<br>char wifi_Address[6]; /* MacAddress */<br>char wifi_GroupAddressesStatus; /*RowStatus*/<br>}dot11GroupAddressesTable;<br><br><br><br><br> <br><br><br>netsnmp_variable_list *<br>dot11StationConfigTable_get_first_data_point( void **my_loop_context, <br> &nbs p; &n bsp; &nbs p; void **my_data_context,<br> &nbs p; &n bsp; &nbs p; netsnmp_variable_list * <br> &nbs p; &n bsp; &nbs p; put_index_data,<br> & nbsp; &nb sp;   ; & nbsp; &nb sp; netsnmp_iterator_info *mydata)<br>{<br><br> netsnmp_variable_list *vptr;<br><br> LoopContext = 1;<br> <br> dot11GroupAddressesTable[LoopContext].index = LoopContext;<br> *my_loop_context = &LoopContext; <br> <br> vptr = put_index_data;<br> <br> snmp_set_var_value(vptr, (u_char *)&LoopContext, sizeof(LoopContext));<br> vptr = vptr->next_variable;<br><br><br>   ; return put_index_data;<br>}<br><br><br>---------------------------------------------------------------- <br><br>When I perform snmpwork, I got the following result:<br><br>IEEE802dot11-MIB::dot11GroupAddressesStatus.1.0 = INTEGER: active(1)<br> IEEE802dot11-MIB::dot11GroupAddressesStatus.2.0 = INTEGER: active(1)<br>IEEE802dot11-MIB::dot11GroupAddressesStatus.3.0 = INTEGER: active(1)<br> IEEE802dot11-MIB::dot11GroupAddressesStatus.4.0 = INTEGER: active(1)<br><br><br>but the exact result should be <br><br>IEEE802dot11-MIB::dot11GroupAddressesStatus.1 = INTEGER: active(1)<br> IEEE802dot11-MIB::dot11GroupAddressesStatus.2 = INTEGER: active(1)<br> IEEE802dot11-MIB::dot11GroupAddressesStatus.3 = INTEGER: active(1)<br> IEEE802dot11-MIB::dot11GroupAddressesStatus.4 = INTEGER: active(1)<br><br><br>I don't realize how to solve this problem , can any one give me suggestion? thank you.<br><br>Best Regards,<br>Clement Hsu<br><br> ------=_Part_202862_6293869.1174641757607-- --===============1920737901== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?p...rge&CID=DEVDEV --===============1920737901== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/...et-snmp-coders --===============1920737901==-- |