route.h revision 6017:7e310503019e
1/*
2 * route.c
3 *
4 * Kernel route table operations.
5 *
6 * Copyright (c) 2000 Dug Song <dugsong@monkey.org>
7 *
8 * $Id: route.h,v 1.6 2002/02/04 04:02:22 dugsong Exp $
9 */
10
11#ifndef DNET_ROUTE_H
12#define DNET_ROUTE_H
13
14/*
15 * Routing table entry
16 */
17struct route_entry {
18        struct addr	route_dst;	/* destination address */
19        struct addr	route_gw;	/* gateway address */
20};
21
22typedef struct route_handle route_t;
23
24typedef int (*route_handler)(const struct route_entry *entry, void *arg);
25
26__BEGIN_DECLS
27route_t	*route_open(void);
28int	 route_add(route_t *r, const struct route_entry *entry);
29int	 route_delete(route_t *r, const struct route_entry *entry);
30int	 route_get(route_t *r, struct route_entry *entry);
31int	 route_loop(route_t *r, route_handler callback, void *arg);
32route_t	*route_close(route_t *r);
33__END_DECLS
34
35#endif /* DNET_ROUTE_H */
36