forked from dancrossnyc/44ripd
-
Notifications
You must be signed in to change notification settings - Fork 1
/
sys.h
26 lines (22 loc) · 852 Bytes
/
sys.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
#ifndef RIPD_SYS_H
#define RIPD_SYS_H
//
// Operating system-specific helper functions.
//
#include <inttypes.h>
typedef void (*if_discovered_thunk)(const char *name, int num,
uint32_t outer_local, uint32_t outer_remote, uint32_t inner_local,
uint32_t inner_remote, void *arg
);
typedef void (*rt_discovered_thunk)(uint32_t ipnet, uint32_t mask,
int isaddr, uint32_t dstaddr, const char *dstif, void *arg);
void discover(int rtable, if_discovered_thunk ifthunk,
rt_discovered_thunk rtthunk, void *arg);
int initsock(const char *restrict group, int port, int rtable);
void initsys(int rtable);
int uptunnel(Tunnel *tunnel, int rtable);
int downtunnel(Tunnel *tunnel);
int addroute(Route *route, Tunnel *tunnel, int rtable);
int chroute(Route *route, Tunnel *tunnel, int rtable);
int rmroute(Route *route, int rtable);
#endif