root/trunk/src/routers_mgmt.h @ 95

Revision 95, 3.2 KB (checked in by andreu, 14 years ago)

IPv6 link aggregation mode (first step : identify flows)

  • Property svn:eol-style set to native
Line 
1/*
2 * File: routers_mgmt.h
3 *
4 * Authors: ANDREU Francois-Xavier
5 *
6 * Copyright (C) 2005 2006 2007 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#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
44typedef struct Router * RouterPtr;
45typedef struct Router {
46  unsigned long IpAddress; /* IP address used for NDE (often a loopback) */
47  TplFlowSetPtr tplList;   /* list of the template definition */
48  TplOptionPtr tplOptList; /* list of the optional template definitions */
49  unsigned long sampled; /* sampling value: (one for) 10, 100 or 1(full mode)*/
50  unsigned short ID;       /* internal ID */
51#ifdef IPV4AGGIDSNMP
52  unsigned short snmpIndexList[MAX_SNMP_INDEX]; /* 0:Backbone, 1:Customer */
53  unsigned short snmpIndexType[MAX_INDEX_BY_ROUTER]; /* 0:Backbone, 1:Customer */
54  unsigned short snmpIndexID[MAX_INDEX_BY_ROUTER];
55#endif
56  RouterPtr next;
57  RouterPtr prev;
58} RouterType;
59
60struct MyPtrs {
61  RouterPtr currentRouterPtr;
62  NetFlowV9HeaderPtr currentHeaderV9Ptr;
63  unsigned short *offsetV9Ptr;
64  unsigned char *ptr_buffer;
65  short *currentFlowsetNumberPtr;
66  short *currentFlowsetIdPtr;
67  DatagramPtr pcktPtr;
68  RuleDefPtr *rulesAddressPtr;
69  RulesPtr rulesListPtr;                             /* Rules list */
70#ifdef IPV4AGGIDR
71  unsigned long *routersID;
72#endif
73  struct PrefixV4 *currentV4Tab;
74  struct PrefixV4 *secondV4Tab;
75  struct PrefixV4 *currentV4SubnetTab;
76  struct PrefixV4 *secondV4SubnetTab;
77#ifdef IPV6AGGIDSNMP
78  struct PrefixV6 *currentV6Tab;
79  struct PrefixV6 *secondV6Tab;
80#endif
81#ifdef IPV6LINKAGG
82  struct IndexV6 *currentV6IndexTab;
83  struct IndexV6 *secondV6IndexTab;
84#endif
85#ifdef ASACC
86  unsigned short asNb;
87  struct AS *currentASTab;
88  struct AS *secondASTab;
89#endif
90#ifdef MATRIX
91  struct POP *matrixPOP;
92#endif
93};
94
95RouterPtr notExistRouter(RouterPtr, unsigned long);
96RouterPtr addRouter(RouterPtr, unsigned long, unsigned short);
97RouterPtr updateRouter(RouterPtr, unsigned long, unsigned long);
98TplFlowSetPtr newRouterTplList();
99TplFlowSetPtr deleteTplFlSet(TplFlowSetPtr);
100TplOptionPtr newRouterTplOptList();
101TplOptionPtr deleteTplOption(TplOptionPtr);
102int getSNMPIndexList(char *, RouterPtr);
103
104/*int rm_routers(p_routers, unsigned long);
105  p_routers search_routers(unsigned long);*/
106
107#endif /* ROUTERS_MGMT_H */
Note: See TracBrowser for help on using the browser.