Teonet library
0.4.7
|
#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 struct AppSettings AppSettings |
typedef struct Buffer Buffer |
void append_to_buffer | ( | Buffer * | buffer, |
const char * | data, | ||
size_t | data_size | ||
) |
References set_buffer().
Referenced by request_public_ipv4(), request_public_ipv6(), and save_data_cb().
void clear_buffer | ( | Buffer * | buffer | ) |
Referenced by request_public_ipv6().
Buffer create_buffer | ( | ) |
Referenced by request_public_ipv4(), and request_public_ipv6().
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 | ||
) |
int main | ( | int | argc, |
char ** | argv | ||
) |
References free(), launch_app(), malloc(), request_public_ipv4(), request_public_ipv6(), and result.
int request_public_ipv4 | ( | CURL * | curl, |
AppSettings * | settings | ||
) |
References append_to_buffer(), create_buffer(), destroy_buffer(), save_data_cb(), and stealFromBuffer().
Referenced by main().
int request_public_ipv6 | ( | CURL * | curl, |
AppSettings * | settings | ||
) |
References append_to_buffer(), clear_buffer(), create_buffer(), destroy_buffer(), free(), malloc(), save_data_cb(), and stealFromBuffer().
Referenced by main().
size_t save_data_cb | ( | void * | ptr, |
size_t | size, | ||
size_t | nmemb, | ||
void * | stream | ||
) |
References append_to_buffer().
Referenced by request_public_ipv4(), and request_public_ipv6().
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().