netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
printflow.c File Reference
#include <string.h>
#include <arpa/inet.h>
#include <netinet/ip.h>
#include <netinet/ip_icmp.h>
#include <ulogd/ulogd.h>
#include <ulogd/printflow.h>
Include dependency graph for printflow.c:

Macros

#define pp_pri(type)   PRI##type
 
#define pp_print_u(buf_cur, label, res, x, type)
 

Enumerations

enum  printflow_fields {
  PRINTFLOW_ORIG_IP_SADDR = 0,
  PRINTFLOW_ORIG_IP_DADDR,
  PRINTFLOW_ORIG_IP_PROTOCOL,
  PRINTFLOW_ORIG_L4_SPORT,
  PRINTFLOW_ORIG_L4_DPORT,
  PRINTFLOW_ORIG_RAW_PKTLEN,
  PRINTFLOW_ORIG_RAW_PKTCOUNT,
  PRINTFLOW_REPLY_IP_SADDR,
  PRINTFLOW_REPLY_IP_DADDR,
  PRINTFLOW_REPLY_IP_PROTOCOL,
  PRINTFLOW_REPLY_L4_SPORT,
  PRINTFLOW_REPLY_L4_DPORT,
  PRINTFLOW_REPLY_RAW_PKTLEN,
  PRINTFLOW_REPLY_RAW_PKTCOUNT,
  PRINTFLOW_ICMP_CODE,
  PRINTFLOW_ICMP_TYPE,
  PRINTFLOW_EVENT_TYPE
}
 

Functions

int printflow_print (struct ulogd_key *res, char *buf)
 

Variables

struct ulogd_key printflow_keys [FLOW_IDS]
 
int printflow_keys_num = sizeof(printflow_keys)/sizeof(*printflow_keys)
 

Macro Definition Documentation

#define pp_pri (   type)    PRI##type
#define pp_print_u (   buf_cur,
  label,
  res,
  x,
  type 
)
Value:
if (pp_is_valid(res, x)) \
buf_cur += sprintf(buf_cur, label"=%" pp_pri(type) " ", ikey_get_##type(&res[x]));
struct expr
#define pp_is_valid(res, x)
Definition: ulogd.h:311
void size_t u_int16_t type
Definition: libnetfilter_conntrack.h:557
#define pp_pri(type)
Definition: printflow.c:138
struct nfct_bitmask * label
Definition: conntrack.c:84

Referenced by printflow_print().

Enumeration Type Documentation

Enumerator
PRINTFLOW_ORIG_IP_SADDR 
PRINTFLOW_ORIG_IP_DADDR 
PRINTFLOW_ORIG_IP_PROTOCOL 
PRINTFLOW_ORIG_L4_SPORT 
PRINTFLOW_ORIG_L4_DPORT 
PRINTFLOW_ORIG_RAW_PKTLEN 
PRINTFLOW_ORIG_RAW_PKTCOUNT 
PRINTFLOW_REPLY_IP_SADDR 
PRINTFLOW_REPLY_IP_DADDR 
PRINTFLOW_REPLY_IP_PROTOCOL 
PRINTFLOW_REPLY_L4_SPORT 
PRINTFLOW_REPLY_L4_DPORT 
PRINTFLOW_REPLY_RAW_PKTLEN 
PRINTFLOW_REPLY_RAW_PKTCOUNT 
PRINTFLOW_ICMP_CODE 
PRINTFLOW_ICMP_TYPE 
PRINTFLOW_EVENT_TYPE 

Function Documentation

Variable Documentation

struct ulogd_key printflow_keys[FLOW_IDS]
int printflow_keys_num = sizeof(printflow_keys)/sizeof(*printflow_keys)