root/trunk/src/renetcol.h

Revision 154, 2.9 KB (checked in by andreu, 12 years ago)

Typo correction and copyright update

  • Property svn:eol-style set to native
Line 
1/*
2 * File: renetcol.h
3 *
4 * Authors: ANDREU Francois-Xavier
5 *
6 * Copyright (C) 2005-2011 GIP RENATER
7 */
8
9/*  This file is part of renetcol.
10 *
11 *  renetcol is free software; you can redistribute it and/or modify
12 *  it under the terms of the GNU General Public License as published by
13 *  the Free Software Foundation; either version 2 of the License, or
14 *  (at your option) any later version.
15 *
16 *  renetcol is distributed in the hope that it will be useful,
17 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
18 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 *  GNU General Public License for more details.
20 *
21 *  You should have received a copy of the GNU General Public License
22 *  along with renetcol; if not, write to the Free Software
23 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
24 */
25
26#define _GNU_SOURCE
27
28#include <unistd.h>
29#include <stdio.h>
30#include <string.h>
31#include <stdlib.h>
32#include <syslog.h>
33#include <sys/types.h>
34#include <sys/socket.h>
35#include <netinet/in.h>
36#include <time.h>
37#include <errno.h>
38#include <sys/ipc.h>
39#include <sys/shm.h>
40#include <sys/sem.h>
41#include <ctype.h>
42#include <netdb.h>
43#include <net/if.h>
44#include <sys/ioctl.h>
45#include <arpa/inet.h>
46#include <signal.h>
47#include <setjmp.h>
48
49#ifdef READFROMFILE
50#include <pcap.h>
51#endif
52
53#include "routers_mgmt.h"
54#include "fields_mgmt.h"
55#include "routers_mgmt.h"
56#include "tplflset_mgmt.h"
57#include "fields_mgmt.h"
58#include "headers_mgmt.h"
59#include "V9Header_mgmt.h"
60#include "template.h"
61#include "dataFlowSet.h"
62#include "get_conf.h"
63#include "rules_mgmt.h"
64#include "msg_mgmt.h"
65#include "pop.h"
66#include "renetcolParam.h"
67#include "as.h"
68#include "renetcol_mib.h"
69#include "engine_mgmt.h"
70
71struct SHMForAgg {/* if you change it, you must change renetcolAgg.h struct */
72  unsigned short currentTable;
73  unsigned short secondTable;
74  unsigned short readed;
75  unsigned short v4PrefixNb;
76  unsigned short v4SubnetNb;
77  unsigned short v6PrefixNb;
78#ifdef ASACC
79  unsigned short ASNb;
80  struct AS ASTab[2][MAX_AS];
81#endif
82  struct PrefixV4 prefixV4Tab[2][MAX_IPV4_PREFIX];
83  struct PrefixV4 prefixV4SubnetTab[2][MAX_IPV4_SUBNET];
84#ifdef MATRIX
85  struct POP matrixPOP[2][ROUTER_INDEX_MAX][ROUTER_INDEX_MAX];
86#endif
87  struct PrefixV6 prefixV6Tab[2][MAX_IPV6_PREFIX];
88#if defined(IPV6LINKAGG) && defined(IPV6AGGIDSNMP)
89  struct IndexV6 indexV6Tab[2][ROUTER_INDEX_MAX][MAX_INDEX_BY_ROUTER];
90#endif
91  struct RenetcolMIB myMIB[2][1];
92};
93
94void setCache(RulesPtr);
95void initCache();
96void waitingRoom();
97void initRule();
98void sigusr1Mgmt(int);
99void sendMyPid(int);
100void sendReadRulesSignal(int);
101void initStream();
102void catchAlarm(int);
103int socketLoop();
104short initSocket();
105short initFile();
106short socketReading();
107short fileReading();
108short getFlow(short);
109short checkFlow(short);
110void showAllTplFlSet();
111void writeAllTplFlSet();
112int initMIB(struct RenetcolMIB *);
Note: See TracBrowser for help on using the browser.