ID photo of Ciro Santilli taken in 2013 right eyeCiro Santilli OurBigBook logoOurBigBook.com  Sponsor 中国独裁统治 China Dictatorship 新疆改造中心、六四事件、法轮功、郝海东、709大抓捕、2015巴拿马文件 邓家贵、低端人口、西藏骚乱
c/posix/inet/ntop.c
/* https://cirosantilli.com/c-posix-library */

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

int main(int argc, char *argv[]) {
    char str[INET_ADDRSTRLEN];
    struct in_addr addr;

    if (argc != 2) {
        exit(EXIT_FAILURE);
    }
    addr.s_addr = ntohl(strtoul(argv[1], NULL, 0));
    printf("%s\n", inet_ntop(AF_INET, &addr, str, INET_ADDRSTRLEN));
}