move dnet to the correct place so that we use this --HG-- rename : ext/dnet/dnet/addr.h => ext/dnet/addr.h rename : ext/dnet/dnet/arp.h => ext/dnet/arp.h rename : ext/dnet/dnet/blob.h => ext/dnet/blob.h rename : ext/dnet/dnet/eth.h => ext/dnet/eth.h rename : ext/dnet/dnet/fw.h => ext/dnet/fw.h rename : ext/dnet/dnet/icmp.h => ext/dnet/icmp.h rename : ext/dnet/dnet/intf.h => ext/dnet/intf.h rename : ext/dnet/dnet/ip.h => ext/dnet/ip.h rename : ext/dnet/dnet/ip6.h => ext/dnet/ip6.h rename : ext/dnet/dnet/os.h => ext/dnet/os.h rename : ext/dnet/dnet/rand.h => ext/dnet/rand.h rename : ext/dnet/dnet/route.h => ext/dnet/route.h rename : ext/dnet/dnet/tcp.h => ext/dnet/tcp.h rename : ext/dnet/dnet/udp.h => ext/dnet/udp.h
35 lines
848 B
C
35 lines
848 B
C
/*
|
|
* route.c
|
|
*
|
|
* Kernel route table operations.
|
|
*
|
|
* Copyright (c) 2000 Dug Song <dugsong@monkey.org>
|
|
*
|
|
* $Id: route.h,v 1.6 2002/02/04 04:02:22 dugsong Exp $
|
|
*/
|
|
|
|
#ifndef DNET_ROUTE_H
|
|
#define DNET_ROUTE_H
|
|
|
|
/*
|
|
* Routing table entry
|
|
*/
|
|
struct route_entry {
|
|
struct addr route_dst; /* destination address */
|
|
struct addr route_gw; /* gateway address */
|
|
};
|
|
|
|
typedef struct route_handle route_t;
|
|
|
|
typedef int (*route_handler)(const struct route_entry *entry, void *arg);
|
|
|
|
__BEGIN_DECLS
|
|
route_t *route_open(void);
|
|
int route_add(route_t *r, const struct route_entry *entry);
|
|
int route_delete(route_t *r, const struct route_entry *entry);
|
|
int route_get(route_t *r, struct route_entry *entry);
|
|
int route_loop(route_t *r, route_handler callback, void *arg);
|
|
route_t *route_close(route_t *r);
|
|
__END_DECLS
|
|
|
|
#endif /* DNET_ROUTE_H */
|