root/trunk/src/routers_mgmt.h

Revision 154, 3.5 KB (checked in by andreu, 11 years ago)

Typo correction and copyright update

  • 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-2011 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#include "renetcol_mib.h"
44#include "engine_mgmt.h"
45
46typedef struct Router * RouterPtr;
47typedef struct Router {
48  unsigned long IpAddress; /* IP address used for NDE (often a loopback) */
49  TplFlowSetPtr tplList;   /* list of the template definition */
50  TplOptionPtr tplOptList; /* list of the optional template definitions */
51  NDEEnginePtr engineList;    /* list of engines */
52  unsigned long sampled;   /* sampling value: (one for) 10, 100 or 1(full mode)*/
53  unsigned short ID;       /* internal ID, create during routers file reading */
54#ifdef IPV4AGGIDSNMP
55  unsigned short snmpIndexList[MAX_SNMP_INDEX];      /* 0:Backbone, 1:Customer */
56  unsigned short snmpIndexType[MAX_INDEX_BY_ROUTER]; /* 0:Backbone, 1:Customer use rtr ID*/
57  unsigned short snmpIndexID[MAX_INDEX_BY_ROUTER];   /* use ID , router ID */
58#endif
59  RouterPtr next;
60  RouterPtr prev;
61} RouterType;
62
63struct MyPtrs {
64  RouterPtr currentRouterPtr;
65  NetFlowV9HeaderPtr currentHeaderV9Ptr;
66  unsigned short *offsetV9Ptr;
67  unsigned char *ptr_buffer;
68  short *currentFlowsetNumberPtr;
69  short *currentFlowsetIdPtr;
70  DatagramPtr pcktPtr;
71  RuleDefPtr *rulesAddressPtr;
72  RulesPtr rulesListPtr;                             /* Rules list */
73#ifdef IPV4AGGIDR
74  unsigned long *routersID;
75#endif
76  struct RenetcolMIB *currentMIB;
77  struct RenetcolMIB *secondMIB;
78  struct PrefixV4 *currentV4Tab;
79  struct PrefixV4 *secondV4Tab;
80  struct PrefixV4 *currentV4SubnetTab;
81  struct PrefixV4 *secondV4SubnetTab;
82#ifdef IPV6AGGIDSNMP
83  struct PrefixV6 *currentV6Tab;
84  struct PrefixV6 *secondV6Tab;
85#endif
86#ifdef IPV6LINKAGG
87  struct IndexV6 *currentV6IndexTab;
88  struct IndexV6 *secondV6IndexTab;
89#endif
90#ifdef ASACC
91  unsigned short asNb;
92  struct AS *currentASTab;
93  struct AS *secondASTab;
94#endif
95#ifdef MATRIX
96  struct POP *matrixPOP;
97#endif
98};
99
100RouterPtr notExistRouter(RouterPtr, unsigned long);
101RouterPtr addRouter(RouterPtr, unsigned long, unsigned short);
102RouterPtr updateRouter(RouterPtr, unsigned long, unsigned long);
103TplFlowSetPtr newRouterTplList();
104TplFlowSetPtr deleteTplFlSet(TplFlowSetPtr);
105NDEEnginePtr newRouterEngineList();
106NDEEnginePtr existEngId(RouterPtr, unsigned long);
107TplOptionPtr newRouterTplOptList();
108TplOptionPtr deleteTplOption(TplOptionPtr);
109int getSNMPIndexList(char *, RouterPtr);
110
111/*int rm_routers(p_routers, unsigned long);
112  p_routers search_routers(unsigned long);*/
113
114#endif /* ROUTERS_MGMT_H */
Note: See TracBrowser for help on using the browser.