My thanks to *brianW, Larry, and Andy Mercier for the quick response.
It turns out that ifconfig does indeed treat the numbers as octal if they
start with a leading 0. I have verified that from the command line on the
TS-7250 and on my machine which runs Fedora 8.
If I had thought about it some more I might have come to that realization
(eventually). It just never occured to me that it would treat the passed
numbers as anything other than decimal.
A simple sscanf() to extract the dotted quad in to four variables then using
the variables to build the ifconfig command fixed the problem.
BTW, the string I was passing was in ASCII so a simple printf() was used to
verify the command being executed to set the new IP address.
--
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/
|