hi,everyone:
Thanks to your help the last question have been resloved, but the
new one appeared.

I'm extending the net-snmp Agent, OS core is linux 2.6.22 , CPU is
MIPS architecture.

I want to read something about the kenel space. This can be done
using the auto_nlist() routine shown in the AGENT.txt file.Ialso see
the example in agent/mibgroup/mibII/udp.c,but these is something i don't
understand.

for instants(in agent/mibgroup/mibII/udp.c):
line 113:

#ifdef UDPSTAT_SYMBOL
(this macro is define in file include/net-snmp/system/generic.h )
auto_nlist(UDPSTAT_SYMBOL, 0, 0);
#endif

what has done this routine ?

line 161:

UDP_STAT_STRUCTURE udpstat;
here define a variable udpstat, this variable is used below.
but what type is it?

The macro UDP_STAT_STRUCTURE is defined above,
#define UDP_STAT_STRUCTURE struct udpstat
I cann't fine the struct udpstat where defined.

If i want to get the disk size, which step i must to do?
In the linex kenel the struct statfs can know this, but
i don't know how to relate net-snmp to kernel.

when i do this

firstly:
#define STATFS_SYMBOL "statfs"

in the init routine i write this

#ifdef STATFS_SYMBOL
auto_nlist(STATFS_SYMBOL, 0, 0);
#endif

i define the variable statfs also

#define STATFS_STRUCTURE struct statfs
STATFS_STRUCTURE statfs;

it cann't compile correctly.

I know the disk size can also get form /proc/ file system.
if i get this info from the /proc/file, can it be or not?
Is there some example?

The two method which is good?

Expect to your respound.





-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757...un.com/javaone
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/...net-snmp-users