FreeBSD kernel netgraph code
netflow.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  netflow_v1_header
 
struct  netflow_v5_header
 
struct  netflow_v9_header
 
struct  netflow_v1_record
 
struct  netflow_v5_record
 
struct  netflow_v5_export_dgram
 

Macros

#define ACTIVE_TIMEOUT   (30*60) /* maximum flow lifetime is 30 min */
 
#define INACTIVE_TIMEOUT   15
 
#define NETFLOW_V1   1
 
#define NETFLOW_V5   5
 
#define NETFLOW_V9   9
 
#define NETFLOW_V1_MAX_RECORDS   24
 
#define NETFLOW_V5_MAX_RECORDS   30
 
#define NETFLOW_V1_MAX_SIZE
 
#define NETFLOW_V5_MAX_SIZE
 
#define NETFLOW_V9_FIELD_IN_BYTES   1 /* Input bytes count for a flow. Default 4, can be 8 */
 
#define NETFLOW_V9_FIELD_IN_PKTS   2 /* Incoming counter with number of packets associated with an IP Flow. Default 4 */
 
#define NETFLOW_V9_FIELD_FLOWS   3 /* Number of Flows that were aggregated. Default 4 */
 
#define NETFLOW_V9_FIELD_PROTOCOL   4 /* IP protocol byte. 1 */
 
#define NETFLOW_V9_FIELD_TOS   5 /* Type of service byte setting when entering the incoming interface. 1 */
 
#define NETFLOW_V9_FIELD_TCP_FLAGS   6 /* TCP flags; cumulative of all the TCP flags seen in this Flow. 1 */
 
#define NETFLOW_V9_FIELD_L4_SRC_PORT   7 /* TCP/UDP source port number. 2 */
 
#define NETFLOW_V9_FIELD_IPV4_SRC_ADDR   8 /* IPv4 source address. 4 */
 
#define NETFLOW_V9_FIELD_SRC_MASK   9 /* The number of contiguous bits in the source subnet mask (i.e., the mask in slash notation). 1 */
 
#define NETFLOW_V9_FIELD_INPUT_SNMP   10 /* Input interface index. Default 2 */
 
#define NETFLOW_V9_FIELD_L4_DST_PORT   11 /* TCP/UDP destination port number. 2 */
 
#define NETFLOW_V9_FIELD_IPV4_DST_ADDR   12 /* IPv4 destination address. 4 */
 
#define NETFLOW_V9_FIELD_DST_MASK   13 /* The number of contiguous bits in the destination subnet mask (i.e., the mask in slash notation). 1 */
 
#define NETFLOW_V9_FIELD_OUTPUT_SNMP   14 /* Output interface index. Default 2 */
 
#define NETFLOW_V9_FIELD_IPV4_NEXT_HOP   15 /* IPv4 address of the next-hop router. 4 */
 
#define NETFLOW_V9_FIELD_SRC_AS   16 /* Source BGP autonomous system number. Default 2, can be 4 */
 
#define NETFLOW_V9_FIELD_DST_AS   17 /* Destination BGP autonomous system number. Default 2, can be 4 */
 
#define NETFLOW_V9_FIELD_BGP_IPV4_NEXT_HOP   18 /* Next-hop router's IP address in the BGP domain. 4 */
 
#define NETFLOW_V9_FIELD_MUL_DST_PKTS   19 /* IP multicast outgoing packet counter for packets associated with IP flow. Default 4 */
 
#define NETFLOW_V9_FIELD_MUL_DST_BYTES   20 /* IP multicast outgoing Octet (byte) counter for the number of bytes associated with IP flow. Default 4 */
 
#define NETFLOW_V9_FIELD_LAST_SWITCHED   21 /* sysUptime in msec at which the last packet of this Flow was switched. 4 */
 
#define NETFLOW_V9_FIELD_FIRST_SWITCHED   22 /* sysUptime in msec at which the first packet of this Flow was switched. 4 */
 
#define NETFLOW_V9_FIELD_OUT_BYTES   23 /* Outgoing counter for the number of bytes associated with an IP Flow. Default 4 */
 
#define NETFLOW_V9_FIELD_OUT_PKTS   24 /* Outgoing counter for the number of packets associated with an IP Flow. Default 4 */
 
