summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2004-04-04 06:14:55 +0000
committerluigi <luigi@FreeBSD.org>2004-04-04 06:14:55 +0000
commitc54de1f76f2070447f83f4b5cf8c2d046a55f032 (patch)
treea5764e034c3ff55685b24352cb3c929204ed1cfc /sys/net
parent3f81a8edc47c185cab08009278d5e7ecdceb12cd (diff)
downloadFreeBSD-src-c54de1f76f2070447f83f4b5cf8c2d046a55f032.zip
FreeBSD-src-c54de1f76f2070447f83f4b5cf8c2d046a55f032.tar.gz
+ arpresolve(): remove an unused argument
+ struct ifnet: remove unused fields, move ipv6-related field close to each other, add a pointer to l3<->l2 translation tables (arp,nd6, etc.) for future use. + struct route: remove an unused field, move close to each other some fields that might likely go away in the future
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_ethersubr.c2
-rw-r--r--sys/net/if_var.h24
-rw-r--r--sys/net/route.h7
3 files changed, 8 insertions, 25 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index 4f7ac0f..34d46bf 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -164,7 +164,7 @@ ether_output(struct ifnet *ifp, struct mbuf *m,
switch (dst->sa_family) {
#ifdef INET
case AF_INET:
- if (!arpresolve(ifp, rt, m, dst, edst, rt0))
+ if (!arpresolve(ifp, rt, m, dst, edst))
return (0); /* if not yet resolved */
type = htons(ETHERTYPE_IP);
break;
diff --git a/sys/net/if_var.h b/sys/net/if_var.h
index b3d672a..02dcbd8 100644
--- a/sys/net/if_var.h
+++ b/sys/net/if_var.h
@@ -158,30 +158,23 @@ struct ifnet {
(struct ifnet *, struct mbuf *);
void (*if_start) /* initiate output routine */
(struct ifnet *);
- int (*if_done) /* output complete routine */
- (struct ifnet *); /* (XXX not used; fake prototype) */
int (*if_ioctl) /* ioctl routine */
(struct ifnet *, u_long, caddr_t);
void (*if_watchdog) /* timer routine */
(struct ifnet *);
- int (*if_poll_recv) /* polled receive routine */
- (struct ifnet *, int *);
- int (*if_poll_xmit) /* polled transmit routine */
- (struct ifnet *, int *);
- void (*if_poll_intren) /* polled interrupt reenable routine */
- (struct ifnet *);
- void (*if_poll_slowinput) /* input routine for slow devices */
- (struct ifnet *, struct mbuf *);
void (*if_init) /* Init routine */
(void *);
int (*if_resolvemulti) /* validate/resolve multicast */
(struct ifnet *, struct sockaddr **, struct sockaddr *);
struct ifqueue if_snd; /* output queue */
- struct ifqueue *if_poll_slowq; /* input queue for slow devices */
- struct ifprefixhead if_prefixhead; /* list of prefixes per if */
const u_int8_t *if_broadcastaddr; /* linklevel broadcast bytestring */
+
+ struct lltable *lltables; /* list of L3-L2 resolution tables */
+
struct label *if_label; /* interface MAC label */
+ /* these are only used by IPv6 */
+ struct ifprefixhead if_prefixhead; /* list of prefixes per if */
void *if_afdata[AF_MAX];
int if_afdata_initialized;
struct mtx if_afdata_mtx;
@@ -478,13 +471,6 @@ int ifioctl(struct socket *, u_long, caddr_t, struct thread *);
int ifpromisc(struct ifnet *, int);
struct ifnet *ifunit(const char *);
-int if_poll_recv_slow(struct ifnet *ifp, int *quotap);
-void if_poll_xmit_slow(struct ifnet *ifp, int *quotap);
-void if_poll_throttle(void);
-void if_poll_unthrottle(void *);
-void if_poll_init(void);
-void if_poll(void);
-
struct ifaddr *ifa_ifwithaddr(struct sockaddr *);
struct ifaddr *ifa_ifwithdstaddr(struct sockaddr *);
struct ifaddr *ifa_ifwithnet(struct sockaddr *);
diff --git a/sys/net/route.h b/sys/net/route.h
index 34c33eb..1c67da8 100644
--- a/sys/net/route.h
+++ b/sys/net/route.h
@@ -107,17 +107,14 @@ struct rtentry {
#define rt_key(r) ((struct sockaddr *)((r)->rt_nodes->rn_key))
#define rt_mask(r) ((struct sockaddr *)((r)->rt_nodes->rn_mask))
struct sockaddr *rt_gateway; /* value */
- long rt_refcnt; /* # held references */
u_long rt_flags; /* up/down?, host/net */
struct ifnet *rt_ifp; /* the answer: interface to use */
struct ifaddr *rt_ifa; /* the answer: interface address to use */
+ struct rt_metrics_lite rt_rmx; /* metrics used by rx'ing protocols */
+ long rt_refcnt; /* # held references */
struct sockaddr *rt_genmask; /* for generation of cloned routes */
caddr_t rt_llinfo; /* pointer to link level info cache */
- struct rt_metrics_lite rt_rmx; /* metrics used by rx'ing protocols */
struct rtentry *rt_gwroute; /* implied entry for gatewayed routes */
- int (*rt_output)(struct ifnet *, struct mbuf *, struct sockaddr *,
- struct rtentry *);
- /* output routine for this (rt,if) */
struct rtentry *rt_parent; /* cloning parent of this route */
#ifdef _KERNEL
/* XXX ugly, user apps use this definition but don't have a mtx def */
OpenPOWER on IntegriCloud