summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorkmacy <kmacy@FreeBSD.org>2009-04-16 20:30:28 +0000
committerkmacy <kmacy@FreeBSD.org>2009-04-16 20:30:28 +0000
commit24b38efdce5f73d92ac948039ef4966d9502b484 (patch)
treef09ffe8dbc619e723cdaebdc910a5ed28f73768b /sys/net
parentae4f793822da0acb8cd844e26144e060eebff125 (diff)
downloadFreeBSD-src-24b38efdce5f73d92ac948039ef4966d9502b484.zip
FreeBSD-src-24b38efdce5f73d92ac948039ef4966d9502b484.tar.gz
Change if_output to take a struct route as its fourth argument in order
to allow passing a cached struct llentry * down to L2 Reviewed by: rwatson
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/ethernet.h4
-rw-r--r--sys/net/if_arc.h2
-rw-r--r--sys/net/if_arcsubr.c5
-rw-r--r--sys/net/if_atm.h2
-rw-r--r--sys/net/if_atmsubr.c8
-rw-r--r--sys/net/if_disc.c4
-rw-r--r--sys/net/if_enc.c4
-rw-r--r--sys/net/if_ethersubr.c19
-rw-r--r--sys/net/if_faith.c9
-rw-r--r--sys/net/if_fddisubr.c9
-rw-r--r--sys/net/if_fwsubr.c4
-rw-r--r--sys/net/if_gif.c4
-rw-r--r--sys/net/if_gif.h2
-rw-r--r--sys/net/if_gre.c4
-rw-r--r--sys/net/if_iso88025subr.c8
-rw-r--r--sys/net/if_lagg.c6
-rw-r--r--sys/net/if_lagg.h2
-rw-r--r--sys/net/if_loop.c7
-rw-r--r--sys/net/if_spppsubr.c4
-rw-r--r--sys/net/if_stf.c6
-rw-r--r--sys/net/if_tun.c4
-rw-r--r--sys/net/if_var.h3
-rw-r--r--sys/net/iso88025.h2
-rw-r--r--sys/net/route.h7
24 files changed, 78 insertions, 51 deletions
diff --git a/sys/net/ethernet.h b/sys/net/ethernet.h
index 1cb57ad..ae7341e 100644
--- a/sys/net/ethernet.h
+++ b/sys/net/ethernet.h
@@ -365,7 +365,7 @@ struct ether_addr {
struct ifnet;
struct mbuf;
-struct rtentry;
+struct route;
struct sockaddr;
struct bpf_if;
@@ -376,7 +376,7 @@ extern void ether_ifattach(struct ifnet *, const u_int8_t *);
extern void ether_ifdetach(struct ifnet *);
extern int ether_ioctl(struct ifnet *, u_long, caddr_t);
extern int ether_output(struct ifnet *,
- struct mbuf *, struct sockaddr *, struct rtentry *);
+ struct mbuf *, struct sockaddr *, struct route *);
extern int ether_output_frame(struct ifnet *, struct mbuf *);
extern char *ether_sprintf(const u_int8_t *);
void ether_vlan_mtap(struct bpf_if *, struct mbuf *,
diff --git a/sys/net/if_arc.h b/sys/net/if_arc.h
index f2dc87c..086aeb0f 100644
--- a/sys/net/if_arc.h
+++ b/sys/net/if_arc.h
@@ -133,7 +133,7 @@ void arc_storelladdr(struct ifnet *, u_int8_t);
int arc_isphds(u_int8_t);
void arc_input(struct ifnet *, struct mbuf *);
int arc_output(struct ifnet *, struct mbuf *,
- struct sockaddr *, struct rtentry *);
+ struct sockaddr *, struct route *);
int arc_ioctl(struct ifnet *, int, caddr_t);
void arc_frag_init(struct ifnet *);
diff --git a/sys/net/if_arcsubr.c b/sys/net/if_arcsubr.c
index 0089d13..9b834be 100644
--- a/sys/net/if_arcsubr.c
+++ b/sys/net/if_arcsubr.c
@@ -102,7 +102,7 @@ u_int8_t arcbroadcastaddr = 0;
*/
int
arc_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
- struct rtentry *rt0)
+ struct route *ro)
{
struct arc_header *ah;
int error;
@@ -129,7 +129,8 @@ arc_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
else if (ifp->if_flags & IFF_NOARP)
adst = ntohl(SIN(dst)->sin_addr.s_addr) & 0xFF;
else {
- error = arpresolve(ifp, rt0, m, dst, &adst, &lle);
+ error = arpresolve(ifp, ro ? ro->ro_rt : NULL,
+ m, dst, &adst, &lle);
if (error)
return (error == EWOULDBLOCK ? 0 : error);
}
diff --git a/sys/net/if_atm.h b/sys/net/if_atm.h
index 99cc277..e8f69da 100644
--- a/sys/net/if_atm.h
+++ b/sys/net/if_atm.h
@@ -293,7 +293,7 @@ void atm_ifdetach(struct ifnet *);
void atm_input(struct ifnet *, struct atm_pseudohdr *,
struct mbuf *, void *);
int atm_output(struct ifnet *, struct mbuf *, struct sockaddr *,
- struct rtentry *);
+ struct route *);
struct atmio_vcctable *atm_getvccs(struct atmio_vcc **, u_int, u_int,
struct mtx *, int);
diff --git a/sys/net/if_atmsubr.c b/sys/net/if_atmsubr.c
index 7e36187..734acc5 100644
--- a/sys/net/if_atmsubr.c
+++ b/sys/net/if_atmsubr.c
@@ -113,17 +113,17 @@ MALLOC_DEFINE(M_IFATM, "ifatm", "atm interface internals");
* "ifp" = ATM interface to output to
* "m0" = the packet to output
* "dst" = the sockaddr to send to (either IP addr, or raw VPI/VCI)
- * "rt0" = the route to use
+ * "ro" = the route to use
* returns: error code [0 == ok]
*
* note: special semantic: if (dst == NULL) then we assume "m" already
* has an atm_pseudohdr on it and just send it directly.
* [for native mode ATM output] if dst is null, then
- * rt0 must also be NULL.
+ * ro->ro_rt must also be NULL.
*/
int
atm_output(struct ifnet *ifp, struct mbuf *m0, struct sockaddr *dst,
- struct rtentry *rt0)
+ struct route *ro)
{
u_int16_t etype = 0; /* if using LLC/SNAP */
int error = 0, sz;
@@ -157,7 +157,7 @@ atm_output(struct ifnet *ifp, struct mbuf *m0, struct sockaddr *dst,
etype = ETHERTYPE_IPV6;
else
etype = ETHERTYPE_IP;
- if (!atmresolve(rt0, m, dst, &atmdst)) {
+ if (!atmresolve(ro->ro_rt, m, dst, &atmdst)) {
m = NULL;
/* XXX: atmresolve already free'd it */
senderr(EHOSTUNREACH);
diff --git a/sys/net/if_disc.c b/sys/net/if_disc.c
index 98a06c1..ca77899 100644
--- a/sys/net/if_disc.c
+++ b/sys/net/if_disc.c
@@ -66,7 +66,7 @@ struct disc_softc {
};
static int discoutput(struct ifnet *, struct mbuf *,
- struct sockaddr *, struct rtentry *);
+ struct sockaddr *, struct route *);
static void discrtrequest(int, struct rtentry *, struct rt_addrinfo *);
static int discioctl(struct ifnet *, u_long, caddr_t);
static int disc_clone_create(struct if_clone *, int, caddr_t);
@@ -156,7 +156,7 @@ DECLARE_MODULE(if_disc, disc_mod, SI_SUB_PSEUDO, SI_ORDER_ANY);
static int
discoutput(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
- struct rtentry *rt)
+ struct route *ro)
{
u_int32_t af;
diff --git a/sys/net/if_enc.c b/sys/net/if_enc.c
index aa008ae..391b798 100644
--- a/sys/net/if_enc.c
+++ b/sys/net/if_enc.c
@@ -85,7 +85,7 @@ struct enc_softc {
static int enc_ioctl(struct ifnet *, u_long, caddr_t);
static int enc_output(struct ifnet *ifp, struct mbuf *m,
- struct sockaddr *dst, struct rtentry *rt);
+ struct sockaddr *dst, struct route *ro);
static int enc_clone_create(struct if_clone *, int, caddr_t);
static void enc_clone_destroy(struct ifnet *);
@@ -185,7 +185,7 @@ DECLARE_MODULE(enc, enc_mod, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY);
static int
enc_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
- struct rtentry *rt)
+ struct route *ro)
{
m_freem(m);
return (0);
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index df52f83..38bf7d4 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -163,17 +163,22 @@ static int ether_ipfw;
*/
int
ether_output(struct ifnet *ifp, struct mbuf *m,
- struct sockaddr *dst, struct rtentry *rt0)
+ struct sockaddr *dst, struct route *ro)
{
short type;
- int error, hdrcmplt = 0;
+ int error = 0, hdrcmplt = 0;
u_char esrc[ETHER_ADDR_LEN], edst[ETHER_ADDR_LEN];
struct llentry *lle = NULL;
+ struct rtentry *rt0 = NULL;
struct ether_header *eh;
struct pf_mtag *t;
int loop_copy = 1;
int hlen; /* link layer header length */
+ if (ro != NULL) {
+ lle = ro->ro_lle;
+ rt0 = ro->ro_rt;
+ }
#ifdef MAC
error = mac_ifnet_check_transmit(ifp, m);
if (error)
@@ -191,7 +196,10 @@ ether_output(struct ifnet *ifp, struct mbuf *m,
switch (dst->sa_family) {
#ifdef INET
case AF_INET:
- error = arpresolve(ifp, rt0, m, dst, edst, &lle);
+ if (lle != NULL && (lle->la_flags & LLE_VALID))
+ memcpy(edst, &lle->ll_addr.mac16, sizeof(edst));
+ else
+ error = arpresolve(ifp, rt0, m, dst, edst, &lle);
if (error)
return (error == EWOULDBLOCK ? 0 : error);
type = htons(ETHERTYPE_IP);
@@ -226,7 +234,10 @@ ether_output(struct ifnet *ifp, struct mbuf *m,
#endif
#ifdef INET6
case AF_INET6:
- error = nd6_storelladdr(ifp, m, dst, (u_char *)edst, &lle);
+ if (lle != NULL && (lle->la_flags & LLE_VALID))
+ memcpy(edst, &lle->ll_addr.mac16, sizeof(edst));
+ else
+ error = nd6_storelladdr(ifp, m, dst, (u_char *)edst, &lle);
if (error)
return error;
type = htons(ETHERTYPE_IPV6);
diff --git a/sys/net/if_faith.c b/sys/net/if_faith.c
index c839748..3b60d2c 100644
--- a/sys/net/if_faith.c
+++ b/sys/net/if_faith.c
@@ -88,7 +88,7 @@ struct faith_softc {
static int faithioctl(struct ifnet *, u_long, caddr_t);
int faithoutput(struct ifnet *, struct mbuf *, struct sockaddr *,
- struct rtentry *);
+ struct route *);
static void faithrtrequest(int, struct rtentry *, struct rt_addrinfo *);
#ifdef INET6
static int faithprefix(struct in6_addr *);
@@ -188,17 +188,20 @@ faith_clone_destroy(ifp)
}
int
-faithoutput(ifp, m, dst, rt)
+faithoutput(ifp, m, dst, ro)
struct ifnet *ifp;
struct mbuf *m;
struct sockaddr *dst;
- struct rtentry *rt;
+ struct route *ro;
{
int isr;
u_int32_t af;
+ struct rtentry *rt = NULL;
M_ASSERTPKTHDR(m);
+ if (ro != NULL)
+ rt = ro->ro_rt;
/* BPF writes need to be handled specially. */
if (dst->sa_family == AF_UNSPEC) {
bcopy(dst->sa_data, &af, sizeof(af));
diff --git a/sys/net/if_fddisubr.c b/sys/net/if_fddisubr.c
index 438a6e8..28f6e3a 100644
--- a/sys/net/if_fddisubr.c
+++ b/sys/net/if_fddisubr.c
@@ -98,7 +98,7 @@ static const u_char fddibroadcastaddr[FDDI_ADDR_LEN] =
static int fddi_resolvemulti(struct ifnet *, struct sockaddr **,
struct sockaddr *);
static int fddi_output(struct ifnet *, struct mbuf *, struct sockaddr *,
- struct rtentry *);
+ struct route *);
static void fddi_input(struct ifnet *ifp, struct mbuf *m);
#define senderr(e) do { error = (e); goto bad; } while (0)
@@ -111,18 +111,21 @@ static void fddi_input(struct ifnet *ifp, struct mbuf *m);
* Assumes that ifp is actually pointer to arpcom structure.
*/
static int
-fddi_output(ifp, m, dst, rt0)
+fddi_output(ifp, m, dst, ro)
struct ifnet *ifp;
struct mbuf *m;
struct sockaddr *dst;
- struct rtentry *rt0;
+ struct route *ro;
{
u_int16_t type;
int loop_copy = 0, error = 0, hdrcmplt = 0;
u_char esrc[FDDI_ADDR_LEN], edst[FDDI_ADDR_LEN];
struct fddi_header *fh;
struct llentry *lle;
+ struct rtentry *rt0 = NULL;
+ if (ro != NULL)
+ rt0 = ro->ro_rt;
#ifdef MAC
error = mac_ifnet_check_transmit(ifp, m);
if (error)
diff --git a/sys/net/if_fwsubr.c b/sys/net/if_fwsubr.c
index 9d7b95b..a5e0b19 100644
--- a/sys/net/if_fwsubr.c
+++ b/sys/net/if_fwsubr.c
@@ -77,7 +77,7 @@ struct fw_hwaddr firewire_broadcastaddr = {
static int
firewire_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
- struct rtentry *rt0)
+ struct route *ro)
{
struct fw_com *fc = IFP2FWC(ifp);
int error, type;
@@ -138,7 +138,7 @@ firewire_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
* doesn't fit into the arp model.
*/
if (unicast) {
- error = arpresolve(ifp, rt0, m, dst, (u_char *) destfw, &lle);
+ error = arpresolve(ifp, ro ? ro->ro_rt : NULL, m, dst, (u_char *) destfw, &lle);
if (error)
return (error == EWOULDBLOCK ? 0 : error);
}
diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c
index 1c10f17..a72d89c 100644
--- a/sys/net/if_gif.c
+++ b/sys/net/if_gif.c
@@ -409,11 +409,11 @@ gif_start(struct ifnet *ifp)
}
int
-gif_output(ifp, m, dst, rt)
+gif_output(ifp, m, dst, ro)
struct ifnet *ifp;
struct mbuf *m;
struct sockaddr *dst;
- struct rtentry *rt; /* added in net2 */
+ struct route *ro;
{
INIT_VNET_GIF(ifp->if_vnet);
struct gif_softc *sc = ifp->if_softc;
diff --git a/sys/net/if_gif.h b/sys/net/if_gif.h
index 0fe45b3..779d8be 100644
--- a/sys/net/if_gif.h
+++ b/sys/net/if_gif.h
@@ -106,7 +106,7 @@ struct etherip_header {
/* Prototypes */
void gif_input(struct mbuf *, int, struct ifnet *);
int gif_output(struct ifnet *, struct mbuf *, struct sockaddr *,
- struct rtentry *);
+ struct route *);
int gif_ioctl(struct ifnet *, u_long, caddr_t);
int gif_set_tunnel(struct ifnet *, struct sockaddr *, struct sockaddr *);
void gif_delete_tunnel(struct ifnet *);
diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c
index cfd249f..5ec12e0 100644
--- a/sys/net/if_gre.c
+++ b/sys/net/if_gre.c
@@ -110,7 +110,7 @@ static int gre_clone_create(struct if_clone *, int, caddr_t);
static void gre_clone_destroy(struct ifnet *);
static int gre_ioctl(struct ifnet *, u_long, caddr_t);
static int gre_output(struct ifnet *, struct mbuf *, struct sockaddr *,
- struct rtentry *rt);
+ struct route *ro);
IFC_SIMPLE_DECLARE(gre, 0);
@@ -240,7 +240,7 @@ gre_clone_destroy(ifp)
*/
static int
gre_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
- struct rtentry *rt)
+ struct route *ro)
{
#ifdef INET6
INIT_VNET_INET(ifp->if_vnet);
diff --git a/sys/net/if_iso88025subr.c b/sys/net/if_iso88025subr.c
index ff82e10..99daf66 100644
--- a/sys/net/if_iso88025subr.c
+++ b/sys/net/if_iso88025subr.c
@@ -232,11 +232,11 @@ iso88025_ioctl(struct ifnet *ifp, int command, caddr_t data)
* ISO88025 encapsulation
*/
int
-iso88025_output(ifp, m, dst, rt0)
+iso88025_output(ifp, m, dst, ro)
struct ifnet *ifp;
struct mbuf *m;
struct sockaddr *dst;
- struct rtentry *rt0;
+ struct route *ro;
{
u_int16_t snap_type = 0;
int loop_copy = 0, error = 0, rif_len = 0;
@@ -245,6 +245,10 @@ iso88025_output(ifp, m, dst, rt0)
struct iso88025_header gen_th;
struct sockaddr_dl *sdl = NULL;
struct llentry *lle;
+ struct rtentry *rt0 = NULL;
+
+ if (ro != NULL)
+ rt0 = ro->ro_rt;
#ifdef MAC
error = mac_ifnet_check_transmit(ifp, m);
diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c
index 0ab96b3..0479b90 100644
--- a/sys/net/if_lagg.c
+++ b/sys/net/if_lagg.c
@@ -93,7 +93,7 @@ static void lagg_linkstate(struct lagg_softc *);
static void lagg_port_state(struct ifnet *, int);
static int lagg_port_ioctl(struct ifnet *, u_long, caddr_t);
static int lagg_port_output(struct ifnet *, struct mbuf *,
- struct sockaddr *, struct rtentry *);
+ struct sockaddr *, struct route *);
static void lagg_port_ifdetach(void *arg __unused, struct ifnet *);
static int lagg_port_checkstacking(struct lagg_softc *);
static void lagg_port2req(struct lagg_port *, struct lagg_reqport *);
@@ -676,7 +676,7 @@ fallback:
static int
lagg_port_output(struct ifnet *ifp, struct mbuf *m,
- struct sockaddr *dst, struct rtentry *rt0)
+ struct sockaddr *dst, struct route *ro)
{
struct lagg_port *lp = ifp->if_lagg;
struct ether_header *eh;
@@ -696,7 +696,7 @@ lagg_port_output(struct ifnet *ifp, struct mbuf *m,
*/
switch (ntohs(type)) {
case ETHERTYPE_PAE: /* EAPOL PAE/802.1x */
- return ((*lp->lp_output)(ifp, m, dst, rt0));
+ return ((*lp->lp_output)(ifp, m, dst, ro));
}
/* drop any other frames */
diff --git a/sys/net/if_lagg.h b/sys/net/if_lagg.h
index 2b25118..896f5b3 100644
--- a/sys/net/if_lagg.h
+++ b/sys/net/if_lagg.h
@@ -218,7 +218,7 @@ struct lagg_port {
/* Redirected callbacks */
int (*lp_ioctl)(struct ifnet *, u_long, caddr_t);
int (*lp_output)(struct ifnet *, struct mbuf *, struct sockaddr *,
- struct rtentry *);
+ struct route *);
SLIST_ENTRY(lagg_port) lp_entries;
};
diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c
index c31acef..ff57464 100644
--- a/sys/net/if_loop.c
+++ b/sys/net/if_loop.c
@@ -102,7 +102,7 @@
int loioctl(struct ifnet *, u_long, caddr_t);
static void lortrequest(int, struct rtentry *, struct rt_addrinfo *);
int looutput(struct ifnet *ifp, struct mbuf *m,
- struct sockaddr *dst, struct rtentry *rt);
+ struct sockaddr *dst, struct route *ro);
static int lo_clone_create(struct if_clone *, int, caddr_t);
static void lo_clone_destroy(struct ifnet *);
static int vnet_loif_iattach(const void *);
@@ -205,15 +205,18 @@ DECLARE_MODULE(loop, loop_mod, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY);
int
looutput(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
- struct rtentry *rt)
+ struct route *ro)
{
u_int32_t af;
+ struct rtentry *rt = NULL;
#ifdef MAC
int error;
#endif
M_ASSERTPKTHDR(m); /* check if we have the packet header */
+ if (ro != NULL)
+ rt = ro->ro_rt;
#ifdef MAC
error = mac_ifnet_check_transmit(ifp, m);
if (error) {
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c
index b1c7125..a84670c 100644
--- a/sys/net/if_spppsubr.c
+++ b/sys/net/if_spppsubr.c
@@ -263,7 +263,7 @@ static const u_short interactive_ports[8] = {
int debug = ifp->if_flags & IFF_DEBUG
static int sppp_output(struct ifnet *ifp, struct mbuf *m,
- struct sockaddr *dst, struct rtentry *rt);
+ struct sockaddr *dst, struct route *ro);
static void sppp_cisco_send(struct sppp *sp, int type, long par1, long par2);
static void sppp_cisco_input(struct sppp *sp, struct mbuf *m);
@@ -786,7 +786,7 @@ sppp_ifstart(struct ifnet *ifp)
*/
static int
sppp_output(struct ifnet *ifp, struct mbuf *m,
- struct sockaddr *dst, struct rtentry *rt)
+ struct sockaddr *dst, struct route *ro)
{
struct sppp *sp = IFP2SP(ifp);
struct ppp_header *h;
diff --git a/sys/net/if_stf.c b/sys/net/if_stf.c
index e3db9ae..cc43e51 100644
--- a/sys/net/if_stf.c
+++ b/sys/net/if_stf.c
@@ -178,7 +178,7 @@ static int stfmodevent(module_t, int, void *);
static int stf_encapcheck(const struct mbuf *, int, int, void *);
static struct in6_ifaddr *stf_getsrcifa6(struct ifnet *);
static int stf_output(struct ifnet *, struct mbuf *, struct sockaddr *,
- struct rtentry *);
+ struct route *);
static int isrfc1918addr(struct in_addr *);
static int stf_checkaddr4(struct stf_softc *, struct in_addr *,
struct ifnet *);
@@ -403,11 +403,11 @@ stf_getsrcifa6(ifp)
}
static int
-stf_output(ifp, m, dst, rt)
+stf_output(ifp, m, dst, ro)
struct ifnet *ifp;
struct mbuf *m;
struct sockaddr *dst;
- struct rtentry *rt;
+ struct route *ro;
{
struct stf_softc *sc;
struct sockaddr_in6 *dst6;
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c
index eb65fba3..0a1d34e 100644
--- a/sys/net/if_tun.c
+++ b/sys/net/if_tun.c
@@ -129,7 +129,7 @@ static int tunifioctl(struct ifnet *, u_long, caddr_t);
static int tuninit(struct ifnet *);
static int tunmodevent(module_t, int, void *);
static int tunoutput(struct ifnet *, struct mbuf *, struct sockaddr *,
- struct rtentry *rt);
+ struct route *ro);
static void tunstart(struct ifnet *);
static int tun_clone_create(struct if_clone *, int, caddr_t);
@@ -591,7 +591,7 @@ tunoutput(
struct ifnet *ifp,
struct mbuf *m0,
struct sockaddr *dst,
- struct rtentry *rt)
+ struct route *ro)
{
struct tun_softc *tp = ifp->if_softc;
u_short cached_tun_flags;
diff --git a/sys/net/if_var.h b/sys/net/if_var.h
index 88ec559..50846f8 100644
--- a/sys/net/if_var.h
+++ b/sys/net/if_var.h
@@ -70,6 +70,7 @@ struct socket;
struct ether_header;
struct carp_if;
struct ifvlantrunk;
+struct route;
#endif
#include <sys/queue.h> /* get TAILQ macros */
@@ -149,7 +150,7 @@ struct ifnet {
/* procedure handles */
int (*if_output) /* output routine (enqueue) */
(struct ifnet *, struct mbuf *, struct sockaddr *,
- struct rtentry *);
+ struct route *);
void (*if_input) /* input routine (from h/w driver) */
(struct ifnet *, struct mbuf *);
void (*if_start) /* initiate output routine */
diff --git a/sys/net/iso88025.h b/sys/net/iso88025.h
index cb10874..b42162b 100644
--- a/sys/net/iso88025.h
+++ b/sys/net/iso88025.h
@@ -166,7 +166,7 @@ void iso88025_ifattach (struct ifnet *, const u_int8_t *, int);
void iso88025_ifdetach (struct ifnet *, int);
int iso88025_ioctl (struct ifnet *, int , caddr_t );
int iso88025_output (struct ifnet *, struct mbuf *, struct sockaddr *,
- struct rtentry *);
+ struct route *);
void iso88025_input (struct ifnet *, struct mbuf *);
#endif
diff --git a/sys/net/route.h b/sys/net/route.h
index 0d35adc..731db4b 100644
--- a/sys/net/route.h
+++ b/sys/net/route.h
@@ -41,9 +41,10 @@
*/
/*
- * A route consists of a destination address and a reference
- * to a routing entry. These are often held by protocols
- * in their control blocks, e.g. inpcb.
+ * A route consists of a destination address, a reference
+ * to a routing entry, and a reference to an llentry.
+ * These are often held by protocols in their control
+ * blocks, e.g. inpcb.
*/
struct route {
struct rtentry *ro_rt;
OpenPOWER on IntegriCloud