root/trunk/src/renetcol.h @ 154

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

Typo correction and copyright update

  • Property svn:eol-style set to native
RevLine 
[2]1/*
2 * File: renetcol.h
3 *
[28]4 * Authors: ANDREU Francois-Xavier
[2]5 *
[154]6 * Copyright (C) 2005-2011 GIP RENATER
[2]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
[8]26#define _GNU_SOURCE
27
[2]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
[111]49#ifdef READFROMFILE
50#include <pcap.h>
51#endif
52
[2]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"
[36]65#include "pop.h"
66#include "renetcolParam.h"
[60]67#include "as.h"
[113]68#include "renetcol_mib.h"
69#include "engine_mgmt.h"
[18]70
[60]71struct SHMForAgg {/* if you change it, you must change renetcolAgg.h struct */
[24]72  unsigned short currentTable;
[29]73  unsigned short secondTable;
[24]74  unsigned short readed;
75  unsigned short v4PrefixNb;
[61]76  unsigned short v4SubnetNb;
[94]77  unsigned short v6PrefixNb;
[60]78#ifdef ASACC
79  unsigned short ASNb;
80  struct AS ASTab[2][MAX_AS];
81#endif
[24]82  struct PrefixV4 prefixV4Tab[2][MAX_IPV4_PREFIX];
[59]83  struct PrefixV4 prefixV4SubnetTab[2][MAX_IPV4_SUBNET];
84#ifdef MATRIX
[36]85  struct POP matrixPOP[2][ROUTER_INDEX_MAX][ROUTER_INDEX_MAX];
[59]86#endif
[94]87  struct PrefixV6 prefixV6Tab[2][MAX_IPV6_PREFIX];
[95]88#if defined(IPV6LINKAGG) && defined(IPV6AGGIDSNMP)
89  struct IndexV6 indexV6Tab[2][ROUTER_INDEX_MAX][MAX_INDEX_BY_ROUTER];
90#endif
[113]91  struct RenetcolMIB myMIB[2][1];
[60]92};
[24]93
[2]94void setCache(RulesPtr);
95void initCache();
96void waitingRoom();
[8]97void initRule();
98void sigusr1Mgmt(int);
99void sendMyPid(int);
100void sendReadRulesSignal(int);
[2]101void initStream();
102void catchAlarm(int);
103int socketLoop();
104short initSocket();
[111]105short initFile();
[2]106short socketReading();
[111]107short fileReading();
[2]108short getFlow(short);
109short checkFlow(short);
110void showAllTplFlSet();
[23]111void writeAllTplFlSet();
[113]112int initMIB(struct RenetcolMIB *);
Note: See TracBrowser for help on using the browser.