root/branches/renetcolSMP/src/renetcolParam.h @ 166

Revision 166, 9.5 KB (checked in by andreu, 8 years ago)

RECORDFLOW option

Line 
1/*
2 * File: renetcolParam.h
3 *
4 * Authors: ANDREU Francois-Xavier
5 *
6 * Copyright (C) 2007-2012 GIP RENATER
7 * Copyright (C) 2012 ANDREU Francois-Xavier
8 */
9
10/*  This file is part of renetcol.
11 *
12 *  renetcol is free software; you can redistribute it and/or modify
13 *  it under the terms of the GNU General Public License as published by
14 *  the Free Software Foundation; either version 2 of the License, or
15 *  (at your option) any later version.
16 *
17 *  renetcol is distributed in the hope that it will be useful,
18 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
19 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20 *  GNU General Public License for more details.
21 *
22 *  You should have received a copy of the GNU General Public License
23 *  along with renetcol; if not, write to the Free Software
24 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
25 */
26#ifndef RENETCOLPARAM_H
27#define RENETCOLPARAM_H
28
29/**************************************
30 * Parameters which MUST be changed:
31 **************************************/
32/*
33 * your collector address - syntax: 10.0.0.90, can be empty
34*/
35#define SMP1_RECEPTION_ADDRESS "10.0.0.1"
36#define SMP2_RECEPTION_ADDRESS "10.0.0.2"
37#define SMP3_RECEPTION_ADDRESS "10.0.0.3"
38#define SMP4_RECEPTION_ADDRESS "10.0.0.4"
39
40/*
41 * your collector port to recept netflow export
42 */
43#define SMP1_RECEPTION_PORT 1111
44#define SMP2_RECEPTION_PORT 1112
45#define SMP3_RECEPTION_PORT 1113
46#define SMP4_RECEPTION_PORT 1114
47
48/*
49 * routers index max + 1 (index of the first column who begins the line,
50 * (not necessary the number of routers)
51 */
52#define SMP1_ROUTER_INDEX_MAX 13
53#define SMP2_ROUTER_INDEX_MAX 16
54#define SMP3_ROUTER_INDEX_MAX 20
55#define SMP4_ROUTER_INDEX_MAX 15
56
57/*
58 * FILE with your routers IP address
59*/
60#define SMP1_ROUTERS_LIST "/home/maintenance/RSMP/CONF_RENETCOL/routersSMP1.txt"
61#define SMP2_ROUTERS_LIST "/home/maintenance/RSMP/CONF_RENETCOL/routersSMP2.txt"
62#define SMP3_ROUTERS_LIST "/home/maintenance/RSMP/CONF_RENETCOL/routersSMP3.txt"
63#define SMP4_ROUTERS_LIST "/home/maintenance/RSMP/CONF_RENETCOL/routersSMP4.txt"
64
65/*
66 * FILE with your prefix/subnet
67 */
68#define SUBNETS_LIST "/home/maintenance/RSMP/CONF_RENETCOL/SUBNETSAGA.txt"
69
70/*
71 * FILE with your IPv6 prefixes list
72 */
73#define SUBNETS_V6_LIST "/home/maintenance/RSMP/CONF_RENETCOL/IPv6_Subnet_Aggregation_based_on_SNMP_index.txt"
74
75/*
76 * FILE with the list of AS with accounting
77 */
78#define AS_LIST "/home/maintenance/RSMP/CONF_RENETCOL/AS_MS.txt"
79
80/*
81 * constants, here a subnet is include in a prefix
82 */
83#define MAX_IPV4_PREFIX 4315
84#define MAX_IPV4_SUBNET 417
85#define MAX_AS 576
86#define MAX_IPV6_PREFIX 500
87#define MAX_IPV6_SUBNET 100
88
89#define MAX_PKTS_DOS 30000      /* dos threshold */
90#define RATIO_DOS 200   /* packets average size */
91#define RATIO_FIELD 69  /* field 69 is a "reserved" field who is not used actualy. */
92
93/*
94 * FILE for the rules
95 */
96#define RULES_FILE "/home/maintenance/RSMP/CONF_RENETCOL/rules.txt"
97
98/*
99 * FILE with SNMP index of the interfaces
100 * tagged "C"ustomers or "B"ackbone
101 */
102#define SMP1_INTERFACES_TYPE_LIST "/home/maintenance/RSMP/CONF_RENETCOL/SMP1_SNMP_INDEX.txt"
103#define SMP2_INTERFACES_TYPE_LIST "/home/maintenance/RSMP/CONF_RENETCOL/SMP2_SNMP_INDEX.txt"
104#define SMP3_INTERFACES_TYPE_LIST "/home/maintenance/RSMP/CONF_RENETCOL/SMP3_SNMP_INDEX.txt"
105#define SMP4_INTERFACES_TYPE_LIST "/home/maintenance/RSMP/CONF_RENETCOL/SMP4_SNMP_INDEX.txt"
106
107/*
108 * maximum SNMP index for one router
109 */
110#define MAX_SNMP_INDEX 900
111
112/*
113 * maximum number of interfaces by router (one interface == one SNMP index)
114 */
115#define MAX_INDEX_BY_ROUTER 200
116
117/*
118 * RRD files paths
119 */
120#define PREFIX_RRD_LOCATION "/home/RRD/RENATER/IPv4_SUBNET/"
121#define MATRIX_RRD_LOCATION "/home/RRD/RENATER/MATRIX/"
122#define AS_RRD_LOCATION "/home/RRD/RENATER/AS/"
123#define SNMP_INDEX_RRD_LOCATION "/home/RRD/RENATER/SNMP_INDEX/"
124#define MIB_RRD_LOCATION "/home/RRD/RENATER/RENETCOL_MIB/"
125
126/*
127 * RRD filenames (static names), location : "MIB_RRD_LOCATION"
128 */
129#define GLOBAL_MIB_RRD_FILE "RENETCOL_GLOBAL_COUNTERS.rrd"
130#define IPV4_MIB_RRD_FILE "RENETCOL_IPV4_MIB.rrd"
131#define IPV6_MIB_RRD_FILE "RENETCOL_IPV6_MIB.rrd"
132#define L4_IPV4_MIB_RRD_FILE "RENETCOL_L4_IPV4_MIB.rrd"
133#define L4_IPV6_MIB_RRD_FILE "RENETCOL_L4_IPV6_MIB.rrd"
134#define FLOWSIZE_IPV4_MIB_RRD_FILE "RENETCOL_FLOWSIZE_IPV4_MIB.rrd"
135#define FLOWSIZE_IPV6_MIB_RRD_FILE "RENETCOL_FLOWSIZE_IPV6_MIB.rrd"
136#define L7_IPV4_MIB_RRD_FILE "RENETCOL_L7_IPV4_MIB.rrd"
137#define L7_IPV6_MIB_RRD_FILE "RENETCOL_L7_IPV6_MIB.rrd"
138
139/*
140 * Your CoS - DSCP field in decimal notation, EF PHB 101110 (46) == ToS 10111000 (184)
141 */
142#define FIRST_CoS 46  /* EF, Premium - dec 46, bin 101110 - ToS 10111000 */
143#define SECOND_CoS 34 /* AF41, Best than BE - dec 34, bin 100010 - ToS 10001000*/
144#define THIRD_CoS 8   /* CS1, Less than BE - dec 8, bin 001000 - 00100000 */
145#define FOURTH_CoS 0  /* Best Effort or All flows if not in the 3 others class */
146/*
147 * FILES PATH/NAMES FOR RECORD FLOW OPTION, enabled via ./configure^M
148 * 2 files per process^M
149 */
150#define RECORD_FILE_PATH "/home/FLOW_DATA/"
151#define SMP1_RECORD_FILE_1 "RENETCOL_SMP1_1_FLOWS"
152#define SMP1_RECORD_FILE_2 "RENETCOL_SMP1_1_FLOWS"
153#define SMP2_RECORD_FILE_1 "RENETCOL_SMP2_1_FLOWS"
154#define SMP2_RECORD_FILE_2 "RENETCOL_SMP2_1_FLOWS"
155#define SMP3_RECORD_FILE_1 "RENETCOL_SMP3_1_FLOWS"
156#define SMP3_RECORD_FILE_2 "RENETCOL_SMP3_1_FLOWS"
157#define SMP4_RECORD_FILE_1 "RENETCOL_SMP4_1_FLOWS"
158#define SMP4_RECORD_FILE_2 "RENETCOL_SMP4_1_FLOWS"
159
160/****************************************************************
161 * the following parameters CAN be changed but it's NOT REQUIRED
162 ***************************************************************/
163#define STEP 5
164#define FIELD_TYPE_NUMBER 216
165#define MAX_RULES_PER_FIELD 100
166#define SHMSIZE 33554432
167#define SOCKET_BUFFER_SIZE 1500
168#define TIME_OUT 300
169#define RRD_EXTENSION ".rrd"
170#define RRD_PARAM_PREFIX_0 "rrdcreate"
171#define RRD_PARAM_PREFIX_1 "--start"
172#define RRD_PARAM_PREFIX_2 "1106560200"
173#define RRD_PARAM_PREFIX_3 "--step"
174#define RRD_PARAM_PREFIX_4 "300"
175#define RRD_PARAM_PREFIX_5 "DS:inFlows:GAUGE:600:U:U"
176#define RRD_PARAM_PREFIX_6 "DS:outFlows:GAUGE:600:U:U"
177#define RRD_PARAM_PREFIX_7 "DS:inBytes:GAUGE:600:U:U"
178#define RRD_PARAM_PREFIX_8 "DS:outBytes:GAUGE:600:U:U"
179#define RRD_PARAM_PREFIX_9 "DS:inPkts:GAUGE:600:U:U"
180#define RRD_PARAM_PREFIX_10 "DS:outPkts:GAUGE:600:U:U"
181#define RRD_PARAM_PREFIX_11 "DS:inFirstCoS:GAUGE:600:U:U"
182#define RRD_PARAM_PREFIX_12 "DS:outFirstCoS:GAUGE:600:U:U"
183#define RRD_PARAM_PREFIX_13 "DS:inSecondCoS:GAUGE:600:U:U"
184#define RRD_PARAM_PREFIX_14 "DS:outSecondCoS:GAUGE:600:U:U"
185#define RRD_PARAM_PREFIX_15 "DS:inThirdCoS:GAUGE:600:U:U"
186#define RRD_PARAM_PREFIX_16 "DS:outThirdCoS:GAUGE:600:U:U"
187#define RRD_PARAM_PREFIX_17 "DS:inFourthCoS:GAUGE:600:U:U"
188#define RRD_PARAM_PREFIX_18 "DS:outFourthCoS:GAUGE:600:U:U"
189#define RRD_PARAM_PREFIX_19 "RRA:AVERAGE:0.5:1:2100"
190#define RRD_PARAM_PREFIX_20 "RRA:AVERAGE:0.5:24:1550"
191#define RRD_PARAM_PREFIX_21 "RRA:AVERAGE:0.5:288:1594"
192#define RRD_PARAM_PREFIX_22 "RRA:AVERAGE:0.5:2016:1040"
193#define RRD_PARAM_PREFIX_23 "RRA:MAX:0.5:1:2100"
194#define RRD_PARAM_PREFIX_24 "RRA:MAX:0.5:24:1550"
195#define RRD_PARAM_PREFIX_25 "RRA:MAX:0.5:288:1594"
196#define RRD_PARAM_MATRIX_0 "rrdcreate"
197#define RRD_PARAM_MATRIX_1 "--start"
198#define RRD_PARAM_MATRIX_2 "1106560200"
199#define RRD_PARAM_MATRIX_3 "--step"
200#define RRD_PARAM_MATRIX_4 "300"
201#define RRD_PARAM_MATRIX_5 "DS:Flows:GAUGE:600:U:U"
202#define RRD_PARAM_MATRIX_6 "DS:Bytes:GAUGE:600:U:U"
203#define RRD_PARAM_MATRIX_7 "DS:Pkts:GAUGE:600:U:U"
204#define RRD_PARAM_MATRIX_8 "RRA:AVERAGE:0.5:1:2100"
205#define RRD_PARAM_MATRIX_9 "RRA:AVERAGE:0.5:24:1550"
206#define RRD_PARAM_MATRIX_10 "RRA:AVERAGE:0.5:288:1594"
207#define RRD_PARAM_MATRIX_11 "RRA:AVERAGE:0.5:2016:1040"
208#define RRD_PARAM_MATRIX_12 "RRA:MAX:0.5:1:2100"
209#define RRD_PARAM_MATRIX_13 "RRA:MAX:0.5:24:1550"
210#define RRD_PARAM_MATRIX_14 "RRA:MAX:0.5:288:1594"
211#define RRD_PARAM_AS_0 "rrdcreate"
212#define RRD_PARAM_AS_1 "--start"
213#define RRD_PARAM_AS_2 "1106560200"
214#define RRD_PARAM_AS_3 "--step"
215#define RRD_PARAM_AS_4 "300"
216#define RRD_PARAM_AS_5 "DS:inFlows:GAUGE:600:U:U"
217#define RRD_PARAM_AS_6 "DS:outFlows:GAUGE:600:U:U"
218#define RRD_PARAM_AS_7 "DS:inBytes:GAUGE:600:U:U"
219#define RRD_PARAM_AS_8 "DS:outBytes:GAUGE:600:U:U"
220#define RRD_PARAM_AS_9 "DS:inPkts:GAUGE:600:U:U"
221#define RRD_PARAM_AS_10 "DS:outPkts:GAUGE:600:U:U"
222#define RRD_PARAM_AS_11 "RRA:AVERAGE:0.5:1:2100"
223#define RRD_PARAM_AS_12 "RRA:AVERAGE:0.5:24:1550"
224#define RRD_PARAM_AS_13 "RRA:AVERAGE:0.5:288:1594"
225#define RRD_PARAM_AS_14 "RRA:AVERAGE:0.5:2016:1040"
226#define RRD_PARAM_AS_15 "RRA:MAX:0.5:1:2100"
227#define RRD_PARAM_AS_16 "RRA:MAX:0.5:24:1550"
228#define RRD_PARAM_AS_17 "RRA:MAX:0.5:288:1594"
229#define RRD_PARAM_INDEX_0 "rrdcreate"
230#define RRD_PARAM_INDEX_1 "--start"
231#define RRD_PARAM_INDEX_2 "1106560200"
232#define RRD_PARAM_INDEX_3 "--step"
233#define RRD_PARAM_INDEX_4 "300"
234#define RRD_PARAM_INDEX_5 "DS:inFlows:GAUGE:600:U:U"
235#define RRD_PARAM_INDEX_6 "DS:outFlows:GAUGE:600:U:U"
236#define RRD_PARAM_INDEX_7 "DS:inBytes:GAUGE:600:U:U"
237#define RRD_PARAM_INDEX_8 "DS:outBytes:GAUGE:600:U:U"
238#define RRD_PARAM_INDEX_9 "DS:inPkts:GAUGE:600:U:U"
239#define RRD_PARAM_INDEX_10 "DS:outPkts:GAUGE:600:U:U"
240#define RRD_PARAM_INDEX_11 "RRA:AVERAGE:0.5:1:2100"
241#define RRD_PARAM_INDEX_12 "RRA:AVERAGE:0.5:24:1550"
242#define RRD_PARAM_INDEX_13 "RRA:AVERAGE:0.5:288:1594"
243#define RRD_PARAM_INDEX_14 "RRA:AVERAGE:0.5:2016:1040"
244#define RRD_PARAM_INDEX_15 "RRA:MAX:0.5:1:2100"
245#define RRD_PARAM_INDEX_16 "RRA:MAX:0.5:24:1550"
246#define RRD_PARAM_INDEX_17 "RRA:MAX:0.5:288:1594"
247#define RRD_UPDATE_0 "rrdupdate"
248#define RECEPT_PORT "52571"
249#define VAR_SHARED_SIZE 4
250#define FILE_TEMPO "/tmp/rules.tmp"
251
252#endif /* RENETCOLPARAM_H */
Note: See TracBrowser for help on using the browser.