#define NETFLOW_V9_FIELD_IPV6_SRC_ADDR   27 /* IPv6 source address. 16 */
 
#define NETFLOW_V9_FIELD_IPV6_DST_ADDR   28 /* IPv6 destination address. 16 */
 
#define NETFLOW_V9_FIELD_IPV6_SRC_MASK   29 /* Length of the IPv6 source mask in contiguous bits. 1 */
 
#define NETFLOW_V9_FIELD_IPV6_DST_MASK   30 /* Length of the IPv6 destination mask in contiguous bits. 1 */
 
#define NETFLOW_V9_FIELD_IPV6_FLOW_LABEL   31 /* IPv6 flow label as per RFC 2460 definition. 3 */
 
#define NETFLOW_V9_FIELD_ICMP_TYPE   32 /* Internet Control Message Protocol (ICMP) packet type; reported as ICMP Type * 256 + ICMP code. 2 */
 
#define NETFLOW_V9_FIELD_MUL_IGMP_TYPE   33 /* Internet Group Management Protocol (IGMP) packet type. 1 */
 
#define NETFLOW_V9_FIELD_SAMPLING_INTERVAL   34 /* When using sampled NetFlow, the rate at which packets are sampled; for example, a value of 100 indicates that one of every hundred packets is sampled. 4 */
 
#define NETFLOW_V9_FIELD_SAMPLING_ALGORITHM   35 /* For sampled NetFlow platform-wide: 0x01 deterministic sampling 0x02 random sampling. 1 */
 
#define NETFLOW_V9_FIELD_FLOW_ACTIVE_TIMEOUT   36 /* Timeout value (in seconds) for active flow entries in the NetFlow cache. 2 */
 
#define NETFLOW_V9_FIELD_FLOW_INACTIVE_TIMEOUT   37 /* Timeout value (in seconds) for inactive Flow entries in the NetFlow cache. 2 */
 
#define NETFLOW_V9_FIELD_ENGINE_TYPE   38 /* Type of Flow switching engine (route processor, linecard, etc...). 1 */
 
#define NETFLOW_V9_FIELD_ENGINE_ID   39 /* ID number of the Flow switching engine. 1 */
 
#define NETFLOW_V9_FIELD_TOTAL_BYTES_EXP   40 /* Counter with for the number of bytes exported by the Observation Domain. Default 4 */
 
#define NETFLOW_V9_FIELD_TOTAL_PKTS_EXP   41 /* Counter with for the number of packets exported by the Observation Domain. Default 4 */
 
#define NETFLOW_V9_FIELD_TOTAL_FLOWS_EXP   42 /* Counter with for the number of flows exported by the Observation Domain. Default 4 */
 
#define NETFLOW_V9_FIELD_MPLS_TOP_LABEL_TYPE   46 /* MPLS Top Label Type. 1 */
 
#define NETFLOW_V9_FIELD_MPLS_TOP_LABEL_IP_ADDR   47 /* Forwarding Equivalent Class corresponding to the MPLS Top Label. 4 */
 
#define NETFLOW_V9_FIELD_FLOW_SAMPLER_ID   48 /* Identifier shown in "show flow-sampler". 1 */
 
#define NETFLOW_V9_FIELD_FLOW_SAMPLER_MODE   49 /* The type of algorithm used for sampling data. 2 */
 
#define NETFLOW_V9_FIELD_FLOW_SAMPLER_RANDOM_INTERVAL   50 /* Packet interval at which to sample. 4. */
 
#define NETFLOW_V9_FIELD_DST_TOS   55 /* Type of Service byte setting when exiting outgoing interface. 1. */
 
#define NETFLOW_V9_FIELD_SRC_MAC   56 /* Source MAC Address. 6 */
 
#define NETFLOW_V9_FIELD_DST_MAC   57 /* Destination MAC Address. 6 */
 
#define NETFLOW_V9_FIELD_SRC_VLAN   58 /* Virtual LAN identifier associated with ingress interface. 2 */
 
#define NETFLOW_V9_FIELD_DST_VLAN   59 /* Virtual LAN identifier associated with egress interface. 2 */
 
#define NETFLOW_V9_FIELD_IP_PROTOCOL_VERSION   60 /* Internet Protocol Version. Set to 4 for IPv4, set to 6 for IPv6. If not present in the template, then version 4 is assumed. 1. */
 
