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

Revision 164, 2.9 KB (checked in by andreu, 10 years ago)

first SMP imp

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