Post by gramasi.. » Tue, 29 Feb 2000 04:00:00

Why does the function inet_aton() not exist on Solaris 2.6?? What is a
way to get around this??

Thanks for the info.


Sent via
Before you buy.


1. inet_aton() function problems Any help appreciated!

Hello everyone,

I made a decision to try some linux programming this weekend.  I wanted to
try out the inet_aton function which is supposed to convert a normal ip to
its decimal value right?

here is the problem.  When i run the program and pass it it
returns 16820416.
unfortunately that integer is the decimal value of returns 1 returns 16777216

everything is backwards!

needlesss to say i am a little confused.  Any help would be greatly

Here is the code i used:

#include <stdio.h>
#include <arpa/inet.h>

int main (int argc, char **argv)
    struct in_addr FullAddress;
    char *ipaddr;
        printf("You did not provide a parameter!\n");
        ipaddr = argv[1];
        inet_aton(argv[1], &FullAddress);
        printf("The Decimal value of your ip is: %lu\n", FullAddress);
    return 0;

-Chris Wright

2. SCSI 160/320

3. inet_aton and inet_ntoa under Solaris7/8

4. OPENprint 1.0.4 for HP PaintJet XL

5. inet_aton

6. Output to Printer in C

7. inet_aton() !?

8. how to uninstall xfstt

9. help with inet_aton IP conversion...

10. inet_addr and inet_aton not working on linux

11. What is happening w/ inet_ntoa & inet_aton

12. Cant find inet_aton?

13. inet_aton and close?