#define NETFLOW_V9_FIELD_DIRECTION   61 /* Flow direction: 0 - ingress flow 1 - egress flow. 1 */
 
#define NETFLOW_V9_FIELD_IPV6_NEXT_HOP   62 /* IPv6 address of the next-hop router. 16 */
 
#define NETFLOW_V9_FIELD_BGP_IPV6_NEXT_HOP   63 /* Next-hop router in the BGP domain. 16 */
 
#define NETFLOW_V9_FIELD_IPV6_OPTION_HEADERS   64 /* Bit-encoded field identifying IPv6 option headers found in the flow */
 
#define NETFLOW_V9_FIELD_MPLS_LABEL_1   70 /* MPLS label at position 1 in the stack. 3 */
 
#define NETFLOW_V9_FIELD_MPLS_LABEL_2   71 /* MPLS label at position 2 in the stack. 3 */
 
#define NETFLOW_V9_FIELD_MPLS_LABEL_3   72 /* MPLS label at position 3 in the stack. 3 */
 
#define NETFLOW_V9_FIELD_MPLS_LABEL_4   73 /* MPLS label at position 4 in the stack. 3 */
 
#define NETFLOW_V9_FIELD_MPLS_LABEL_5   74 /* MPLS label at position 5 in the stack. 3 */
 
#define NETFLOW_V9_FIELD_MPLS_LABEL_6   75 /* MPLS label at position 6 in the stack. 3 */
 
#define NETFLOW_V9_FIELD_MPLS_LABEL_7   76 /* MPLS label at position 7 in the stack. 3 */
 
#define NETFLOW_V9_FIELD_MPLS_LABEL_8   77 /* MPLS label at position 8 in the stack. 3 */
 
#define NETFLOW_V9_FIELD_MPLS_LABEL_9   78 /* MPLS label at position 9 in the stack. 3 */
 
#define NETFLOW_V9_FIELD_MPLS_LABEL_10   79 /* MPLS label at position 10 in the stack. 3 */
 
#define NETFLOW_V9_MAX_RESERVED_FLOWSET   0xFF /* Clause 5.2 */
 

Functions

struct netflow_v1_header __attribute__ ((__packed__))
 

Variables

uint16_t version
 
uint16_t count
 
uint32_t sys_uptime
 
uint32_t unix_secs
 
uint32_t unix_nsecs
 
uint32_t flow_seq
 
uint8_t engine_type
 
uint8_t engine_id
 
uint16_t pad
 
uint32_t seq_num
 
uint32_t source_id
 
uint32_t src_addr
 
uint32_t dst_addr
 
uint32_t next_hop
 
uint16_t in_ifx
 
uint16_t out_ifx
 
uint32_t packets
 
uint32_t octets
 
uint32_t first
 
uint32_t last
 
uint16_t s_port
 
uint16_t d_port
 
uint16_t pad1
 
uint8_t prot
 
uint8_t tos
 
uint8_t flags
 
uint8_t pad2
 
uint16_t pad3
 
uint8_t reserved [5]
 
uint16_t i_ifx
 
uint16_t o_ifx
 
uint16_t src_as
 
uint16_t dst_as
 
uint8_t src_mask
 
uint8_t dst_mask
 
struct netflow_v5_header header
 
struct netflow_v5_record r [NETFLOW_V5_MAX_RECORDS]
 

Macro Definition Documentation

◆ ACTIVE_TIMEOUT

#define ACTIVE_TIMEOUT   (30*60) /* maximum flow lifetime is 30 min */

Definition at line 35 of file netflow.h.

◆ INACTIVE_TIMEOUT

#define INACTIVE_TIMEOUT   15

Definition at line 36 of file netflow.h.

◆ NETFLOW_V1

#define NETFLOW_V1   1

Definition at line 53 of file netflow.h.

◆ NETFLOW_V1_MAX_RECORDS

#define NETFLOW_V1_MAX_RECORDS   24

Definition at line 135 of file netflow.h.

◆ NETFLOW_V1_MAX_SIZE

#define NETFLOW_V1_MAX_SIZE
Value:

Definition at line 138 of file netflow.h.

◆ NETFLOW_V5

#define NETFLOW_V5   5

