Hi,
I am trying to develop my 1st ever SNMP client application with MSVC and
am not sure if I can use the Net-SNMP suite of tools for developing a
client application because it looks like it is all geard around
implementing the agent, is this true?
I have used Net-SNMP version 5.0.4.1 to generate the folowing files
using the mib2c application:-
omsEquipmentNEInfo-README-FIRST.txt
omsEquipmentNEInfo.c
omsEquipmentNEInfo.h
omsEquipmentNEInfo_data_access.c
omsEquipmentNEInfo_data_access.h
omsEquipmentNEInfo_data_get.c
omsEquipmentNEInfo_data_get.h
omsEquipmentNEInfo_data_set.c
omsEquipmentNEInfo_data_set.h
omsEquipmentNEInfo_interface.c
omsEquipmentNEInfo_interface.h
omsEquipmentShelfSerialNo.c
omsEquipmentShelfSerialNo.h
omsEquipmentShelfTable-README-FIRST.txt
omsEquipmentShelfTable-README-omsEquipmentShelfTable.txt
omsEquipmentShelfTable.c
omsEquipmentShelfTable.h
omsEquipmentShelfTable_data_access.c
omsEquipmentShelfTable_data_access.h
omsEquipmentShelfTable_data_get.c
omsEquipmentShelfTable_data_get.h
omsEquipmentShelfTable_data_set.c
omsEquipmentShelfTable_data_set.h
omsEquipmentShelfTable_enums.h
omsEquipmentShelfTable_interface.c
omsEquipmentShelfTable_interface.h
omsEquipmentShelfTable_oids.h
I managed to run the tutorial app under the 'Client/Manager Coding
Tutorials' section which successfully requested a variable from my
remote host.
Can I simply call the functional within
omsEquipmentShelfTable_data_get.c to access the agent data on the remote
host?
I tried to do something like:-
omsEquipmentShelfTable_rowreq_ctx andys_rowreq_ctx;
omsEquipmentShelfTable_rowreq_ctx* pandys_rowreq_ctx
=&andys_rowreq_ctx;
char
omsEquipmentShelfExpected_val;
char*
pomsEquipmentShelfExpected_val = &omsEquipmentShelfExpected_val;
char**
ppomsEquipmentShelfExpected_val = &pomsEquipmentShelfExpected_val;
size_t
omsEquipmentShelfExpected_val_ptr_len;
size_t*
pomsEquipmentShelfExpected_val_ptr_len =
&omsEquipmentShelfExpected_val_ptr_len;
And then call the get function
int omsEquipmentShelfExpected_get( omsEquipmentShelfTable_rowreq_ctx
*rowreq_ctx, char **omsEquipmentShelfExpected_val_ptr_ptr, size_t
*omsEquipmentShelfExpected_val_ptr_len_ptr );
Like this:-
omsEquipmentShelfExpected_get(pandys_rowreq_ctx,
ppomsEquipmentShelfExpected_val,
pomsEquipmentShelfExpected_val_ptr_len);
However, I think more than just the 1 mib2c output file is required and
then it looks more like I am trying to implement an agent and not the
client, ehnce my confusion.
Any help you could give would be much appreciated. If Net-SNMP is not
the tool I should be using to write a client app and suggestion on where
I should be looking?
Regards,
Andrew Walker
-------------------------------------------------------------------------
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?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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/listinfo/net-snmp-users