1 2 3 4 5 6 7 8 9
#include "ip.h" #include <stdio.h> #include <netinet/in.h> char ip[INET_ADDRSTRLEN]; int main() { printf("IP = %s\n", get_ip(INET_ADDRSTRLEN)); return EXIT_SUCCESS; }