James Bridson wrote:
> Take a look at the manual page for a standard strtol implementation. I
> suspect a lot of the C/C++ based UNIX utilities use this to convert
> numeric arguments.
It turns out that it doesn't use strtol. I found the source for ifconfig.c
which pointed to inet_atou32() which calls inet_aton(). I found the source for
inet_aton() at
http://www.koders.com/c/fid40139EC8462EA3F15ABA7B83D9A63EEB56C67312.aspx
The comment on lines 77 and 78 state:
Collect number up to ``.''. Values are specified as for C:
0x=hex, 0=octal, other=decimal.
Out of curiousity, I entered "ifconfig eth0 192.168.0.0x32" and found it set
the IP address to 192.168.0.50 (decimal).
--
Cheers!
Kevin.
http://www.ve3syb.ca/ |"What are we going to do today, Borg?"
Owner of Elecraft K2 #2172 |"Same thing we always do, Pinkutus:
| Try to assimilate the world!"
#include <disclaimer/favourite> | -Pinkutus & the Borg
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|