Flowgrind
Advanced TCP traffic generator
flowgrind.h File Reference

Flowgrind controller. More...

#include "config.h"
#include <stdbool.h>
#include <limits.h>
#include "common.h"
#include "fg_list.h"

Go to the source code of this file.

Data Structures

struct  cflow
 Infos about the flow including flow options. More...
 
struct  column
 Intermediated interval report column. More...
 
struct  column_header
 Header of an intermediated interval report column. More...
 
struct  column_state
 State of an intermediated interval report column. More...
 
struct  controller_options
 Controller options. More...
 
struct  daemon
 Infos about a flowgrind daemon. More...
 
struct  flow_endpoint
 Infos about the flow endpoint. More...
 
struct  rpc_info
 Infos about a flowgrind daemon and daemon-controller connection. More...
 

Macros

#define GUARDBAND   2
 Number of whitespaces between to two interval report columns. More...
 
#define MAX_COLUM_TOO_LARGE   5
 How often an interval report column can be too large before get shrinked. More...
 
#define MAX_REPORTS_IN_ROW   25
 Number of emited reports before interval header is printed again. More...
 

Enumerations

enum  column_id {
  COL_FLOW_ID = 0, COL_BEGIN, COL_END, COL_THROUGH,
  COL_TRANSAC, COL_BLOCK_REQU, COL_BLOCK_RESP, COL_RTT_MIN,
  COL_RTT_AVG, COL_RTT_MAX, COL_IAT_MIN, COL_IAT_AVG,
  COL_IAT_MAX, COL_DLY_MIN, COL_DLY_AVG, COL_DLY_MAX,
  COL_TCP_CWND, COL_TCP_SSTH, COL_TCP_UACK, COL_TCP_SACK,
  COL_TCP_LOST, COL_TCP_RETR, COL_TCP_TRET, COL_TCP_FACK,
  COL_TCP_REOR, COL_TCP_BKOF, COL_TCP_RTT, COL_TCP_RTTVAR,
  COL_TCP_RTO, COL_TCP_CA_STATE, COL_SMSS, COL_PMTU,
  COL_STATUS, NUM_COL
}
 IDs to explicit address an intermediated interval report column. More...
 
enum  long_opt_only { LOG_FILE_OPTION = CHAR_MAX + 1 }
 For long options with no equivalent short option, use pseudo short option. More...
 
enum  mutex_context_t { MUTEX_CONTEXT_CONTROLLER = 0, MUTEX_CONTEXT_TWO_SIDED, MUTEX_CONTEXT_SOURCE, MUTEX_CONTEXT_DESTINATION }
 Mutual exclusion contexts for options. More...
 
enum  option_t { OPT_CONTROLLER, OPT_SELECTOR, OPT_FLOW, OPT_FLOW_ENDPOINT }
 Option types in flowgrind controller. More...
 
enum  os_t { LINUX = 0, FREEBSD, DARWIN, NUM_OSes }
 Supported operating systems. More...
 
enum  protocol_t { PROTO_TCP = 1, PROTO_UDP }
 Transport protocols. More...
 
enum  tcp_stack_t { SEGMENT_BASED = 0, BYTE_BASED }
 Unit of the TCP Stack. More...
 

Detailed Description

Flowgrind controller.

Definition in file flowgrind.h.

Macro Definition Documentation

#define GUARDBAND   2

Number of whitespaces between to two interval report columns.

Definition at line 44 of file flowgrind.h.

#define MAX_COLUM_TOO_LARGE   5

How often an interval report column can be too large before get shrinked.

Definition at line 47 of file flowgrind.h.

#define MAX_REPORTS_IN_ROW   25

Number of emited reports before interval header is printed again.

Definition at line 50 of file flowgrind.h.

Enumeration Type Documentation

enum column_id

IDs to explicit address an intermediated interval report column.

Enumerator
COL_FLOW_ID 

Flow ID.

COL_BEGIN 

Report interval.

COL_END 

Report interval.

COL_THROUGH 

Throughput per seconds.

COL_TRANSAC 

Transactions per second.

COL_BLOCK_REQU 

Blocks per second.

COL_BLOCK_RESP 

Blocks per second.

COL_RTT_MIN 

Application level round-trip time.

COL_RTT_AVG 

Application level round-trip time.

COL_RTT_MAX 

