Re: "accessible-for-notify" snmpwalk problem
Jaques Arantes <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <CAGWTGm0FJKDK8tfYM_1XqNFtv5ei5G825HouyzDEevRhjLQLLQ@mail.gmail.com> |
I ignored the "accessible-for-notify" flag in the MIB and changed the
agenty by hand so that it acts as if the columns were "read-only":
case COLUMN_AWODUCHANNELINDEX:
{
fprintf( stderr, "\n[%s():%u] COLUMN_AWODUCHANNELINDEX. MinCol = %d;
MaxCol = %d.", __FUNCTION__, __LINE__,
tblnfo->reg_info->max_column, tblnfo->reg_info->min_column );
snmp_set_var_typed_value(
request->requestvb, ASN_INTEGER,
( u_char * )&( tblnfo->colnum ), sizeof( tblnfo->colnum
) );
break;
}
With this, I can `snmpwalk`, but not `snmptable`.
The agent prints:
[awOduChannelTable_handler():293] COLUMN_AWODUCHANNELINDEX.
MinCol = 1; MaxCol = 4.
So now I know were comes from information about the first and last columns
to iterate.
I still don't know why it starts from "1" and not from "2" and were should
it be set.
Sorry for taking your time, but I'll be very thankful if yo can point me
any directions.
Thanks a lot.
Em 3 de abril de 2012 14:17, Jaques Arantes <[email protected]>escreveu:
> All right. Here goes the attachment.
>
>
> Additionally, I changed `awOduChannelTable_handler` to print a message for
> the first column (awOduChannelIndex) and return SNMP_ERR_NOERROR:
>
> case COLUMN_AWODUCHANNELINDEX:
> fprintf( stderr, "\n[%s():%u] COLUMN_AWODUCHANNELINDEX.", __FUNCTION__,
> __LINE__ );
> return SNMP_ERR_NOERROR;
>
>
> I don't understand quite well __who__ is responsible to see that this
> column index shouldn't be read.
> `awOduChannelTable_nextndx` stands for indices, not columns.
> `awOduChannelTable_handler` neither seems to do it.
>
> So who ought to give snmpwalk/snmptable the first and next columns?
>
>
>
> Em 3 de abril de 2012 13:17, Dave Shield <[email protected]>escreveu:
>
> On 3 April 2012 17:06, Jaques Arantes <[email protected]> wrote:
>> > -- 1.3.6.1.4.1.3979.7.4.3.2.2.1.1.1
>> > awOduChannelIndex OBJECT-TYPE
>> > SYNTAX INTEGER (1..12)
>> >
>> > MAX-ACCESS accessible-for-notify
>>
>> That is listed as one of the index objects of the
>> awOduChannelTable, so should also be "not-accessible"
>>
>>
>> > And of course I don't plan to query it, but just be able to snmpwalk or
>> > snmptable over `awOduChannelTable`.
>>
>> That should work OK - you'd see the values of the non-index objects.
>> But I've no idea what they look like, so can't really suggest what
>> might be going wrong.
>>
>>
>> > The whole MIB is almost 2000 lines. Should I post it here anyway?
>>
>> If you want us to be able to help, then yes.
>> I don't have the time (or patience!) to debug your problems
>> by guess-work....
>>
>> (And please post the MIB as an attachment, rather than in-line.
>> That tends to come across in a more useable form)
>>
>> Dave
>>
>
>
------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users