Hi Magnus,
thanks for your answer;
the table referred in my previous mail is wmanif2BsSsPkmAuthTable of
WMAN-IF2-MIB.
The ASN1 description of this table is the following:
...
...
--
-- Table wmanIf2BsSsPkmAuthTable
--
wmanIf2BsSsPkmAuthTable OBJECT-TYPE
SYNTAX SEQUENCE OF WmanIf2BsSsPkmAuthEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"This table describes PKM attributes related
to the authorization for each SS. The BS maintains one
Primary Security Association with each Baseline
Privacy-enabled SS on each BS wireless interface."
::= { wmanIf2BsPkmObjects 2 }
wmanIf2BsSsPkmAuthEntry OBJECT-TYPE
SYNTAX WmanIf2BsSsPkmAuthEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"The BS MUST create one entry per SS per wireless
interface, based on the receipt of an Authorization
Request message and MUST not delete the entry before
the SS authorization permanently expires."
INDEX { ifIndex, wmanIf2BsSsPkmAuthMacAddress }
::= { wmanIf2BsSsPkmAuthTable 1 }
WmanIf2BsSsPkmAuthEntry ::= SEQUENCE {
wmanIf2BsSsPkmAuthMacAddress MacAddress,
wmanIf2BsSsPkmAuthKeySequenceNumber Integer32,
wmanIf2BsSsPkmAuthExpiresOld DateAndTime,
wmanIf2BsSsPkmAuthExpiresNew DateAndTime,
wmanIf2BsSsPkmAuthLifetime Integer32,
wmanIf2BsSsPkmAuthReset INTEGER,
wmanIf2BsSsPkmAuthInfos Counter64,
wmanIf2BsSsPkmAuthRequests Counter64,
wmanIf2BsSsPkmAuthReplies Counter64,
wmanIf2BsSsPkmAuthRejects Counter64,
wmanIf2BsSsPkmAuthInvalids Counter64,
wmanIf2BsSsPkmAuthRejectErrorCode INTEGER,
wmanIf2BsSsPkmAuthRejectErrorString SnmpAdminString,
wmanIf2BsSsPkmAuthInvalidErrorCode INTEGER,
wmanIf2BsSsPkmAuthInvalidErrorString SnmpAdminString,
wmanIf2BsSsPkmAuthPrimarySAId INTEGER,
wmanIf2BsSsPkmAuthValidStatus INTEGER}
wmanIf2BsSsPkmAuthMacAddress OBJECT-TYPE
SYNTAX MacAddress
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"The value of this object is the physical address of the SS
to which the authorization association applies."
::= { wmanIf2BsSsPkmAuthEntry 1 }
wmanIf2BsSsPkmAuthKeySequenceNumber OBJECT-TYPE
SYNTAX Integer32 (0..15)
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The value of this object is the most recent authorization
key sequence number for this SS."
::= { wmanIf2BsSsPkmAuthEntry 2 }
...
...
It seems to have two indexes.
About the generated code, in file wmanif2BsSsPkmAuthTable.h I read:
...
...
/*
* TODO:120:r: |-> Review wmanIf2BsSsPkmAuthTable mib index.
* This structure is used to represent the index for
wmanIf2BsSsPkmAuthTable.
*/
typedef struct wmanIf2BsSsPkmAuthTable_mib_index_s {
/*
* ifIndex(1)/InterfaceIndex/ASN_INTEGER/long(long)//l/A/w/e/R/d/H
*/
long ifIndex;
/*
*
wmanIf2BsSsPkmAuthMacAddress(1)/MacAddress/ASN_OCTET_STR/char(char)//L/a/w/e/R/d/H
*/
char wmanIf2BsSsPkmAuthMacAddress[6];
size_t wmanIf2BsSsPkmAuthMacAddress_len;
} wmanIf2BsSsPkmAuthTable_mib_index;
...
...
Also the source code generated seems to have two indexes.
Regards
---------- Initial Header -----------
>From : "Magnus Fromreide" [EMAIL PROTECTED]
To : "[EMAIL PROTECTED]" [EMAIL PROTECTED]
Cc : "net-snmp-coders" [email protected]
Date : Fri, 07 Dec 2007 03:22:49 +0100
Subject : Re: Problems on a double indexed table
> On tor, 2007-12-06 at 17:05 +0100, [EMAIL PROTECTED] wrote:
> > Hi,
> > I am a novice in net-snmp.
> > I have a problem in a table with the following attributes:
> > ifIndex: foreign key (ifTable)
> > MacAddress: primary key.
> > other attributes...
> > I have generated the source code with mib2c command in MFD mode.
> > I have tryed to put the table data in a two dimensional array in the table
> > module.
> >
> > If I want to view the following table with the table or walk command
> > (I use MIB browser graphical tool), everything works fine:
> >
> > ifIndex | MacAddress | Attr1 | ... other attributes ...
> > 1 000000 1 ...........
> > 2 000001 2 ...........
> > 3 000000 3 ...........
> > 4 000001 4 ...........
> > 5 000000 5 ...........
> > 6 000001 6 ...........
> >
> > If the table is, instead, this:
> >
> > ifIndex | MacAddress | Attr1 | ... other attributes ...
> > 1 000000 1 ...........
> > 1 000001 2 ...........
> > 2 000000 3 ...........
> > 2 000001 4 ...........
> > 3 000000 5 ...........
> > 3 000001 6 ...........
> >
> > and I use the walk command, I get a never ending cycle with the following
> > data:
> >
> > ifIndex | MacAddress | Attr1 | ... other attributes ...
> > 1 000000 1
> > 1 000001 2
> > 1 000001 2
> > 1 000001 2
> > 1 000001 2
> > ......
> >
> > If I use the table command, no data are shown and I get anew a never ending
> > cycle.
> > It seems that the correct behaviour depends on the data order in ifIndex.
> > Have you any suggestions ?
>
> It looks as if your table is indexed on just ifIndex. Could you please
> make sure that the macaddress is part of the index clause for your table
> and that the generated code know this.
>
>
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders