![]() |
Flowgrind
Advanced TCP traffic generator
|
Routines used by the Flowgrind daemon. More...
#include "config.h"
#include <sys/types.h>
#include <sys/socket.h>
#include <gsl/gsl_rng.h>
#include "common.h"
#include "fg_list.h"
#include <xmlrpc-c/base.h>
#include <xmlrpc-c/server.h>
#include <xmlrpc-c/server_abyss.h>
#include <xmlrpc-c/util.h>
Go to the source code of this file.
Data Structures | |
struct | flow |
struct | flow_source_settings |
struct | request |
struct | request_add_flow_destination |
struct | request_add_flow_source |
struct | request_get_status |
struct | request_get_uuid |
structure for getting the UUID. More... | |
struct | request_start_flows |
struct | request_stop_flow |
struct | flow::statistics |
Macros | |
#define | DEFAULT_SELECT_TIMEOUT 10000000 |
Time select() will block waiting for a file descriptor to become ready. More... | |
#define | REQUEST_ADD_DESTINATION 0 |
#define | REQUEST_ADD_SOURCE 1 |
#define | REQUEST_GET_STATUS 4 |
#define | REQUEST_GET_UUID 5 |
#define | REQUEST_START_FLOWS 2 |
#define | REQUEST_STOP_FLOW 3 |
Enumerations | |
enum | flow_state_t { GRIND_WAIT_CONNECT = 0, GRIND_WAIT_ACCEPT, GRIND } |
Functions | |
void | add_report (struct report *report) |
void * | daemon_main (void *ptr) |
int | dispatch_request (struct request *request, int type) |
Dispatch a request to daemon loop. More... | |
void | flow_error (struct flow *flow, const char *fmt,...) |
struct report * | get_reports (int *has_more) |
void | get_uuid_string (char *uuid_str) |
To generate daemon UUID. More... | |
void | request_error (struct request *request, const char *fmt,...) |
int | set_flow_tcp_options (struct flow *flow) |
Variables | |
int | daemon_pipe [2] |
pthread_t | daemon_thread |
char * | dump_dir |
char * | dump_prefix |
struct linked_list | flows |
pthread_mutex_t | mutex |
unsigned | pending_reports |
struct report * | reports |
struct report * | reports_last |
struct request * | requests |
struct request * | requests_last |
char | started |
Routines used by the Flowgrind daemon.
Definition in file daemon.h.
#define DEFAULT_SELECT_TIMEOUT 10000000 |
enum flow_state_t |
void* daemon_main | ( | void * | ptr | ) |
int dispatch_request | ( | struct request * | request, |
int | type | ||
) |
void flow_error | ( | struct flow * | flow, |
const char * | fmt, | ||
... | |||
) |
void get_uuid_string | ( | char * | uuid_str | ) |
To generate daemon UUID.
Generate the daemon UUID and convert the UUID to a string data. UUID is generated by daemon only once and stored in the global variable. The daemon return the same UUID for all the flows it maintaining. This UUID is taken as a reference to identify the daemon in the controller.
[in,out] | uuid_str | daemons UUID |
Definition at line 1536 of file daemon.c.
void request_error | ( | struct request * | request, |
const char * | fmt, | ||
... | |||
) |
struct linked_list flows |