Re: how to Initialise the contents of the table?Just give me a example

Dave Shield <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
2009/12/4 飞飞 <[email protected]>:
> I think I am going to die......
>
> Just give me a example,so I can imitate  it done my job...pls

Two comments:

First, have you tried looking at the code under 'agent/mibgroups' ?
There are _dozens_ of examples there, using various techniques
and of varying complexity.   There should be something there
that is vaguely similar to what you are trying to do.


Second, try looking properly at the code you currently have:

   > /* create a new row in the (unsorted) table */
   > struct diskSystemTable_entry *
   > diskSystemTable_createEntry(
   >                  u_long  portID,
   >                 ) {

So the routine for creating a new row takes one (integer) argument,
being the index for that row - the portID.


> void
> initialize_table_diskSystemTable(void)
> {
             :
>     /* Initialise the contents of the table here */
>
>     diskSystemTable_createEntry();
>     diskSystemTable_createEntry();

> }


But you are attempting to create the initial contents of the
table by calling this routine *without* the index argument.
Is it any wonder that this doesn't work?

Dave

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.