Revision 8, 2.2 KB
(checked in by andreu, 17 years ago)
|
second RENETCOL CVS Integration
|
-
Property svn:eol-style set to
native
|
Line | |
---|
1 | |
---|
2 | |
---|
3 | |
---|
4 | |
---|
5 | |
---|
6 | |
---|
7 | |
---|
8 | |
---|
9 | |
---|
10 | |
---|
11 | |
---|
12 | |
---|
13 | |
---|
14 | |
---|
15 | |
---|
16 | |
---|
17 | |
---|
18 | |
---|
19 | |
---|
20 | |
---|
21 | |
---|
22 | |
---|
23 | |
---|
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 | #include "routers_mgmt.h" |
---|
50 | #include "fields_mgmt.h" |
---|
51 | #include "routers_mgmt.h" |
---|
52 | #include "tplflset_mgmt.h" |
---|
53 | #include "fields_mgmt.h" |
---|
54 | #include "headers_mgmt.h" |
---|
55 | #include "V9Header_mgmt.h" |
---|
56 | #include "template.h" |
---|
57 | #include "dataFlowSet.h" |
---|
58 | #include "get_conf.h" |
---|
59 | #include "rules_mgmt.h" |
---|
60 | #include "msg_mgmt.h" |
---|
61 | |
---|
62 | |
---|
63 | #define SOCKET_BUFFER_SIZE 1500 |
---|
64 | |
---|
65 | #define RECEPTION_ADDRESS "" |
---|
66 | #define RECEPTION_PORT 9999 |
---|
67 | |
---|
68 | #define TIME_OUT 300 |
---|
69 | |
---|
70 | #define ROUTER_INDEX_MAX 70 |
---|
71 | #define PREFIX_V4_MAX 4000 |
---|
72 | #define FIELD_TYPE_NUMBER 89 |
---|
73 | #define MAX_RULES_PER_FIELD 10 |
---|
74 | |
---|
75 | void setCache(RulesPtr); |
---|
76 | void initCache(); |
---|
77 | void waitingRoom(); |
---|
78 | void initRule(); |
---|
79 | void sigusr1Mgmt(int); |
---|
80 | void sendMyPid(int); |
---|
81 | void sendReadRulesSignal(int); |
---|
82 | void initStream(); |
---|
83 | void catchAlarm(int); |
---|
84 | int socketLoop(); |
---|
85 | short initSocket(); |
---|
86 | short socketReading(); |
---|
87 | short getFlow(short); |
---|
88 | short checkFlow(short); |
---|
89 | void showAllTplFlSet(); |
---|