2 Copyright (C) Slava Astashonok <sla@0n.ru>
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License.
7 $Id: netflow.c,v 1.2.2.4 2004/02/02 08:06:24 sla Exp $
14 static uint16_t NetFlow1_Header[] = {
22 static uint16_t NetFlow1_Flow[] = {
23 NETFLOW_IPV4_SRC_ADDR,
24 NETFLOW_IPV4_DST_ADDR,
25 NETFLOW_IPV4_NEXT_HOP,
30 NETFLOW_FIRST_SWITCHED,
31 NETFLOW_LAST_SWITCHED,
38 NETFLOW_PAD8, NETFLOW_PAD8, NETFLOW_PAD8,
42 static uint16_t NetFlow5_Header[] = {
48 NETFLOW_FLOW_SEQUENCE,
54 static uint16_t NetFlow5_Flow[] = {
55 NETFLOW_IPV4_SRC_ADDR,
56 NETFLOW_IPV4_DST_ADDR,
57 NETFLOW_IPV4_NEXT_HOP,
62 NETFLOW_FIRST_SWITCHED,
63 NETFLOW_LAST_SWITCHED,
74 * Who needs the src and dst masks... Or deal
75 * with this later - Sapan
81 static uint16_t NetFlow7_Header[] = {
87 NETFLOW_FLOW_SEQUENCE,
91 static uint16_t NetFlow7_Flow[] = {
92 NETFLOW_IPV4_SRC_ADDR,
93 NETFLOW_IPV4_DST_ADDR,
94 NETFLOW_IPV4_NEXT_HOP,
99 NETFLOW_FIRST_SWITCHED,
100 NETFLOW_LAST_SWITCHED,
115 struct NetFlow NetFlow1 = {
117 NETFLOW1_HEADER_SIZE,
121 sizeof(NetFlow1_Header) / sizeof(uint16_t),
123 sizeof(NetFlow1_Flow) / sizeof(uint16_t),
127 struct NetFlow NetFlow5 = {
129 NETFLOW5_HEADER_SIZE,
133 sizeof(NetFlow5_Header) / sizeof(uint16_t),
135 sizeof(NetFlow5_Flow) / sizeof(uint16_t),
139 struct NetFlow NetFlow7 = {
141 NETFLOW7_HEADER_SIZE,
145 sizeof(NetFlow7_Header) / sizeof(uint16_t),
147 sizeof(NetFlow7_Flow) / sizeof(uint16_t),