|  | Home
 | Calendar
 | Mail Lists
 | List Archives
 | Desktop SIG
 | Hardware Hacking SIG Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU | 
My original response was to write essentially the same C program you did 
except converting the 4 octets into a single int:
int ipaddr;
	ipaddr = ntohl(a << 24 | b << 16 | c << 8 | d);
	printf("%x\n", ipaddr); 
> main(int ac, char **av)
> {
>     int a,b,c,d;
> 
>     sscanf(av[1], "%d.%d.%d.%d", &a, &b, &c, &d);
> 
>     printf("%02x.%02x.%02x.%02x\n", a, b, c, d);
> }
> 
> 
> -
> Subcription/unsubscription/info requests: send e-mail with
> "subscribe", "unsubscribe", or "info" on the first line of the
> message body to discuss-request at blu.org (Subject line is ignored).
Jerry Feldman <gaf at blu.org>
Associate Director
Boston Linux and Unix user group
http://www.blu.org
-
Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at blu.org (Subject line is ignored).