root/trunk/src/routers_mgmt.h @ 60

Revision 60, 2.8 KB (checked in by andreu, 15 years ago)

new aggregation mode based on SNMP index and AS aggregation

  • 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#ifdef IPV4AGGIDSNMP
51  unsigned short snmpIndexList[MAX_SNMP_INDEX]; /* 0:Backbone, 1:Customer */
52#endif
53  RouterPtr next;
54  RouterPtr prev;
55} RouterType;
56
57struct 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;                             /* Rules list */
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
84RouterPtr notExistRouter(RouterPtr, unsigned long);
85RouterPtr addRouter(RouterPtr, unsigned long);
86RouterPtr updateRouter(RouterPtr, unsigned long, unsigned long);
87TplFlowSetPtr newRouterTplList();
88TplFlowSetPtr deleteTplFlSet(TplFlowSetPtr);
89TplOptionPtr newRouterTplOptList();
90TplOptionPtr deleteTplOption(TplOptionPtr);
91int getSNMPIndexList(char *, RouterPtr);
92
93/*int rm_routers(p_routers, unsigned long);
94  p_routers search_routers(unsigned long);*/
95
96#endif /* ROUTERS_MGMT_H */
Note: See TracBrowser for help on using the browser.