Definition at line 54 of file netflow.h.

◆ NETFLOW_V5_MAX_RECORDS

#define NETFLOW_V5_MAX_RECORDS   30

Definition at line 136 of file netflow.h.

◆ NETFLOW_V5_MAX_SIZE

#define NETFLOW_V5_MAX_SIZE
Value:

Definition at line 140 of file netflow.h.

◆ NETFLOW_V9

#define NETFLOW_V9   9

Definition at line 55 of file netflow.h.

◆ NETFLOW_V9_FIELD_BGP_IPV4_NEXT_HOP

#define NETFLOW_V9_FIELD_BGP_IPV4_NEXT_HOP   18 /* Next-hop router's IP address in the BGP domain. 4 */

Definition at line 166 of file netflow.h.

◆ NETFLOW_V9_FIELD_BGP_IPV6_NEXT_HOP

#define NETFLOW_V9_FIELD_BGP_IPV6_NEXT_HOP   63 /* Next-hop router in the BGP domain. 16 */

Definition at line 202 of file netflow.h.

◆ NETFLOW_V9_FIELD_DIRECTION

#define NETFLOW_V9_FIELD_DIRECTION   61 /* Flow direction: 0 - ingress flow 1 - egress flow. 1 */

Definition at line 200 of file netflow.h.

◆ NETFLOW_V9_FIELD_DST_AS

#define NETFLOW_V9_FIELD_DST_AS   17 /* Destination BGP autonomous system number. Default 2, can be 4 */

Definition at line 165 of file netflow.h.

◆ NETFLOW_V9_FIELD_DST_MAC

#define NETFLOW_V9_FIELD_DST_MAC   57 /* Destination MAC Address. 6 */

Definition at line 196 of file netflow.h.

◆ NETFLOW_V9_FIELD_DST_MASK

#define NETFLOW_V9_FIELD_DST_MASK   13 /* The number of contiguous bits in the destination subnet mask (i.e., the mask in slash notation). 1 */

Definition at line 161 of file netflow.h.

◆ NETFLOW_V9_FIELD_DST_TOS

#define NETFLOW_V9_FIELD_DST_TOS   55 /* Type of Service byte setting when exiting outgoing interface. 1. */

Definition at line 194 of file netflow.h.

◆ NETFLOW_V9_FIELD_DST_VLAN

#define NETFLOW_V9_FIELD_DST_VLAN   59 /* Virtual LAN identifier associated with egress interface. 2 */

Definition at line 198 of file netflow.h.

◆ NETFLOW_V9_FIELD_ENGINE_ID

#define NETFLOW_V9_FIELD_ENGINE_ID   39 /* ID number of the Flow switching engine. 1 */

Definition at line 185 of file netflow.h.

◆ NETFLOW_V9_FIELD_ENGINE_TYPE

#define NETFLOW_V9_FIELD_ENGINE_TYPE   38 /* Type of Flow switching engine (route processor, linecard, etc...). 1 */

Definition at line 184 of file netflow.h.

◆ NETFLOW_V9_FIELD_FIRST_SWITCHED

#define NETFLOW_V9_FIELD_FIRST_SWITCHED   22 /* sysUptime in msec at which the first packet of this Flow was switched. 4 */

Definition at line 170 of file netflow.h.

◆ NETFLOW_V9_FIELD_FLOW_ACTIVE_TIMEOUT

#define NETFLOW_V9_FIELD_FLOW_ACTIVE_TIMEOUT   36 /* Timeout value (in seconds) for active flow entries in the NetFlow cache. 2 */

Definition at line 182 of file netflow.h.

◆ NETFLOW_V9_FIELD_FLOW_INACTIVE_TIMEOUT

#define NETFLOW_V9_FIELD_FLOW_INACTIVE_TIMEOUT   37 /* Timeout value (in seconds) for inactive Flow entries in the NetFlow cache. 2 */

Definition at line 183 of file netflow.h.

◆ NETFLOW_V9_FIELD_FLOW_SAMPLER_ID

#define NETFLOW_V9_FIELD_FLOW_SAMPLER_ID   48 /* Identifier shown in "show flow-sampler". 1 */

Definition at line 191 of file netflow.h.

◆ NETFLOW_V9_FIELD_FLOW_SAMPLER_MODE

