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

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

RECORDFLOW option

RevLine 
[164]1/*
2 * File: renetcolSMP1.h
3 *
4 * Authors: ANDREU Francois-Xavier
5 *
6 * Copyright (C) 2005-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
27#define _GNU_SOURCE
28
29#include <unistd.h>
30#include <stdio.h>
[166]31#include <stdint.h>
[164]32#include <string.h>
33#include <stdlib.h>
34#include <syslog.h>
35#include <sys/types.h>
36#include <sys/socket.h>
37#include <netinet/in.h>
38#include <time.h>
39#include <errno.h>
40#include <sys/ipc.h>
41#include <sys/shm.h>
42#include <sys/sem.h>
43#include <ctype.h>
44#include <netdb.h>
45#include <net/if.h>
46#include <sys/ioctl.h>
47#include <arpa/inet.h>
48#include <signal.h>
49#include <setjmp.h>
50
51#ifdef READFROMFILE
52#include <pcap.h>
53#endif
54
55#include "routers_mgmt.h"
56#include "fields_mgmt.h"
57#include "routers_mgmt.h"
58#include "tplflset_mgmt.h"
59#include "fields_mgmt.h"
60#include "headers_mgmt.h"
61#include "V9Header_mgmt.h"
62#include "template.h"
63#include "dataFlowSet.h"
64#include "get_conf.h"
65#include "rules_mgmt.h"
66#include "msg_mgmt.h"
67#include "pop.h"
68#include "renetcolParam.h"
69#include "as.h"
70#include "renetcol_mib.h"
71#include "engine_mgmt.h"
72
73struct SHMForAgg {/* if you change it, you must change renetcolAgg.h struct */
74  unsigned short currentTable;
75  unsigned short secondTable;
76  unsigned short readed;
77  unsigned short v4PrefixNb;
78  unsigned short v4SubnetNb;
79  unsigned short v6PrefixNb;
80#ifdef ASACC
81  unsigned short ASNb;
82  struct AS ASTab[2][MAX_AS];
83#endif
84  struct PrefixV4 prefixV4Tab[2][MAX_IPV4_PREFIX];
85  struct PrefixV4 prefixV4SubnetTab[2][MAX_IPV4_SUBNET];
86#ifdef MATRIX
87  struct POP matrixPOP[2][ROUTER_INDEX_MAX][ROUTER_INDEX_MAX];
88#endif
89  struct PrefixV6 prefixV6Tab[2][MAX_IPV6_PREFIX];
90#if defined(IPV6LINKAGG) && defined(IPV6AGGIDSNMP)
91  struct IndexV6 indexV6Tab[2][ROUTER_INDEX_MAX][MAX_INDEX_BY_ROUTER];
92#endif
93  struct RenetcolMIB myMIB[2][1];
94};
95
[166]96char *prepend_timestamp ( char s[], size_t capacity );
[164]97void setCache(RulesPtr);
98void initCache();
99void waitingRoom();
100void initRule();
101void sigusr1Mgmt(int);
102void sendMyPid(int);
103void sendReadRulesSignal(int);
104void initStream();
105void catchAlarm(int);
106int socketLoop();
107short initSocket();
108short initFile();
109short socketReading();
110short fileReading();
111short getFlow(short);
112short checkFlow(short);
113void showAllTplFlSet();
114void writeAllTplFlSet();
115int initMIB(struct RenetcolMIB *);
Note: See TracBrowser for help on using the browser.