Running SNMP on windows
Hi, I am learning how to use SNMP and i found the tutorials/source code ( http://net-snmp.sourceforge.net/tutorial/tutorial-5/toolkit/demoapp/index.html) on your website. Am using windows 7, but I can also use a QNX server to run the program. Any directions on how to do this? Is there a particular environment I should run it in? Thanks, -- Gaelle -- The Windows 8 Center - In partnership with Sourceforge Your idea - your app - 30 days. Get started! http://windows8center.sourceforge.net/ what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/___ 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
Re: Problems with net-snmp on cygwin
On 10/29/12 17:50, Lee wrote: > On 10/29/12, Bart Van Assche wrote: >> On 10/28/12 21:51, Lee wrote: >>> On 10/28/12, Patrick Rebert wrote: Thanks for the reply, I actually did try it with semicolons. Unfortunately, the shell sees the semicolon as a command terminator, so that didn't advance the cause. >>> >>> It's easier to build net-snmp with cygwin than it is to get the dos >>> version of net-snmp to work properly under cygwin. I submitted a >>> patch a while back for building net-snmp for cygwin: >>> >>> http://sourceforge.net/tracker/?func=detail&aid=3395862&group_id=12694&atid=312694 >>> should at least give you an idea of what's needed. >> >> It isn't necessary anymore to modify the Net-SNMP source code in order >> to switch from semicolon to colon as a separator character. All you >> have to do is to set the ENV_SEPARATOR character before running >> configure. A quote from README.win32: >> >> ENV_SEPARATOR=":" \ >> ./configure \ >> --with-mib-modules="host agentx disman/event-mib examples/example" >> \ >> --with-out-mib-modules=host/hr_network > > I must be missing something; I can't find that in net-snmp-5.7.2.tar.gz > Where did your README.win32 come from? From the master branch. I've just backported that feature to the 5.7 branch. Bart. -- The Windows 8 Center - In partnership with Sourceforge Your idea - your app - 30 days. Get started! http://windows8center.sourceforge.net/ what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/ ___ 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
Re: Problems with net-snmp on cygwin
On 10/29/12, Bart Van Assche wrote: > On 10/28/12 21:51, Lee wrote: >> On 10/28/12, Patrick Rebert wrote: >>> Thanks for the reply, I actually did try it with semicolons. >>> Unfortunately, the >>> shell sees the semicolon as a command terminator, so that didn't advance >>> the cause. >> >> It's easier to build net-snmp with cygwin than it is to get the dos >> version of net-snmp to work properly under cygwin. I submitted a >> patch a while back for building net-snmp for cygwin: >> >> http://sourceforge.net/tracker/?func=detail&aid=3395862&group_id=12694&atid=312694 >> should at least give you an idea of what's needed. > > It isn't necessary anymore to modify the Net-SNMP source code in order > to switch from semicolon to colon as a separator character. All you > have to do is to set the ENV_SEPARATOR character before running > configure. A quote from README.win32: > > ENV_SEPARATOR=":" \ > ./configure \ > --with-mib-modules="host agentx disman/event-mib examples/example" > \ > --with-out-mib-modules=host/hr_network I must be missing something; I can't find that in net-snmp-5.7.2.tar.gz Where did your README.win32 come from? & README.win32 could use an update: "... The dependency on the Cygwin dlls can be eliminated with the --mno-cygwin compiler flag," --mno-cygwin was dropped in version 1.7 of cygwin Regards, Lee -- The Windows 8 Center - In partnership with Sourceforge Your idea - your app - 30 days. Get started! http://windows8center.sourceforge.net/ what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/ ___ 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
Re: Debugging SNMP
On 29 October 2012 11:56, Sverre Moe wrote: > Why does this work for my 3 hard coded scalars, but not my list of scalars? > > const oid scalar_oid[] = { 1,3,6,1,4,1,45678,1,1 }; > OID_LENGTH(scalar_oid) gives value 9. > > const oid *scalar_oid = wrapper.getOid(); //Has same oid within. Returns a > pointer to an oid. > OID_LENGTH(scalar_oid) gives value 1. > > Both of these is just a pointer right? No. The first case is an array, so sizeof(scalar_oid) gives 36 (assuming a 32-bit system), and hence OID_LENGTH gives 9 (sizeof(scalar_oid)/sizeof(oid)) The second case is a pointer, so sizeof(scalar_oid) gives 4 (again, assuming a 32-bit system) and hence OID_LENGTH gives 1 (sizeof(scalar_oid)/sizeof(oid)) Glad you got things sorted. Dave -- The Windows 8 Center - In partnership with Sourceforge Your idea - your app - 30 days. Get started! http://windows8center.sourceforge.net/ what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/ ___ 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
Re: Debugging SNMP
I'm not sure if I found a solution to my problem, but anyway netsnmp_handler_registration *handler_reg = netsnmp_create_handler_registration(buffy, handle_snmp, scalar_oid, OID_LENGTH(scalar_oid), HANDLER_CAN_RONLY); I tried to output each handler, and rootoid_len that comes from OID_LENGTH(scalar_oid) was 1 for all scalars. I reckon this value should be the length of the OID (1.3.6.1.4.1.40463.2.1 = 9). I have my own wrapper class around an OID with the length, when I used this length instead of OID_LENGTH(scalar_oid), it registered all my scalars with no duplicates. Why does this work for my 3 hard coded scalars, but not my list of scalars? const oid scalar_oid[] = { 1,3,6,1,4,1,45678,1,1 }; OID_LENGTH(scalar_oid) gives value 9. const oid *scalar_oid = wrapper.getOid(); //Has same oid within. Returns a pointer to an oid. OID_LENGTH(scalar_oid) gives value 1. Both of these is just a pointer right? So why does OID_LENGTH work one the first, but not the second? My immediate problem is solved. Thanks for all assistance. /Sverre - Original Message - Fra: "Dave Shield" Til: "Sverre Moe" Kopi: "net-snmp-users" Sendt: 29. oktober 2012 12:38:51 Emne: Re: Debugging SNMP On 29 October 2012 10:46, Sverre Moe wrote: > I have also tried to output the handler memory address, and its not > always unique. Don't know if it has anything to do with the problem. Hmmm as far as I can tell, this structure should be unique, but this duplication could well be a symptom of the problem, rather than the underlying cause. > Packaged dump output. Doesn't look like have any information about the > scalar registration as I can see. > dumph_send: (Un)Register Prefix > dumpv_send: OID: iso > dumph_send: OID Header > dumpx_send: 01 00 00 00 > dumpv_send: # subids: 1 (0x01) > dumpv_send: prefix: 0 (0x00) > dumpv_send: inclusive: 0 (0x00) > dumph_send: OID Segments > dumpx_send: 01 00 00 00 > dumpv_send: Integer: 1 (0x01) > dumpx_send:0C 00 00 00 > dumpv_send: Integer: 12 (0x0C) This is the section that specifies the OID being registered. Personally, I've always tended to use the raw packet dump rather than this formatted version - but as far as I can tell, this is trying to register either .1 (or possibly .1.12, though I can't immediately see where the 12 comes from!) What is the OID that this is intended to register? What do the other packet dumps look like? If they are all trying to register the OID .1, then this would explain where the duplicate registration failures are coming from! Have you managed to put together a dummy version of this module that we can use to try and reproduce the problem? Dave CONFIDENTIALITY This e-mail and any attachment contain KONGSBERG information which may be proprietary, confidential or subject to export regulations, and is only meant for the intended recipient(s). Any disclosure, copying, distribution or use is prohibited, if not otherwise explicitly agreed with KONGSBERG. If received in error, please delete it immediately from your system and notify the sender properly. -- The Windows 8 Center - In partnership with Sourceforge Your idea - your app - 30 days. Get started! http://windows8center.sourceforge.net/ what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/___ 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
Re: Debugging SNMP
On 29 October 2012 10:46, Sverre Moe wrote: > I have also tried to output the handler memory address, and its not > always unique. Don't know if it has anything to do with the problem. Hmmm as far as I can tell, this structure should be unique, but this duplication could well be a symptom of the problem, rather than the underlying cause. > Packaged dump output. Doesn't look like have any information about the > scalar registration as I can see. > dumph_send: (Un)Register Prefix > dumpv_send: OID: iso > dumph_send: OID Header > dumpx_send: 01 00 00 00 > dumpv_send: # subids: 1 (0x01) > dumpv_send: prefix: 0 (0x00) > dumpv_send: inclusive: 0 (0x00) > dumph_send: OID Segments > dumpx_send: 01 00 00 00 > dumpv_send: Integer: 1 (0x01) > dumpx_send:0C 00 00 00 > dumpv_send: Integer: 12 (0x0C) This is the section that specifies the OID being registered. Personally, I've always tended to use the raw packet dump rather than this formatted version - but as far as I can tell, this is trying to register either .1(or possibly.1.12, though I can't immediately see where the 12 comes from!) What is the OID that this is intended to register? What do the other packet dumps look like? If they are all trying to register the OID .1, then this would explain where the duplicate registration failures are coming from! Have you managed to put together a dummy version of this module that we can use to try and reproduce the problem? Dave -- The Windows 8 Center - In partnership with Sourceforge Your idea - your app - 30 days. Get started! http://windows8center.sourceforge.net/ what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/ ___ 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
Re: Debugging SNMP
Thats correct, its the netsnmp_register_scalar which returns -1. Function netsnmp_create_handler_registration returns a pointer to an netsnmp_handler_registration. I have also tried to output the handler memory address, and its not always unique. Don't know if it has anything to do with the problem. My hypothesis is that perhaps it doesn't create an unique handler for each scalar. Could I create an netsnmp_handler_registration without the helper-function netsnmp_create_handler_registration? Perhaps that would solve the problem. Packaged dump output. Doesn't look like have any information about the scalar registration as I can see. dumph_send: AgentX Header dumpx_send: 01 03 00 00 dumpv_send: Version: 1 dumpv_send: Command: 3 (Register) dumpv_send: Flags: 00 dumph_send: Session ID dumpx_send: 1B 00 00 00 dumpv_send: Integer: 27 (0x1B) dumph_send: Transaction ID dumpx_send: 00 00 00 00 dumpv_send: Integer: 0 (0x00) dumph_send: Request ID dumpx_send: C1 E5 31 3A dumpv_send: Integer: 976348609 (0x3A31E5C1) dumph_send: Dummy Length :-( dumpx_send: 00 00 00 00 dumpv_send: Integer: 0 (0x00) dumph_send: AgentX Payload dumph_send: (Un)Register Header dumpx_send: 00 7F 00 00 dumpv_send: Timeout: 0 dumpv_send: Priority: 127 dumpv_send: Range SubID: 0 dumph_send: (Un)Register Prefix dumpv_send: OID: iso dumph_send: OID Header dumpx_send: 01 00 00 00 dumpv_send: # subids: 1 (0x01) dumpv_send: prefix: 0 (0x00) dumpv_send: inclusive: 0 (0x00) dumph_send: OID Segments dumpx_send: 01 00 00 00 dumpv_send: Integer: 1 (0x01) dumpx_send:0C 00 00 00 dumpv_send: Integer: 12 (0x0C) dumpx_recv:14 00 00 00 dumpv_recv: Integer: 20 (0x14) dumph_recv: AgentX Header dumph_recv: Version dumpx_recv: 01 dumpv_recv: Version: 1 dumph_recv: Command dumpx_recv: 12 dumpv_recv: Command: 18 (Response) dumph_recv: Flags dumpx_recv: 00 dumpv_recv: Flags: 0x0 dumph_recv: Reserved Byte dumpx_recv: 00 dumpv_recv: Reserved: 0x0 dumph_recv: Session ID dumpx_recv: 1B 00 00 00 dumpv_recv: Integer: 27 (0x1B) dumph_recv: Transaction ID dumpx_recv: 00 00 00 00 dumpv_recv: Integer: 0 (0x00) dumph_recv: Packet ID dumpx_recv: C1 E5 31 3A dumpv_recv: Integer: 976348609 (0x3A31E5C1) dumph_recv: Payload Length dumpx_recv: 14 00 00 00 dumpv_recv: Integer: 20 (0x14) dumph_recv: PDU dumpx_recv: 7D EE 0D 00 dumpv_recv: Integer: 913021 (0xDEE7D) dumpx_recv: 00 00 dumpv_recv: Short: 0 (0x00) dumpx_recv: 00 00 dumpv_recv: Short: 0 (0x00) dumph_recv: VarBindList dumph_recv: VarBind: dumph_recv: Type dumpx_recv: 05 00 dumpv_recv: Short: 5 (0x05) dumph_recv: OID Header dumpx_recv: 01 00 00 00 dumpv_recv: # subids: 1 (0x01) dumpv_recv: prefix: 0 (0x00) dumpv_recv: inclusive: 0 (0x00) dumph_recv: OID Segments dumpx_recv: 01 00 00 00 dumpv_recv: Integer: 1 (0x01) dumpv_recv: OID: iso - Original Message - Fra: "Dave Shield" Til: "Sverre Moe" Kopi: "net-snmp-users" Sendt: 29. oktober 2012 11:20:30 Emne: Re: Debugging SNMP On 29 October 2012 10:10, Sverre Moe wrote: > I have tried to seperate the registration call into two separate statements, > same result. None of these are actually failing. When I call > netsnmp_register_scalar(handler), it returns -1 which is > MIB_DUPLICATE_REGISTRATION. So the 'netsnmp_create_handler_registration' call succeeds (returns a non-null value), but the 'netsnmp_register_scalar' call fails (returns -1) - correct? > How do I "Turn on packet dumps in the AgentX subagent" ? Either netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_DUMP_PACKET, ++snmp_dump_packet); or debug_register_tokens("dump"); snmp_set_do_debugging(1); Put one or other of these statements into the main block of your subagent code - before the 'init_snmp' and similar setup. The first will turn on raw packet dumps (which are more compact, but less immediately meaningful). The second enables "parsed dumps" which are probably easier to follow, if a little verbose. If you're not sure what you are seeing, post the text of these dumps, together with what you think the OIDs being registered should be. Dave CONFIDENTIALITY This e-mail and any attachment contain KONGSBERG information which may be proprietary, confidential or subject to export regulations, and is only meant for the intended recipient(s). Any disclosure, copying, distribution or use is prohibited, if not otherwise explicitly agreed with KONGSBERG. If received in error, please delete it immediately from your system and notify the sender properly. -- The Windows 8 Center - In partnership with Sourceforge Your idea - your app - 30 days. Get started! http://windows8center.sourceforge.net/ what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/___ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the f
Re: Debugging SNMP
On 29 October 2012 10:10, Sverre Moe wrote: > I have tried to seperate the registration call into two separate statements, > same result. None of these are actually failing. When I call > netsnmp_register_scalar(handler), it returns -1 which is > MIB_DUPLICATE_REGISTRATION. So the 'netsnmp_create_handler_registration' call succeeds (returns a non-null value), but the 'netsnmp_register_scalar' call fails (returns -1) - correct? > How do I "Turn on packet dumps in the AgentX subagent" ? Either netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_DUMP_PACKET, ++snmp_dump_packet); or debug_register_tokens("dump"); snmp_set_do_debugging(1); Put one or other of these statements into the main block of your subagent code - before the 'init_snmp' and similar setup. The first will turn on raw packet dumps (which are more compact, but less immediately meaningful). The second enables "parsed dumps" which are probably easier to follow, if a little verbose. If you're not sure what you are seeing, post the text of these dumps, together with what you think the OIDs being registered should be. Dave -- The Windows 8 Center - In partnership with Sourceforge Your idea - your app - 30 days. Get started! http://windows8center.sourceforge.net/ what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/ ___ 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
Re: Debugging SNMP
I have tried to seperate the registration call into two separate statements, same result. None of these are actually failing. When I call netsnmp_register_scalar(handler), it returns -1 which is MIB_DUPLICATE_REGISTRATION. How do I " Turn on packet dumps in the AgentX subagent" ? /Sverre - Original Message - Fra: "Dave Shield" Til: "Sverre Moe" Kopi: "net-snmp-users" Sendt: 29. oktober 2012 11:01:33 Emne: Re: Debugging SNMP On 29 October 2012 09:34, Sverre Moe wrote: > I have tried to manually register 3 hard coded scalars, one by one, each > with its own handler: [snip] > This works fine and snmpget returns a value. However, if I put these 3 hard > coded scalars OID in a list, iterate over that list and register them, I get > a duplicate error. Hmm that sounds suspiciously as if the OID that's getting passed to the registration code isn't the same OID that you're expecting.. Unfortunately, there doesn't seem to be any debug code within the registration processing, that can be used to check this. (but see below) Things that are perhaps worth trying: * Separate out this call: > int returnValue = netsnmp_register_read_only_scalar( > netsnmp_create_handler_registration(buffy, )); into two separate statements: netsnmp_handler_registration *r = netsnmp_create_handler_registration(buffy, )); returnValue = netsnmp_register_read_only_scalar( r ); which will at least indicate which of the two calls is failing. * Craft a dummy version of this module that just registers the three scalars (using the same approach), but doesn't try to implement the actual handler. Then try compiling this into the main agent code, rather than as an AgentX subagent. This will indicate whether it's an AgentX-specific problem or more general. * Turn on packet dumps in the AgentX subagent, to show the exact registration requests that are being made. This will confirm whether the OIDs being registered are indeed what you expect. That third is probably the easiest to start with. If you try the second, and still get nowhere, then please post the complete code of that dummy module, so we can try to reproduce the problem. Dave CONFIDENTIALITY This e-mail and any attachment contain KONGSBERG information which may be proprietary, confidential or subject to export regulations, and is only meant for the intended recipient(s). Any disclosure, copying, distribution or use is prohibited, if not otherwise explicitly agreed with KONGSBERG. If received in error, please delete it immediately from your system and notify the sender properly. -- The Windows 8 Center - In partnership with Sourceforge Your idea - your app - 30 days. Get started! http://windows8center.sourceforge.net/ what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/___ 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
Re: Debugging SNMP
On 29 October 2012 09:34, Sverre Moe wrote: > I have tried to manually register 3 hard coded scalars, one by one, each > with its own handler: [snip] > This works fine and snmpget returns a value. However, if I put these 3 hard > coded scalars OID in a list, iterate over that list and register them, I get > a duplicate error. Hmm that sounds suspiciously as if the OID that's getting passed to the registration code isn't the same OID that you're expecting.. Unfortunately, there doesn't seem to be any debug code within the registration processing, that can be used to check this. (but see below) Things that are perhaps worth trying: * Separate out this call: >int returnValue = netsnmp_register_read_only_scalar( > netsnmp_create_handler_registration(buffy, )); into two separate statements: netsnmp_handler_registration *r = netsnmp_create_handler_registration(buffy, )); returnValue = netsnmp_register_read_only_scalar( r ); which will at least indicate which of the two calls is failing. * Craft a dummy version of this module that just registers the three scalars (using the same approach), but doesn't try to implement the actual handler. Then try compiling this into the main agent code, rather than as an AgentX subagent. This will indicate whether it's an AgentX-specific problem or more general. * Turn on packet dumps in the AgentX subagent, to show the exact registration requests that are being made. This will confirm whether the OIDs being registered are indeed what you expect. That third is probably the easiest to start with. If you try the second, and still get nowhere, then please post the complete code of that dummy module, so we can try to reproduce the problem. Dave -- The Windows 8 Center - In partnership with Sourceforge Your idea - your app - 30 days. Get started! http://windows8center.sourceforge.net/ what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/ ___ 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
Re: Debugging SNMP
I have checked and there is only once instance of my subagent running. It is running as a separate process using AgentX protocol. I have tried to manually register 3 hard coded scalars, one by one, each with its own handler: int returnValue1 = netsnmp_register_read_only_scalar( netsnmp_create_handler_registration("test1", handle_snmp, test1_oid, OID_LENGTH(test1_oid), HANDLER_CAN_RONLY )); int returnValue2 = netsnmp_register_read_only_scalar( netsnmp_create_handler_registration("test2", handle_snmp, test2_oid, OID_LENGTH(test2_oid), HANDLER_CAN_RONLY )); etc... This works fine and snmpget returns a value. However , if I put these 3 hard coded scalars OID in a list, iterate over that list and register them, I get a duplicate error. for (oid_iterator) { //Overlook pseudocode here const oid *oid_value = (*oid_iterator); const char *buffy = tmp_string.c_str(); int returnValue = netsnmp_register_read_only_scalar( netsnmp_create_handler_registration(buffy, handle_snmp, oid_value, OID_LENGTH(oid_value), HANDLER_CAN_RONLY )); } - Original Message - Fra: "Jatin Bodarya" Til: "Sverre Moe" Sendt: 29. oktober 2012 09:59:23 Emne: RE: Debugging SNMP I don’t know in your case, but one reason is because of execution of a subagent code multiple times. So when you run your subagent with “./XXX &” make sure that the previous execution has already been stopped. And if you have compiled the code with master agent, In that case you have to replace your “ libnetsnmpmibs.so.X... “ files... and then you have to execute it as subagent. From: Sverre Moe [mailto:sve...@spacetec.no] Sent: 29 October 2012 13:57 To: Dave Shield Cc: net-snmp-users Subject: Re: Debugging SNMP I have checked the contents of each elements inputted into int returnValue = netsnmp_register_read_only_scalar( netsnmp_create_handler_registration(buffy, handle_snmp, scalar_oid, OID_LENGTH(scalar_oid), HANDLER_CAN_RONLY )); For each iteration of the loop the OID and scalar name is unique. So why does it returns MIB_DUPLICATE_REGISTRATION? /Sverre - Original Message - Fra: "Dave Shield" Til: "Sverre Moe" Kopi: "net-snmp-users" Sendt: 26. oktober 2012 14:52:18 Emne: Re: Debugging SNMP On 26 October 2012 13:29, Sverre Moe wrote: > Full code of my scalar registration. Changed to register all scalars one by > one instead of in group. > > The oid_wrapper class is a wrapper around oid that contains an oid pointer > and the length of that oid. Try printing out the value of 'scalar_oid' (and 'scalar_length') each time round the loop. What is the registration call *actually* being invoked with? (as opposed to what you think it _should_ be invoked with) Dave CONFIDENTIALITY This e-mail and any attachment contain KONGSBERG information which may be proprietary, confidential or subject to export regulations, and is only meant for the intended recipient(s). Any disclosure, copying, distribution or use is prohibited, if not otherwise explicitly agreed with KONGSBERG. If received in error, please delete it immediately from your system and notify the sender properly. CONFIDENTIALITY This e-mail and any attachment contain KONGSBERG information which may be proprietary, confidential or subject to export regulations, and is only meant for the intended recipient(s). Any disclosure, copying, distribution or use is prohibited, if not otherwise explicitly agreed with KONGSBERG. If received in error, please delete it immediately from your system and notify the sender properly. -- The Windows 8 Center - In partnership with Sourceforge Your idea - your app - 30 days. Get started! http://windows8center.sourceforge.net/ what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/___ 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
Re: Debugging SNMP
I have checked the contents of each elements inputted into int returnValue = netsnmp_register_read_only_scalar( netsnmp_create_handler_registration(buffy, handle_snmp, scalar_oid, OID_LENGTH(scalar_oid), HANDLER_CAN_RONLY )); For each iteration of the loop the OID and scalar name is unique. So why does it returns MIB_DUPLICATE_REGISTRATION? /Sverre - Original Message - Fra: "Dave Shield" Til: "Sverre Moe" Kopi: "net-snmp-users" Sendt: 26. oktober 2012 14:52:18 Emne: Re: Debugging SNMP On 26 October 2012 13:29, Sverre Moe wrote: > Full code of my scalar registration. Changed to register all scalars one by > one instead of in group. > > The oid_wrapper class is a wrapper around oid that contains an oid pointer > and the length of that oid. Try printing out the value of 'scalar_oid' (and 'scalar_length') each time round the loop. What is the registration call *actually* being invoked with? (as opposed to what you think it _should_ be invoked with) Dave CONFIDENTIALITY This e-mail and any attachment contain KONGSBERG information which may be proprietary, confidential or subject to export regulations, and is only meant for the intended recipient(s). Any disclosure, copying, distribution or use is prohibited, if not otherwise explicitly agreed with KONGSBERG. If received in error, please delete it immediately from your system and notify the sender properly. -- The Windows 8 Center - In partnership with Sourceforge Your idea - your app - 30 days. Get started! http://windows8center.sourceforge.net/ what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/___ 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
Re: Problems with net-snmp on cygwin
On 10/28/12 21:51, Lee wrote: > On 10/28/12, Patrick Rebert wrote: >> Thanks for the reply, I actually did try it with semicolons. Unfortunately, >> the >> shell sees the semicolon as a command terminator, so that didn't advance the >> cause. > > It's easier to build net-snmp with cygwin than it is to get the dos > version of net-snmp to work properly under cygwin. I submitted a > patch a while back for building net-snmp for cygwin: > > http://sourceforge.net/tracker/?func=detail&aid=3395862&group_id=12694&atid=312694 > should at least give you an idea of what's needed. It isn't necessary anymore to modify the Net-SNMP source code in order to switch from semicolon to colon as a separator character. All you have to do is to set the ENV_SEPARATOR character before running configure. A quote from README.win32: ENV_SEPARATOR=":" \ ./configure \ --with-mib-modules="host agentx disman/event-mib examples/example" \ --with-out-mib-modules=host/hr_network Bart. -- The Windows 8 Center - In partnership with Sourceforge Your idea - your app - 30 days. Get started! http://windows8center.sourceforge.net/ what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/ ___ 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