/*
gcc -o test -Wall test.c -lcurl
*/
#include <stdio.h>
#include <string.h>
#include <sys/socket.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <fcntl.h>
#include <sys/select.h>
#include <curl/curl.h>
#include <net/if.h>
#include <sys/ioctl.h>
#define SIZE 1024
#define SERVER_PORT 80
long getlocalhostip(){
int MAXINTERFACES=16;
long ip;
int fd, intrface, retn = 0;
struct ifreq buf[MAXINTERFACES]; ///if.h
struct ifconf ifc; ///if.h
ip = -1;
if ((fd = socket (
gcc -o test -Wall test.c -lcurl
*/
#include <stdio.h>
#include <string.h>
#include <sys/socket.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <fcntl.h>
#include <sys/select.h>
#include <curl/curl.h>
#include <net/if.h>
#include <sys/ioctl.h>
#define SIZE 1024
#define SERVER_PORT 80
long getlocalhostip(){
int MAXINTERFACES=16;
long ip;
int fd, intrface, retn = 0;
struct ifreq buf[MAXINTERFACES]; ///if.h
struct ifconf ifc; ///if.h
ip = -1;
if ((fd = socket (