#define NETFLOW_V9_FIELD_FLOW_SAMPLER_MODE   49 /* The type of algorithm used for sampling data. 2 */

Definition at line 192 of file netflow.h.

◆ NETFLOW_V9_FIELD_FLOW_SAMPLER_RANDOM_INTERVAL

#define NETFLOW_V9_FIELD_FLOW_SAMPLER_RANDOM_INTERVAL   50 /* Packet interval at which to sample. 4. */

Definition at line 193 of file netflow.h.

◆ NETFLOW_V9_FIELD_FLOWS

#define NETFLOW_V9_FIELD_FLOWS   3 /* Number of Flows that were aggregated. Default 4 */

Definition at line 151 of file netflow.h.

◆ NETFLOW_V9_FIELD_ICMP_TYPE

#define NETFLOW_V9_FIELD_ICMP_TYPE   32 /* Internet Control Message Protocol (ICMP) packet type; reported as ICMP Type * 256 + ICMP code. 2 */

Definition at line 178 of file netflow.h.

◆ NETFLOW_V9_FIELD_IN_BYTES

#define NETFLOW_V9_FIELD_IN_BYTES   1 /* Input bytes count for a flow. Default 4, can be 8 */

Definition at line 149 of file netflow.h.

◆ NETFLOW_V9_FIELD_IN_PKTS

#define NETFLOW_V9_FIELD_IN_PKTS   2 /* Incoming counter with number of packets associated with an IP Flow. Default 4 */

Definition at line 150 of file netflow.h.

◆ NETFLOW_V9_FIELD_INPUT_SNMP

#define NETFLOW_V9_FIELD_INPUT_SNMP   10 /* Input interface index. Default 2 */

Definition at line 158 of file netflow.h.

◆ NETFLOW_V9_FIELD_IP_PROTOCOL_VERSION

#define NETFLOW_V9_FIELD_IP_PROTOCOL_VERSION   60 /* Internet Protocol Version. Set to 4 for IPv4, set to 6 for IPv6. If not present in the template, then version 4 is assumed. 1. */

Definition at line 199 of file netflow.h.

◆ NETFLOW_V9_FIELD_IPV4_DST_ADDR

#define NETFLOW_V9_FIELD_IPV4_DST_ADDR   12 /* IPv4 destination address. 4 */

Definition at line 160 of file netflow.h.

◆ NETFLOW_V9_FIELD_IPV4_NEXT_HOP

#define NETFLOW_V9_FIELD_IPV4_NEXT_HOP   15 /* IPv4 address of the next-hop router. 4 */

Definition at line 163 of file netflow.h.

◆ NETFLOW_V9_FIELD_IPV4_SRC_ADDR

#define NETFLOW_V9_FIELD_IPV4_SRC_ADDR   8 /* IPv4 source address. 4 */

Definition at line 156 of file netflow.h.

◆ NETFLOW_V9_FIELD_IPV6_DST_ADDR

#define NETFLOW_V9_FIELD_IPV6_DST_ADDR   28 /* IPv6 destination address. 16 */

Definition at line 174 of file netflow.h.

◆ NETFLOW_V9_FIELD_IPV6_DST_MASK

#define NETFLOW_V9_FIELD_IPV6_DST_MASK   30 /* Length of the IPv6 destination mask in contiguous bits. 1 */

Definition at line 176 of file netflow.h.

◆ NETFLOW_V9_FIELD_IPV6_FLOW_LABEL

#define NETFLOW_V9_FIELD_IPV6_FLOW_LABEL   31 /* IPv6 flow label as per RFC 2460 definition. 3 */

Definition at line 177 of file netflow.h.

◆ NETFLOW_V9_FIELD_IPV6_NEXT_HOP

#define NETFLOW_V9_FIELD_IPV6_NEXT_HOP   62 /* IPv6 address of the next-hop router. 16 */

Definition at line 201 of file netflow.h.

◆ NETFLOW_V9_FIELD_IPV6_OPTION_HEADERS

#define NETFLOW_V9_FIELD_IPV6_OPTION_HEADERS   64 /* Bit-encoded field identifying IPv6 option headers found in the flow */

Definition at line 203 of file netflow.h.

◆ NETFLOW_V9_FIELD_IPV6_SRC_ADDR

