mirror of
https://github.com/Hizenberg469/Routing-Table-Manager.git
synced 2026-04-20 02:12:25 +03:00
RTM Project
This commit is contained in:
31
Routing-Table/routing-table.h
Normal file
31
Routing-Table/routing-table.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef ROUTINGTABLE_H
|
||||
#define ROUTINGTABLE_H
|
||||
|
||||
#define IP_ADDR_LEN 26
|
||||
#define OIF_LEN 32
|
||||
|
||||
typedef struct dll_ dll_t;
|
||||
typedef struct dll_node_ dll_node_t;
|
||||
|
||||
/*
|
||||
* Data structure defination for routing table entry
|
||||
*/
|
||||
typedef struct routing_table_entry_ {
|
||||
|
||||
char dest[IP_ADDR_LEN];
|
||||
unsigned short mask;
|
||||
char gw[IP_ADDR_LEN];
|
||||
char oif[OIF_LEN];
|
||||
|
||||
}routing_table_entry_t;
|
||||
|
||||
/*
|
||||
* Public API's for routing table functionality
|
||||
*/
|
||||
|
||||
void display_routing_table(const dll_t* routing_table);
|
||||
dll_node_t* find_routing_table_entry(const dll_t* routing_table, const char* dest,
|
||||
const unsigned short mask);
|
||||
void update(dll_node_t* node, const char* gw, const char* oif);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user