Review internet connection pinging method
Some comments, mostly minor:

I would extract the 
server connection to a function:

static int connect_server(const struct addrinfo *host_info)
{
    struct addrinfo *host_info_list;
    int fd = -1;
    int status = getaddrinfo(...);
    while(...) {
        fd = socket(...);
        status = connect(...);
    }
    freeaddrinfo(host_info_list);
    return fd;
}



All that DEBUG stuff is distracting.  Maybe it is temporary, but if you
wanted to leave it in, I suggest extracting it:

#include &lt;stdarg.h&gt;

static inline void debug(const char *format, ...)
{
#ifdef DEBUG
    va_list ap;
    va_start(ap, format);
    vfprintf(stdout, format, ap);
    va_end(ap);
#endif
}


and calling it:

debug("Bytes recieved: %ld\n%s\nReceiving complete. Closing socket...\n",
      bytes_recieved,
      incomming_data_buffer);


If DEBUG is undefined, the inline debug function will be empty and will
be excluded during compilation - it disappears.



You clearly need to loop to read the whole message...  After reading you
throw away the last two bytes.

buffer[bytes_recieved - 2] = '\0';


The recv call filled the buffer, so to \0 terminate properly you need to
specify a smaller buffer:

char buffer[1000];
ssize_t bytes_recieved = recv(socketfd, buffer, sizeof buffer - 1, 0);
...
if (bytes_recieved &gt; 0) {
    buffer[bytes_recieved] = '\0';
}


Note the use of sizeof instead of an explicit 1000


And some other things...


The man-page for getaddrinfo suggests looping through the list of
addresses returned instead of just using the first (in case the first does
not work).
When something fails you should exit rather than continuing.
instead of using strlen on a constant string, use sizeof:

const char msg[] = "GET / HTTP/1.1\nhost: www.google.com\n\n";
ssize_t bytes_sent = send(socketfd, msg, sizeof msg - 1, 0);


note the msg[], not *msg
perhaps use perror or strerror on failure to read etc.
camelCase function name but separate_word names elsewhere.