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 | #ifndef ROUTERS_MGMT_H |
---|
26 | #define ROUTERS_MGMT_H |
---|
27 | |
---|
28 | #include <unistd.h> |
---|
29 | #include <stdio.h> |
---|
30 | #include <string.h> |
---|
31 | #include <stdlib.h> |
---|
32 | #include <errno.h> |
---|
33 | #include <sys/ioctl.h> |
---|
34 | #include <syslog.h> |
---|
35 | |
---|
36 | #include "renetcolParam.h" |
---|
37 | #include "tplflset_mgmt.h" |
---|
38 | #include "get_conf.h" |
---|
39 | #include "prefix_mgmt.h" |
---|
40 | #include "V9Header_mgmt.h" |
---|
41 | #include "headers_mgmt.h" |
---|
42 | #include "rules_mgmt.h" |
---|
43 | |
---|
44 | typedef struct Router * RouterPtr; |
---|
45 | typedef struct Router { |
---|
46 | unsigned long IpAddress; |
---|
47 | TplFlowSetPtr tplList; |
---|
48 | TplOptionPtr tplOptList; |
---|
49 | unsigned long sampled; |
---|
50 | #ifdef IPV4AGGIDSNMP |
---|
51 | unsigned short snmpIndexList[MAX_SNMP_INDEX]; |
---|
52 | #endif |
---|
53 | RouterPtr next; |
---|
54 | RouterPtr prev; |
---|
55 | } RouterType; |
---|
56 | |
---|
57 | struct MyPtrs { |
---|
58 | RouterPtr currentRouterPtr; |
---|
59 | NetFlowV9HeaderPtr currentHeaderV9Ptr; |
---|
60 | unsigned short *offsetV9Ptr; |
---|
61 | unsigned char *ptr_buffer; |
---|
62 | short *currentFlowsetNumberPtr; |
---|
63 | short *currentFlowsetIdPtr; |
---|
64 | DatagramPtr pcktPtr; |
---|
65 | RuleDefPtr *rulesAddressPtr; |
---|
66 | RulesPtr rulesListPtr; |
---|
67 | #ifdef IPV4AGGIDR |
---|
68 | unsigned long *routersID; |
---|
69 | #endif |
---|
70 | struct PrefixV4 *currentV4Tab; |
---|
71 | struct PrefixV4 *secondV4Tab; |
---|
72 | struct PrefixV4 *currentV4SubnetTab; |
---|
73 | struct PrefixV4 *secondV4SubnetTab; |
---|
74 | #ifdef ASACC |
---|
75 | unsigned short asNb; |
---|
76 | struct AS *currentASTab; |
---|
77 | struct AS *secondASTab; |
---|
78 | #endif |
---|
79 | #ifdef MATRIX |
---|
80 | struct POP *matrixPOP; |
---|
81 | #endif |
---|
82 | }; |
---|
83 | |
---|
84 | RouterPtr notExistRouter(RouterPtr, unsigned long); |
---|
85 | RouterPtr addRouter(RouterPtr, unsigned long); |
---|
86 | RouterPtr updateRouter(RouterPtr, unsigned long, unsigned long); |
---|
87 | TplFlowSetPtr newRouterTplList(); |
---|
88 | TplFlowSetPtr deleteTplFlSet(TplFlowSetPtr); |
---|
89 | TplOptionPtr newRouterTplOptList(); |
---|
90 | TplOptionPtr deleteTplOption(TplOptionPtr); |
---|
91 | int getSNMPIndexList(char *, RouterPtr); |
---|
92 | |
---|
93 | |
---|
94 | |
---|
95 | |
---|
96 | #endif |
---|