Teonet library  0.4.7
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
teovpnstarter.c File Reference
#include <curl/curl.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <assert.h>

Typedefs

typedef struct AppSettings AppSettings
 
typedef struct Buffer Buffer
 

Functions

Buffer create_buffer ()
 
void destroy_buffer (Buffer *buffer)
 
void clear_buffer (Buffer *buffer)
 
char * stealFromBuffer (Buffer *buffer)
 
void set_buffer (Buffer *buffer, const char *data, size_t data_size)
 
void append_to_buffer (Buffer *buffer, const char *data, size_t data_size)
 
size_t save_data_cb (void *ptr, size_t size, size_t nmemb, void *stream)
 
int request_public_ipv4 (CURL *curl, AppSettings *settings)
 
int request_public_ipv6 (CURL *curl, AppSettings *settings)
 
void launch_app (AppSettings *settings, int argc, char **argv)
 
int main (int argc, char **argv)
 

Typedef Documentation

typedef struct AppSettings AppSettings
typedef struct Buffer Buffer

Function Documentation

void append_to_buffer ( Buffer buffer,
const char *  data,
size_t  data_size 
)
void clear_buffer ( Buffer buffer)

Referenced by request_public_ipv6().

Buffer create_buffer ( )
void destroy_buffer ( Buffer buffer)

References free().

Referenced by request_public_ipv4(), and request_public_ipv6().

void launch_app ( AppSettings settings,
int  argc,
char **  argv 
)

References free(), and malloc().

Referenced by main().

int main ( int  argc,
char **  argv 
)
int request_public_ipv4 ( CURL *  curl,
AppSettings settings 
)
int request_public_ipv6 ( CURL *  curl,
AppSettings settings 
)
size_t save_data_cb ( void *  ptr,
size_t  size,
size_t  nmemb,
void *  stream 
)
void set_buffer ( Buffer buffer,
const char *  data,
size_t  data_size 
)

References free(), and malloc().

Referenced by append_to_buffer().

char* stealFromBuffer ( Buffer buffer)

References data.

Referenced by request_public_ipv4(), and request_public_ipv6().