-
Notifications
You must be signed in to change notification settings - Fork 0
/
sr_rt.h
executable file
·47 lines (37 loc) · 1.11 KB
/
sr_rt.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*-----------------------------------------------------------------------------
* file: sr_rt.h
* date: Mon Oct 07 03:53:53 PDT 2002
* Author: casado@stanford.edu
*
* Description:
*
* Methods and datastructures for handeling the routing table
*
*---------------------------------------------------------------------------*/
#ifndef sr_RT_H
#define sr_RT_H
#ifdef _DARWIN_
#include <sys/types.h>
#endif
#include <netinet/in.h>
#include "sr_if.h"
/* ----------------------------------------------------------------------------
* struct sr_rt
*
* Node in the routing table
*
* -------------------------------------------------------------------------- */
struct sr_rt
{
struct in_addr dest;
struct in_addr gw;
struct in_addr mask;
char interface[sr_IFACE_NAMELEN];
struct sr_rt* next;
};
int sr_load_rt(struct sr_instance*,const char*);
void sr_add_rt_entry(struct sr_instance*, struct in_addr,struct in_addr,
struct in_addr, char*);
void sr_print_routing_table(struct sr_instance* sr);
void sr_print_routing_entry(struct sr_rt* entry);
#endif /* -- sr_RT_H -- */