#define NETFLOW_V9_FIELD_IPV6_SRC_ADDR   27 /* IPv6 source address. 16 */

Definition at line 173 of file netflow.h.

◆ NETFLOW_V9_FIELD_IPV6_SRC_MASK

#define NETFLOW_V9_FIELD_IPV6_SRC_MASK   29 /* Length of the IPv6 source mask in contiguous bits. 1 */

Definition at line 175 of file netflow.h.

◆ NETFLOW_V9_FIELD_L4_DST_PORT

#define NETFLOW_V9_FIELD_L4_DST_PORT   11 /* TCP/UDP destination port number. 2 */

Definition at line 159 of file netflow.h.

◆ NETFLOW_V9_FIELD_L4_SRC_PORT

#define NETFLOW_V9_FIELD_L4_SRC_PORT   7 /* TCP/UDP source port number. 2 */

Definition at line 155 of file netflow.h.

◆ NETFLOW_V9_FIELD_LAST_SWITCHED

#define NETFLOW_V9_FIELD_LAST_SWITCHED   21 /* sysUptime in msec at which the last packet of this Flow was switched. 4 */

Definition at line 169 of file netflow.h.

◆ NETFLOW_V9_FIELD_MPLS_LABEL_1

#define NETFLOW_V9_FIELD_MPLS_LABEL_1   70 /* MPLS label at position 1 in the stack. 3 */

Definition at line 204 of file netflow.h.

◆ NETFLOW_V9_FIELD_MPLS_LABEL_10

#define NETFLOW_V9_FIELD_MPLS_LABEL_10   79 /* MPLS label at position 10 in the stack. 3 */

Definition at line 213 of file netflow.h.

◆ NETFLOW_V9_FIELD_MPLS_LABEL_2

#define NETFLOW_V9_FIELD_MPLS_LABEL_2   71 /* MPLS label at position 2 in the stack. 3 */

Definition at line 205 of file netflow.h.

◆ NETFLOW_V9_FIELD_MPLS_LABEL_3

#define NETFLOW_V9_FIELD_MPLS_LABEL_3   72 /* MPLS label at position 3 in the stack. 3 */

Definition at line 206 of file netflow.h.

◆ NETFLOW_V9_FIELD_MPLS_LABEL_4

#define NETFLOW_V9_FIELD_MPLS_LABEL_4   73 /* MPLS label at position 4 in the stack. 3 */

Definition at line 207 of file netflow.h.

◆ NETFLOW_V9_FIELD_MPLS_LABEL_5

#define NETFLOW_V9_FIELD_MPLS_LABEL_5   74 /* MPLS label at position 5 in the stack. 3 */

Definition at line 208 of file netflow.h.

◆ NETFLOW_V9_FIELD_MPLS_LABEL_6

#define NETFLOW_V9_FIELD_MPLS_LABEL_6   75 /* MPLS label at position 6 in the stack. 3 */

Definition at line 209 of file netflow.h.

◆ NETFLOW_V9_FIELD_MPLS_LABEL_7

#define NETFLOW_V9_FIELD_MPLS_LABEL_7   76 /* MPLS label at position 7 in the stack. 3 */

Definition at line 210 of file netflow.h.

◆ NETFLOW_V9_FIELD_MPLS_LABEL_8

#define NETFLOW_V9_FIELD_MPLS_LABEL_8   77 /* MPLS label at position 8 in the stack. 3 */

Definition at line 211 of file netflow.h.

◆ NETFLOW_V9_FIELD_MPLS_LABEL_9

#define NETFLOW_V9_FIELD_MPLS_LABEL_9   78 /* MPLS label at position 9 in the stack. 3 */

Definition at line 212 of file netflow.h.

◆ NETFLOW_V9_FIELD_MPLS_TOP_LABEL_IP_ADDR

#define NETFLOW_V9_FIELD_MPLS_TOP_LABEL_IP_ADDR   47 /* Forwarding Equivalent Class corresponding to the MPLS Top Label. 4 */

Definition at line 190 of file netflow.h.

◆ NETFLOW_V9_FIELD_MPLS_TOP_LABEL_TYPE

#define NETFLOW_V9_FIELD_MPLS_TOP_LABEL_TYPE   46 /* MPLS Top Label Type. 1 */

Definition at line 189 of file netflow.h.

