Re: snmp_add_var

This is a discussion on Re: snmp_add_var within the SNMP Coders forums, part of the Networking and Network Related category; HL> string subnet_prefix = "fe80000000000000"; -> should be all hex HL> snmp_add_var(pdu, smNetPartitionConfigSubnetPrefix_oid, HL> sizeof(...


Go Back   Usenet Forums > Networking and Network Related > SNMP Coders

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-29-2005
Dave Shield
 
Posts: n/a
Default Re: snmp_add_var

HL> string subnet_prefix = "fe80000000000000"; -> should be all hex
HL> snmp_add_var(pdu, smNetPartitionConfigSubnetPrefix_oid,
HL> sizeof(smNetPartitionConfigSubnetPrefix_oid)/sizeof(oid), 's',
HL> subnet_prefix.data());
HL>
HL> How can I tell snmp_add_var this is a hex value?

RS> prefix it with '0x'.

Are you sure, Robert?

I'd have suggested using the 'x' type as the fourth parameter:

snmp_add_var(pdu, smNetPartitionConfigSubnetPrefix_oid
sizeof(smNetPartitionConfigSubnetPrefix_oid)/sizeof(oid),
'x', subnet_prefix.data());
^^^

I'm not convinced that all of the internal library routines
try to interpret a leading '0x' in that way.

Dave



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:43 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0