Re: Ways to retrive ip address from cisco routers decimal or hexadecimal.
Dave Shield <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
On 9 November 2010 06:25, Manish Pohnekar <[email protected]> wrote: > All I have one query we are using the net-snmp library and receiving the > agent information from cisco router we are getting IP address in > hexadecimal format as well as in decimal value in corresponfing ascii > character in 4 character lenghth. but not sure when returens hexadecimal or > decimal we want only in one hexadecimal . What MIB object(s) are you retrieving? What are the MIB definitions for those objects? You say that you are receiving IP addresses in hex *and* decimal formal. Does that mean you are getting two results for each query? Or that sometimes the values are in hex, and other times they are in decimal? Or what? This description is a bit unclear - some actual results would be useful. Remember that you can always force string results to be displayed in ascii or hex, by using the appropriate output command-line options. >From snmpcmd(3): OUTPUT OPTIONS -Oa Display string values as ASCII strings (unless there is a DIS- PLAY-HINT defined for the corresponding MIB object). By default, the library attempts to determine whether the value is a printable or binary string, and displays it accordingly. This option does not affect objects that do have a Display Hint. -Ox Display string values as Hex strings (unless there is a DISPLAY- HINT defined for the corresponding MIB object). By default, the library attempts to determine whether the value is a printable or binary string, and displays it accordingly. This option does not affect objects that do have a Display Hint. Dave ------------------------------------------------------------------------------ The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book "Blueprint to a Billion" shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev _______________________________________________ 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