◆ NETFLOW_V9_FIELD_MUL_DST_BYTES

#define NETFLOW_V9_FIELD_MUL_DST_BYTES   20 /* IP multicast outgoing Octet (byte) counter for the number of bytes associated with IP flow. Default 4 */

Definition at line 168 of file netflow.h.

◆ NETFLOW_V9_FIELD_MUL_DST_PKTS

#define NETFLOW_V9_FIELD_MUL_DST_PKTS   19 /* IP multicast outgoing packet counter for packets associated with IP flow. Default 4 */

Definition at line 167 of file netflow.h.

◆ NETFLOW_V9_FIELD_MUL_IGMP_TYPE

#define NETFLOW_V9_FIELD_MUL_IGMP_TYPE   33 /* Internet Group Management Protocol (IGMP) packet type. 1 */

Definition at line 179 of file netflow.h.

◆ NETFLOW_V9_FIELD_OUT_BYTES

#define NETFLOW_V9_FIELD_OUT_BYTES   23 /* Outgoing counter for the number of bytes associated with an IP Flow. Default 4 */

Definition at line 171 of file netflow.h.

◆ NETFLOW_V9_FIELD_OUT_PKTS

#define NETFLOW_V9_FIELD_OUT_PKTS   24 /* Outgoing counter for the number of packets associated with an IP Flow. Default 4 */

Definition at line 172 of file netflow.h.

◆ NETFLOW_V9_FIELD_OUTPUT_SNMP

#define NETFLOW_V9_FIELD_OUTPUT_SNMP   14 /* Output interface index. Default 2 */

Definition at line 162 of file netflow.h.

◆ NETFLOW_V9_FIELD_PROTOCOL

#define NETFLOW_V9_FIELD_PROTOCOL   4 /* IP protocol byte. 1 */

Definition at line 152 of file netflow.h.

◆ NETFLOW_V9_FIELD_SAMPLING_ALGORITHM

#define NETFLOW_V9_FIELD_SAMPLING_ALGORITHM   35 /* For sampled NetFlow platform-wide: 0x01 deterministic sampling 0x02 random sampling. 1 */

Definition at line 181 of file netflow.h.

◆ NETFLOW_V9_FIELD_SAMPLING_INTERVAL

#define NETFLOW_V9_FIELD_SAMPLING_INTERVAL   34 /* When using sampled NetFlow, the rate at which packets are sampled; for example, a value of 100 indicates that one of every hundred packets is sampled. 4 */

Definition at line 180 of file netflow.h.

◆ NETFLOW_V9_FIELD_SRC_AS

#define NETFLOW_V9_FIELD_SRC_AS   16 /* Source BGP autonomous system number. Default 2, can be 4 */

Definition at line 164 of file netflow.h.

◆ NETFLOW_V9_FIELD_SRC_MAC

#define NETFLOW_V9_FIELD_SRC_MAC   56 /* Source MAC Address. 6 */

Definition at line 195 of file netflow.h.

◆ NETFLOW_V9_FIELD_SRC_MASK

#define NETFLOW_V9_FIELD_SRC_MASK   9 /* The number of contiguous bits in the source subnet mask (i.e., the mask in slash notation). 1 */

Definition at line 157 of file netflow.h.

◆ NETFLOW_V9_FIELD_SRC_VLAN

#define NETFLOW_V9_FIELD_SRC_VLAN   58 /* Virtual LAN identifier associated with ingress interface. 2 */

Definition at line 197 of file netflow.h.

◆ NETFLOW_V9_FIELD_TCP_FLAGS

#define NETFLOW_V9_FIELD_TCP_FLAGS   6 /* TCP flags; cumulative of all the TCP flags seen in this Flow. 1 */

Definition at line 154 of file netflow.h.

◆ NETFLOW_V9_FIELD_TOS

#define NETFLOW_V9_FIELD_TOS   5 /* Type of service byte setting when entering the incoming interface. 1 */

Definition at line 153 of file netflow.h.

◆ NETFLOW_V9_FIELD_TOTAL_BYTES_EXP

#define NETFLOW_V9_FIELD_TOTAL_BYTES_EXP   40 /* Counter with for the number of bytes exported by the Observation Domain. Default 4 */

Definition at line 186 of file netflow.h.

