-
Notifications
You must be signed in to change notification settings - Fork 4
/
main.h
29 lines (25 loc) · 1.05 KB
/
main.h
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
27
28
29
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
/********************************************************************
* Constant definitions
********************************************************************/
#define MTABLE_ENTRIES_LENGTH 16777216 // 2^24 entries
/********************************************************************
*
* Reads the Ip's file, and calls interface_lookup() method to get the output interfaces
*
********************************************************************/
void compute_routes();
/********************************************************************
*
* Generate the TBL24 (called mtable) and TBLlong (called stable) tables
*
********************************************************************/
void initializeFIB();
/********************************************************************
*
* Looks for an IP inside the main and secundary tables.
*
********************************************************************/
void interface_lookup(uint32_t *IP_lookup,short int *ntables,unsigned short *interface);