Application level round-trip time.

COL_IAT_MIN 

Application level inter-arrival time.

COL_IAT_AVG 

Application level inter-arrival time.

COL_IAT_MAX 

Application level inter-arrival time.

COL_DLY_MIN 

Application level one-way delay.

COL_DLY_AVG 

Application level one-way delay.

COL_DLY_MAX 

Application level one-way delay.

COL_TCP_CWND 

Metric from the Linux / BSD TCP stack.

COL_TCP_SSTH 

Metric from the Linux / BSD TCP stack.

COL_TCP_UACK 

Metric from the Linux / BSD TCP stack.

COL_TCP_SACK 

Metric from the Linux / BSD TCP stack.

COL_TCP_LOST 

Metric from the Linux / BSD TCP stack.

COL_TCP_RETR 

Metric from the Linux / BSD TCP stack.

COL_TCP_TRET 

Metric from the Linux / BSD TCP stack.

COL_TCP_FACK 

Metric from the Linux / BSD TCP stack.

COL_TCP_REOR 

Metric from the Linux / BSD TCP stack.

COL_TCP_BKOF 

Metric from the Linux / BSD TCP stack.

COL_TCP_RTT 

Metric from the Linux / BSD TCP stack.

COL_TCP_RTTVAR 

Metric from the Linux / BSD TCP stack.

COL_TCP_RTO 

Metric from the Linux / BSD TCP stack.

COL_TCP_CA_STATE 

Metric from the Linux / BSD TCP stack.

COL_SMSS 

Metric from the Linux / BSD TCP stack.

COL_PMTU 

Metric from the Linux / BSD TCP stack.

COL_STATUS 

Read / write status.

NUM_COL 

Number of elements in enum.

Must be last element.

Definition at line 97 of file flowgrind.h.

97  {
99  COL_FLOW_ID = 0,
101  COL_BEGIN,
102  COL_END,
104  COL_THROUGH,
106  COL_TRANSAC,
111  COL_RTT_MIN,
112  COL_RTT_AVG,
113  COL_RTT_MAX,
115  COL_IAT_MIN,
116  COL_IAT_AVG,
117  COL_IAT_MAX,
119  COL_DLY_MIN,
120  COL_DLY_AVG,
121  COL_DLY_MAX,
123  COL_TCP_CWND,
124  COL_TCP_SSTH,
125  COL_TCP_UACK,
126  COL_TCP_SACK,
127  COL_TCP_LOST,
128  COL_TCP_RETR,
129  COL_TCP_TRET,
130  COL_TCP_FACK,
131  COL_TCP_REOR,
132  COL_TCP_BKOF,
133  COL_TCP_RTT,
135  COL_TCP_RTO,
137  COL_SMSS,
138  COL_PMTU,
139 #ifdef DEBUG
140 
141  COL_STATUS,
142 #endif /* DEBUG */
143 
144  NUM_COL,
145 };
Number of elements in enum.
Definition: flowgrind.h:144
Metric from the Linux / BSD TCP stack.
Definition: flowgrind.h:126
Metric from the Linux / BSD TCP stack.
Definition: flowgrind.h:135
Metric from the Linux / BSD TCP stack.
Definition: flowgrind.h:138
Report interval.
Definition: flowgrind.h:102
Metric from the Linux / BSD TCP stack.
Definition: flowgrind.h:130
Metric from the Linux / BSD TCP stack.
Definition: flowgrind.h:134
Metric from the Linux / BSD TCP stack.
Definition: flowgrind.h:132
Metric from the Linux / BSD TCP stack.
Definition: flowgrind.h:133
Metric from the Linux / BSD TCP stack.
Definition: flowgrind.h:125
Metric from the Linux / BSD TCP stack.
Definition: flowgrind.h:136
Application level round-trip time.
Definition: flowgrind.h:113
Application level one-way delay.
Definition: flowgrind.h:119
Throughput per seconds.
Definition: flowgrind.h:104
Application level round-trip time.
Definition: flowgrind.h:112
Transactions per second.
Definition: flowgrind.h:106
Metric from the Linux / BSD TCP stack.
Definition: flowgrind.h:128
Metric from the Linux / BSD TCP stack.
Definition: flowgrind.h:127
Application level inter-arrival time.
Definition: flowgrind.h:117
Blocks per second.
Definition: flowgrind.h:109
Metric from the Linux / BSD TCP stack.
Definition: flowgrind.h:124
Application level round-trip time.
Definition: flowgrind.h:111
Metric from the Linux / BSD TCP stack.
Definition: flowgrind.h:123
Report interval.
Definition: flowgrind.h:101
Application level one-way delay.
Definition: flowgrind.h:121
Flow ID.
Definition: flowgrind.h:99
Metric from the Linux / BSD TCP stack.
Definition: flowgrind.h:131
Application level inter-arrival time.
Definition: flowgrind.h:116
Blocks per second.
Definition: flowgrind.h:108
Metric from the Linux / BSD TCP stack.
Definition: flowgrind.h:129
Metric from the Linux / BSD TCP stack.
Definition: flowgrind.h:137
Application level one-way delay.
Definition: flowgrind.h:120
Application level inter-arrival time.
Definition: flowgrind.h:115
Read / write status.
Definition: flowgrind.h:141

