summaryrefslogtreecommitdiff
path: root/sys/net/route.h
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2006-06-16 16:49:41 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2006-06-16 16:49:41 +0000
commit9812d2fe804b7eef6fe9c72ce9b46280bb295ed0 (patch)
treec41b8d76dde5b62775e228da888bf9b06187c66f /sys/net/route.h
parent0130c9137cea61e3309279b1ce04b5018ad92e83 (diff)
adjust functions dealing with the routing table to take a table ID as
parameter so they can work on alternate tables. table 0 hardcoded for many callers yet, that will be adapted step by step. input + ok claudio norby hshoexer
Diffstat (limited to 'sys/net/route.h')
-rw-r--r--sys/net/route.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/sys/net/route.h b/sys/net/route.h
index 6534ddf1057..ae338488b6f 100644
--- a/sys/net/route.h
+++ b/sys/net/route.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.h,v 1.43 2006/06/15 16:33:02 henning Exp $ */
+/* $OpenBSD: route.h,v 1.44 2006/06/16 16:49:39 henning Exp $ */
/* $NetBSD: route.h,v 1.9 1996/02/13 22:00:49 christos Exp $ */
/*
@@ -80,7 +80,7 @@ struct rt_metrics {
u_long rmx_rttvar; /* estimated rtt variance (deprecated) */
u_long rmx_pksent; /* packets sent using this route */
};
-/* XXX overloading rttvar as that value is no longer used. */
+/* XXX overloading some values that are no longer used. */
#define rmx_refcnt rmx_rttvar /* # held references only used by sysctl */
/*
@@ -285,6 +285,8 @@ struct sockaddr_rtlabel {
char sr_label[RTLABEL_LEN];
};
+#define RT_TABLEID_MAX 255
+
#ifdef _KERNEL
const char *rtlabel_id2name(u_int16_t);
u_int16_t rtlabel_name2id(char *);
@@ -304,14 +306,14 @@ void rtlabel_unref(u_int16_t);
#define ONNET_CLONING 1
#define NO_CLONING 2
-#define RT_TABLEID_MAX 255
-
extern struct route_cb route_cb;
extern struct rtstat rtstat;
extern const struct sockaddr_rtin rt_defmask4;
struct socket;
void route_init(void);
+int rtable_add(u_int);
+int rtable_exists(u_int);
int route_output(struct mbuf *, ...);
int route_usrreq(struct socket *, int, struct mbuf *,
struct mbuf *, struct mbuf *);
@@ -319,10 +321,11 @@ void rt_ifmsg(struct ifnet *);
void rt_ifannouncemsg(struct ifnet *, int);
void rt_maskedcopy(struct sockaddr *,
struct sockaddr *, struct sockaddr *);
-void rt_missmsg(int, struct rt_addrinfo *, int, struct ifnet *, int);
+void rt_missmsg(int, struct rt_addrinfo *, int, struct ifnet *, int,
+ u_int);
void rt_newaddrmsg(int, struct ifaddr *, int, struct rtentry *);
int rt_setgate(struct rtentry *, struct sockaddr *,
- struct sockaddr *);
+ struct sockaddr *, u_int);
void rt_setmetrics(u_long, struct rt_metrics *, struct rt_kmetrics *);
void rt_getmetrics(struct rt_kmetrics *, struct rt_metrics *);
int rt_timer_add(struct rtentry *,
@@ -338,7 +341,7 @@ unsigned long rt_timer_count(struct rttimer_queue *);
void rt_timer_timer(void *);
void rtalloc(struct route *);
struct rtentry *
- rtalloc1(struct sockaddr *, int);
+ rtalloc1(struct sockaddr *, int, u_int);
void rtalloc_noclone(struct route *, int);
struct rtentry *
rtalloc2(struct sockaddr *, int, int);
@@ -351,8 +354,8 @@ void rtredirect(struct sockaddr *, struct sockaddr *,
struct rtentry **);
int rtrequest(int, struct sockaddr *,
struct sockaddr *, struct sockaddr *, int,
- struct rtentry **);
-int rtrequest1(int, struct rt_addrinfo *, struct rtentry **);
+ struct rtentry **, u_int);
+int rtrequest1(int, struct rt_addrinfo *, struct rtentry **, u_int);
void rt_if_remove(struct ifnet *);
struct radix_node_head *rt_gettable(sa_family_t, u_int);