Converting IP Address from string in dot format to 32 bit integer

C program to convert IPv4 address from String formatted in dat notation like "" to a 32 bit integer in Linux

#include <arpa/inet.h>


    uint32_t ip;
    struct in_addr ip_addr;

    ip = inet_addr("");
    printf("IP Integer: %d\n", ip);
    ip_addr.s_addr = ip;
    printf("The IP address is: %s\n", inet_ntoa(ip_addr));



Popular posts from this blog

phpbb3 Forum not showing after creating