aboutsummaryrefslogtreecommitdiffstats
path: root/pingu_gateway.h
blob: b2f424f8a0014524dbb9a7f11059f7ad27faddcc (plain)
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
#ifndef PINGU_GATEWAY_H
#define PINGU_GATEWAY_H

#include "list.h"
#include "sockaddr_util.h"

struct pingu_gateway {
	union sockaddr_any gw_addr;
	union sockaddr_any dest;
	union sockaddr_any src;
	unsigned char dst_len;
	unsigned char src_len;

	int metric;
	unsigned char protocol;
	unsigned char scope;
	unsigned char type;
	struct list_head gateway_list_entry;
};

void pingu_gateway_del_all(struct list_head *head);
void pingu_gateway_add(struct list_head *gateway_list,
			     struct pingu_gateway *gw);
void pingu_gateway_del(struct list_head *gateway_list,
			     struct pingu_gateway *gw);
int is_default_gw(struct pingu_gateway *route);
struct pingu_gateway *pingu_gateway_first_default(struct list_head *gateway_list);


#endif