For long options with no equivalent short option, use pseudo short option.

Enumerator
LOG_FILE_OPTION 

Pseudo short option for option –log-file.

Definition at line 172 of file flowgrind.h.

172  {
174  LOG_FILE_OPTION = CHAR_MAX + 1,
175 };
Pseudo short option for option –log-file.
Definition: flowgrind.h:174

Mutual exclusion contexts for options.

Enumerator
MUTEX_CONTEXT_CONTROLLER 

Context for controller options.

MUTEX_CONTEXT_TWO_SIDED 

Context for flow options for both endpoints.

MUTEX_CONTEXT_SOURCE 

Context for flow options on source side.

MUTEX_CONTEXT_DESTINATION 

Context for flow options on destination side.

Definition at line 160 of file flowgrind.h.

160  {
169 };
Context for flow options on source side.
Definition: flowgrind.h:166
Context for controller options.
Definition: flowgrind.h:162
Context for flow options on destination side.
Definition: flowgrind.h:168
Context for flow options for both endpoints.
Definition: flowgrind.h:164
enum option_t

Option types in flowgrind controller.

Enumerator
OPT_CONTROLLER 

General controller options.

OPT_SELECTOR 

Selects a subset of flows to apply options to (-F).

OPT_FLOW 

Flow option without endpoint string.

OPT_FLOW_ENDPOINT 

Flow option with endpoint string.

Definition at line 148 of file flowgrind.h.

148  {
152  OPT_SELECTOR,
154  OPT_FLOW,
157 };
Flow option without endpoint string.
Definition: flowgrind.h:154
General controller options.
Definition: flowgrind.h:150
Flow option with endpoint string.
Definition: flowgrind.h:156
Selects a subset of flows to apply options to (-F).
Definition: flowgrind.h:152
enum os_t

Supported operating systems.

Enumerator
LINUX 

Linux.

FREEBSD 

FreeBSD.

DARWIN 

Apple OS X.

NUM_OSes 

Number of elements in enum.

Must be last element.

Definition at line 61 of file flowgrind.h.

61  {
63  LINUX = 0,
65  FREEBSD,
67  DARWIN,
69  NUM_OSes,
70 };
Apple OS X.
Definition: flowgrind.h:67
Number of elements in enum.
Definition: flowgrind.h:69
Linux.
Definition: flowgrind.h:63
FreeBSD.
Definition: flowgrind.h:65
enum protocol_t

Transport protocols.

Enumerator
PROTO_TCP 

Transmission Control Protocol.

PROTO_UDP 

User Datagram Protocol.

Definition at line 53 of file flowgrind.h.

53  {
55  PROTO_TCP = 1,
57  PROTO_UDP,
58 };
User Datagram Protocol.
Definition: flowgrind.h:57
Transmission Control Protocol.
Definition: flowgrind.h:55

Unit of the TCP Stack.

Enumerator
SEGMENT_BASED 

Linux is a segment-based stack.

BYTE_BASED 

FreeBSD and OS X stack is a bytes-based stack.

Definition at line 73 of file flowgrind.h.

73  {
75  SEGMENT_BASED = 0,
77  BYTE_BASED,
78 };
Linux is a segment-based stack.
Definition: flowgrind.h:75
FreeBSD and OS X stack is a bytes-based stack.
Definition: flowgrind.h:77