◆ NETFLOW_V9_FIELD_TOTAL_FLOWS_EXP

#define NETFLOW_V9_FIELD_TOTAL_FLOWS_EXP   42 /* Counter with for the number of flows exported by the Observation Domain. Default 4 */

Definition at line 188 of file netflow.h.

◆ NETFLOW_V9_FIELD_TOTAL_PKTS_EXP

#define NETFLOW_V9_FIELD_TOTAL_PKTS_EXP   41 /* Counter with for the number of packets exported by the Observation Domain. Default 4 */

Definition at line 187 of file netflow.h.

◆ NETFLOW_V9_MAX_RESERVED_FLOWSET

#define NETFLOW_V9_MAX_RESERVED_FLOWSET   0xFF /* Clause 5.2 */

Definition at line 215 of file netflow.h.

Function Documentation

◆ __attribute__()

struct netflow_v1_header __attribute__ ( (__packed__)  )

Variable Documentation

◆ count

uint16_t count

◆ d_port

uint16_t d_port

Definition at line 10 of file netflow.h.

◆ dst_addr

struct in6_addr dst_addr

Definition at line 1 of file netflow.h.

◆ dst_as

uint32_t dst_as

Definition at line 16 of file netflow.h.

◆ dst_mask

uint8_t dst_mask

Definition at line 18 of file netflow.h.

◆ engine_id

uint8_t engine_id

Definition at line 7 of file netflow.h.

◆ engine_type

uint8_t engine_type

Definition at line 6 of file netflow.h.

◆ first

uint32_t first

Definition at line 7 of file netflow.h.

◆ flags

◆ flow_seq

uint32_t flow_seq

Definition at line 5 of file netflow.h.

◆ header

struct netflow_v5_header header

Definition at line 0 of file netflow.h.

◆ i_ifx

uint16_t i_ifx

Definition at line 3 of file netflow.h.

◆ in_ifx

uint16_t in_ifx

Definition at line 3 of file netflow.h.

◆ last

uint32_t last

◆ next_hop

struct in6_addr next_hop

Definition at line 2 of file netflow.h.

◆ o_ifx

uint16_t o_ifx

Definition at line 4 of file netflow.h.

◆ octets

uint32_t octets

Definition at line 6 of file netflow.h.

◆ out_ifx

uint16_t out_ifx

Definition at line 4 of file netflow.h.

◆ packets

uint32_t packets

Definition at line 5 of file netflow.h.

Referenced by ng_source_intr(), ng_source_rcvmsg(), and ng_source_start().

◆ pad

uint16_t pad

Definition at line 8 of file netflow.h.

Referenced by ng_parse_composite(), and ng_sscop_mbuf_pad4().

◆ pad1

uint8_t pad1

Definition at line 11 of file netflow.h.

◆ pad2

uint16_t pad2

Definition at line 15 of file netflow.h.

◆ pad3

uint16_t pad3

Definition at line 16 of file netflow.h.

◆ prot

uint8_t prot

Definition at line 12 of file netflow.h.

◆ r

Definition at line 1 of file netflow.h.

Referenced by ng_ipfw_input(), and ng_ipfw_rcvdata().

◆ reserved

uint8_t reserved[5]

Definition at line 17 of file netflow.h.

◆ s_port

uint16_t s_port

Definition at line 9 of file netflow.h.

◆ seq_num

uint32_t seq_num

Definition at line 4 of file netflow.h.

◆ source_id

uint32_t source_id

Definition at line 5 of file netflow.h.

◆ src_addr

struct in6_addr src_addr

Definition at line 0 of file netflow.h.

◆ src_as

uint32_t src_as

Definition at line 15 of file netflow.h.

◆ src_mask

uint8_t src_mask

Definition at line 17 of file netflow.h.

◆ sys_uptime

uint32_t sys_uptime

Definition at line 2 of file netflow.h.

◆ tos

uint8_t tos

Definition at line 13 of file netflow.h.

◆ unix_nsecs

uint32_t unix_nsecs

Definition at line 4 of file netflow.h.

◆ unix_secs

uint32_t unix_secs

Definition at line 3 of file netflow.h.

◆ version

uint16_t version

Definition at line 0 of file netflow.h.

Referenced by expire_flow(), and ubt_intel_probe().