Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: Packet Args

From: Matt Bing <mbing(at)nfr.net>
Date: Wed Dec 04 2002 - 09:16:13 EST

Lone Sumd said:
> Can anyone share how you would take a command line arugment as a char, and convert it to a hex value (u_long)?

Try using strtoul() with zero as the base, it will automagically determine whether the string should be interepreted as hex, octal, or decimal.

        u_long i = strtoul(optarg, (char **)NULL, 0);

-- 
Matt Bing
NFR Security
Rapid Response Team

---------------------------------------------------------------------
To unsubscribe, e-mail: libnet-unsubscribe@securityfocus.com
For additional commands, e-mail: libnet-help@securityfocus.com
Received on Wed Dec 4 09:20:20 2002

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:02:22 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library