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 NETFLOW_XID /* Whoo hoo! */
77 static uint16_t NetFlow7_Header[] = {
83 NETFLOW_FLOW_SEQUENCE,
87 static uint16_t NetFlow7_Flow[] = {
88 NETFLOW_IPV4_SRC_ADDR,
89 NETFLOW_IPV4_DST_ADDR,
90 NETFLOW_IPV4_NEXT_HOP,
95 NETFLOW_FIRST_SWITCHED,
96 NETFLOW_LAST_SWITCHED,
111 struct NetFlow NetFlow1 = {
113 NETFLOW1_HEADER_SIZE,
117 sizeof(NetFlow1_Header) / sizeof(uint16_t),
119 sizeof(NetFlow1_Flow) / sizeof(uint16_t),
123 struct NetFlow NetFlow5 = {
125 NETFLOW5_HEADER_SIZE,
129 sizeof(NetFlow5_Header) / sizeof(uint16_t),
131 sizeof(NetFlow5_Flow) / sizeof(uint16_t),
135 struct NetFlow NetFlow7 = {
137 NETFLOW7_HEADER_SIZE,
141 sizeof(NetFlow7_Header) / sizeof(uint16_t),
143 sizeof(NetFlow7_Flow) / sizeof(uint16_t),