Index: sys/socket.h
===================================================================
RCS file: /home/ncvs/src/sys/sys/socket.h,v
retrieving revision 1.96
diff -u -r1.96 socket.h
--- sys/socket.h	12 Dec 2007 20:21:39 -0000	1.96
+++ sys/socket.h	12 Dec 2007 21:51:53 -0000
@@ -119,7 +119,7 @@
 #define	SO_BINTIME	0x2000		/* timestamp received dgram traffic */
 #endif
 #define	SO_NOOFFLOAD	0x4000		/* socket cannot be offloaded */
-#define	SO_NO_DDP       0x8000		/* disable direct data placement */
+#define	SO_NO_DDP	0x8000		/* disable direct data placement */
 
 /*
  * Additional options, not kept in so_options.
Index: netinet/tcp_ofld.c
===================================================================
RCS file: /home/ncvs/src/sys/netinet/tcp_ofld.c,v
retrieving revision 1.1
diff -u -r1.1 tcp_ofld.c
--- netinet/tcp_ofld.c	12 Dec 2007 20:21:39 -0000	1.1
+++ netinet/tcp_ofld.c	12 Dec 2007 21:51:54 -0000
@@ -1,31 +1,29 @@
-/**************************************************************************
-
-Copyright (c) 2007, Chelsio Inc.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
-    this list of conditions and the following disclaimer.
-
- 2. Neither the name of the Chelsio Corporation nor the names of its
-    contributors may be used to endorse or promote products derived from
-    this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
-
-***************************************************************************/
+/*-
+ * Copyright (c) 2007, Chelsio Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ * 2. Neither the name of the Chelsio Corporation nor the names of its
+ *    contributors may be used to endorse or promote products derived from
+ *    this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
 
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD: src/sys/netinet/tcp_ofld.c,v 1.1 2007/12/12 20:21:39 kmacy Exp $");
@@ -58,69 +56,73 @@
 	struct ifnet *ifp;
 	struct toedev *tdev;
 	struct rtentry *rt;
-	int err;
+	int error;
 
 	rt = rtalloc1(nam, 1, 0);
 	if (rt)
 		RT_UNLOCK(rt);
 	else
 		return (EHOSTUNREACH);
-	
+
 	ifp = rt->rt_ifp;
 	tdev = TOEDEV(ifp);
-	if (tdev == NULL) 
+	if (tdev == NULL)
 		return (EINVAL);
-	
+
 	if (tdev->can_offload(tdev, so) == 0)
 		return (EINVAL);
-	
-	if ((err = tdev->connect(tdev, so, ifp)))
-		return (err);
-		
+
+	if ((error = tdev->connect(tdev, so, ifp)))
+		return (error);
+
 	return (0);
 }
 
 int
 ofld_send(struct tcpcb *tp)
 {
-	return tp->t_tu->tu_send(tp);
+
+	return (tp->t_tu->tu_send(tp));
 }
 
 int
 ofld_rcvd(struct tcpcb *tp)
 {
 
-	return tp->t_tu->tu_rcvd(tp);
+	return (tp->t_tu->tu_rcvd(tp));
 }
 
 int
 ofld_disconnect(struct tcpcb *tp)
 {
-       	return tp->t_tu->tu_disconnect(tp);
+
+	return (tp->t_tu->tu_disconnect(tp));
 }
 
 int
 ofld_abort(struct tcpcb *tp)
 {
-	return tp->t_tu->tu_abort(tp);
+
+	return (tp->t_tu->tu_abort(tp)(;
 }
 
 void
 ofld_detach(struct tcpcb *tp)
-{	
+{
+
 	tp->t_tu->tu_detach(tp);
 }
 
 void
 ofld_listen_open(struct tcpcb *tp)
 {
+
 	EVENTHANDLER_INVOKE(ofld_listen, OFLD_LISTEN_OPEN, tp);
 }
 
 void
 ofld_listen_close(struct tcpcb *tp)
 {
+
 	EVENTHANDLER_INVOKE(ofld_listen, OFLD_LISTEN_CLOSE, tp);
 }
-
-
Index: netinet/tcp_ofld.h
===================================================================
RCS file: /home/ncvs/src/sys/netinet/tcp_ofld.h,v
retrieving revision 1.1
diff -u -r1.1 tcp_ofld.h
--- netinet/tcp_ofld.h	12 Dec 2007 20:21:39 -0000	1.1
+++ netinet/tcp_ofld.h	12 Dec 2007 21:51:54 -0000
@@ -1,64 +1,65 @@
-/**************************************************************************
-
-Copyright (c) 2007, Chelsio Inc.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
-    this list of conditions and the following disclaimer.
-
- 2. Neither the name of the Chelsio Corporation nor the names of its
-    contributors may be used to endorse or promote products derived from
-    this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
-
-$FreeBSD: src/sys/netinet/tcp_ofld.h,v 1.1 2007/12/12 20:21:39 kmacy Exp $
-
-***************************************************************************/
+/*-
+ * Copyright (c) 2007, Chelsio Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ * 2. Neither the name of the Chelsio Corporation nor the names of its
+ *    contributors may be used to endorse or promote products derived from
+ *    this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $FreeBSD: src/sys/netinet/tcp_ofld.h,v 1.1 2007/12/12 20:21:39 kmacy Exp $
+ */
 
 #ifndef _NETINET_TCP_OFLD_H_
-#define _NETINET_TCP_OFLD_H_
+#define	_NETINET_TCP_OFLD_H_
+
+#ifndef _KERNEL
+#error "no user-serviceable parts inside"
+#endif
 
 #define	SC_ENTRY_PRESENT	1
 #define	SC_DROP			2
 
-#define tp_offload(tp) ((tp)->t_flags & TF_TOE)
-#define SO_OFFLOADABLE(so) ((so->so_options & SO_NOOFFLOAD) == 0)
+#define	tp_offload(tp)		((tp)->t_flags & TF_TOE)
+#define	SO_OFFLOADABLE(so)	((so->so_options & SO_NOOFFLOAD) == 0)
 
-int ofld_connect(struct socket *so, struct sockaddr *nam);
-int ofld_can_offload(struct tcpcb *tp, struct sockaddr *nam);
+int	ofld_connect(struct socket *so, struct sockaddr *nam);
+int	ofld_can_offload(struct tcpcb *tp, struct sockaddr *nam);
 
-int ofld_send(struct tcpcb *tp);
-int ofld_rcvd(struct tcpcb *tp);
-int ofld_disconnect(struct tcpcb *tp);
-int ofld_abort(struct tcpcb *tp);
-void ofld_detach(struct tcpcb *tp);
-void ofld_listen_open(struct tcpcb *tp);
-void ofld_listen_close(struct tcpcb *tp);
+int	ofld_send(struct tcpcb *tp);
+int	ofld_rcvd(struct tcpcb *tp);
+int	ofld_disconnect(struct tcpcb *tp);
+int	ofld_abort(struct tcpcb *tp);
+void	ofld_detach(struct tcpcb *tp);
+void	ofld_listen_open(struct tcpcb *tp);
+void	ofld_listen_close(struct tcpcb *tp);
 
 #ifndef DISABLE_TCP_OFFLOAD
 static __inline int
 tcp_gen_connect(struct socket *so, struct sockaddr *nam)
 {
-	int error;
 	struct tcpcb *tp = sototcpcb(so);
-	
+	int error;
+
 	if (!SO_OFFLOADABLE(so) || (error = ofld_connect(so, nam)) != 0)
 		error = tcp_output(tp);
-	
 	return (error);
 }
 
@@ -71,7 +72,6 @@
 		error = ofld_disconnect(tp);
 	else
 		error = tcp_output(tp);
-
 	return (error);
 }
 
@@ -84,7 +84,6 @@
 		error = ofld_abort(tp);
 	else
 		error = tcp_output(tp);
-
 	return (error);
 }
 
@@ -97,7 +96,6 @@
 		error = ofld_send(tp);
 	else
 		error = tcp_output(tp);
-
 	return (error);
 }
 
@@ -110,13 +108,13 @@
 		error = ofld_rcvd(tp);
 	else
 		error = tcp_output(tp);
-
 	return (error);
 }
 
 static __inline void
 tcp_gen_listen_open(struct tcpcb *tp)
 {
+
 	if (SO_OFFLOADABLE(tp->t_inpcb->inp_socket))
 	    ofld_listen_open(tp);
 }
@@ -124,75 +122,85 @@
 static __inline void
 tcp_gen_listen_close(struct tcpcb *tp)
 {
+
 	ofld_listen_close(tp);
 }
 
 static __inline void
 tcp_gen_detach(struct tcpcb *tp)
 {
+
 	if (tp_offload(tp))
 		ofld_detach(tp);
 }
 
-#else
+#else /* DISABLE_TCP_OFFLOAD */
 
 static __inline int
 tcp_gen_connect(struct socket *so, struct sockaddr *nam)
 {
-	return tcp_output(tp);
+
+	return (tcp_output(tp));
 }
 
 static __inline int
 tcp_gen_disconnect(struct tcpcb *tp)
 {
-	return tcp_output(tp);
+
+	return (tcp_output(tp));
 }
 
 static __inline int
 tcp_gen_abort(struct tcpcb *tp)
 {
-	return tcp_output(tp);
+
+	return (tcp_output(tp));
 }
 
 static __inline int
 tcp_gen_send(struct tcpcb *tp)
 {
-	return tcp_output(tp);
+
+	return (tcp_output(tp));
 }
 
 static __inline int
 tcp_gen_rcvd(struct tcpcb *tp)
 {
-	return tcp_output(tp);
+
+	return (tcp_output(tp));
 }
 
 static __inline void
-tcp_gen_listen_open(struct tcpcb *tp) {}
+tcp_gen_listen_open(struct tcpcb *tp)
+{
 
-static __inline void
-tcp_gen_listen_close(struct tcpcb *tp) {}
+}
 
 static __inline void
-tcp_gen_detach(struct tcpcb *tp) {}
-
-	
+tcp_gen_listen_close(struct tcpcb *tp)
+{
+}
 
+static __inline void
+tcp_gen_detach(struct tcpcb *tp)
+{
+}
 
-#endif
+#endif /* DISABLE_TCP_OFFLOAD */
 
 struct toe_usrreqs {
-	int (*tu_send)(struct tcpcb *tp);
-	int (*tu_rcvd)(struct tcpcb *tp);
-	int (*tu_disconnect)(struct tcpcb *tp);
-	int (*tu_abort)(struct tcpcb *tp);
-	void (*tu_detach)(struct tcpcb *tp);
-	void (*tu_syncache_event)(int event, void *toep);
-
+	int	(*tu_send)(struct tcpcb *tp);
+	int	(*tu_rcvd)(struct tcpcb *tp);
+	int	(*tu_disconnect)(struct tcpcb *tp);
+	int	(*tu_abort)(struct tcpcb *tp);
+	void	(*tu_detach)(struct tcpcb *tp);
+	void	(*tu_syncache_event)(int event, void *toep);
 };
 
-#define OFLD_LISTEN_OPEN       1
-#define OFLD_LISTEN_CLOSE      2
-typedef void (*ofld_listen_fn)(void *, int, struct tcpcb *);
+#define	OFLD_LISTEN_OPEN       1
+#define	OFLD_LISTEN_CLOSE      2
+typedef void	(*ofld_listen_fn)(void *, int, struct tcpcb *);
 EVENTHANDLER_DECLARE(ofld_listen, ofld_listen_fn);
 
-#endif
+#endif /* !_NETINET_TCP_OFLD_H_ */
Index: netinet/tcp_var.h
===================================================================
RCS file: /home/ncvs/src/sys/netinet/tcp_var.h,v
retrieving revision 1.159
diff -u -r1.159 tcp_var.h
--- netinet/tcp_var.h	12 Dec 2007 20:21:39 -0000	1.159
+++ netinet/tcp_var.h	12 Dec 2007 21:51:54 -0000
@@ -209,7 +209,7 @@
 	int	rfbuf_cnt;		/* recv buffer autoscaling byte count */
 	void	*t_pspare[3];		/* toe usrreqs / toepcb * / congestion algo / vimage / 1 general use */
 	struct toe_usrreqs *t_tu;       /* offload operations vector */
-	void *t_toe;			/* TOE pcb pointer	     */
+	void	*t_toe;			/* TOE pcb pointer */
 };
 
 #define IN_FASTRECOVERY(tp)	(tp->t_flags & TF_FASTRECOVERY)
Index: netinet/toedev.h
===================================================================
RCS file: /home/ncvs/src/sys/netinet/toedev.h,v
retrieving revision 1.1
diff -u -r1.1 toedev.h
--- netinet/toedev.h	12 Dec 2007 20:21:39 -0000	1.1
+++ netinet/toedev.h	12 Dec 2007 21:51:54 -0000
@@ -1,46 +1,46 @@
+/*-
+ * Copyright (c) 2007, Chelsio Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ * 2. Neither the name of the Chelsio Corporation nor the names of its
+ *    contributors may be used to endorse or promote products derived from
+ *    this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $FreeBSD: src/sys/netinet/toedev.h,v 1.1 2007/12/12 20:21:39 kmacy Exp $
+ */
+
+#ifndef _NETINET_TOEDEV_H_
+#define	_NETINET_TOEDEV_H_
+
+#ifndef _KERNEL
+#error "no user-serviceable parts inside"
+#endif
 
-/**************************************************************************
-
-Copyright (c) 2007, Chelsio Inc.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
-    this list of conditions and the following disclaimer.
-
- 2. Neither the name of the Chelsio Corporation nor the names of its
-    contributors may be used to endorse or promote products derived from
-    this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
-
-$FreeBSD: src/sys/netinet/toedev.h,v 1.1 2007/12/12 20:21:39 kmacy Exp $
-
-***************************************************************************/
-
-#ifndef _OFFLOAD_DEV_H_
-#define _OFFLOAD_DEV_H_
-
-
-/* Parameter values for offload_get_phys_egress() */
+/* Parameter values for offload_get_phys_egress(). */
 enum {
 	TOE_OPEN,
 	TOE_FAILOVER,
 };
 
-/* Parameter values for toe_failover() */
+/* Parameter values for toe_failover(). */
 enum {
 	TOE_ACTIVE_SLAVE,
 	TOE_LINK_DOWN,
@@ -49,14 +49,14 @@
 	TOE_RELEASE_ALL,
 };
 
-#define TOENAMSIZ 16
+#define	TOENAMSIZ	16
 
-/* Get the toedev associated with a ifnet */
-#define TOEDEV(ifp) ((ifp)->if_llsoftc)
+/* Get the toedev associated with a ifnet. */
+#define	TOEDEV(ifp)	((ifp)->if_llsoftc)
 
 struct offload_id {
-	unsigned int id;
-	unsigned long data;
+	unsigned int	id;
+	unsigned long	data;
 };
 
 struct ifnet;
@@ -65,68 +65,74 @@
 struct sysctl_oid;
 struct socket;
 struct mbuf;
-
 struct toedev {
-	TAILQ_ENTRY(toedev) entry;  
-	char name[TOENAMSIZ];       /* TOE device name */
-	unsigned int ttid;          /* TOE type id */
-	unsigned long flags;        /* device flags */
-	unsigned int mtu;           /* max size of TX offloaded data */
-	unsigned int nconn;         /* max # of offloaded connections */
-	struct ifnet *lldev;   /* LL device associated with TOE messages */
+	TAILQ_ENTRY(toedev)	entry;  
+	char		 name[TOENAMSIZ];       /* TOE device name */
+	unsigned int	 ttid;          /* TOE type id */
+	unsigned long	 flags;        /* device flags */
+	unsigned int	 mtu;           /* max size of TX offloaded data */
+	unsigned int	 nconn;         /* max # of offloaded connections */
+	struct ifnet	*lldev;   /* LL device associated with TOE messages */
 	const struct tom_info *offload_mod; /* attached TCP offload module */
-	struct sysctl_oid *sysctl_root;    /* root of proc dir for this TOE */
-	int (*open)(struct toedev *dev);
-	int (*close)(struct toedev *dev);
-	int (*can_offload)(struct toedev *dev, struct socket *so);
-	int (*connect)(struct toedev *dev, struct socket *so,
-		       struct ifnet *egress_ifp);
-	int (*send)(struct toedev *dev, struct mbuf *m);
-	int (*recv)(struct toedev *dev, struct mbuf **m, int n);
-	int (*ctl)(struct toedev *dev, unsigned int req, void *data);
-	void (*arp_update)(struct toedev *dev, struct rtentry *neigh);
-	void (*failover)(struct toedev *dev, struct ifnet *bond_ifp,
-			 struct ifnet *ndev, int event);
-	void *priv;                 /* driver private data */
-	void *l2opt;                /* optional layer 2 data */
-	void *l3opt;                /* optional layer 3 data */
-	void *l4opt;                /* optional layer 4 data */
-	void *ulp;                  /* ulp stuff */
+	struct sysctl_oid *sysctl_root; /* root of proc dir for this TOE */
+	int	(*open)(struct toedev *dev);
+	int	(*close)(struct toedev *dev);
+	int	(*can_offload)(struct toedev *dev, struct socket *so);
+	int	(*connect)(struct toedev *dev, struct socket *so,
+		    struct ifnet *egress_ifp);
+	int	(*send)(struct toedev *dev, struct mbuf *m);
+	int	(*recv)(struct toedev *dev, struct mbuf **m, int n);
+	int	(*ctl)(struct toedev *dev, unsigned int req, void *data);
+	void	(*arp_update)(struct toedev *dev, struct rtentry *neigh);
+	void	(*failover)(struct toedev *dev, struct ifnet *bond_ifp,
+		    struct ifnet *ndev, int event);
+	void	*priv;		/* driver private data */
+	void	*l2opt;		/* optional layer 2 data */
+	void	*l3opt;		/* optional layer 3 data */
+	void	*l4opt;		/* optional layer 4 data */
+	void	*ulp;		/* ulp stuff */
 };
 
 struct tom_info {
-	TAILQ_ENTRY(tom_info) entry;
-	int (*attach)(struct toedev *dev, const struct offload_id *entry);
-	int (*detach)(struct toedev *dev);
-	const char *name;
+	TAILQ_ENTRY(tom_info)	entry;
+	int		(*attach)(struct toedev *dev,
+			    const struct offload_id *entry);
+	int		(*detach)(struct toedev *dev);
+	const char	*name;
 	const struct offload_id *id_table;
 };
 
-static inline void init_offload_dev(struct toedev *dev)
+static __inline void
+init_offload_dev(struct toedev *dev)
 {
-
 }
 
-extern int register_tom(struct tom_info *t);
-extern int unregister_tom(struct tom_info *t);
-extern int register_toedev(struct toedev *dev, const char *name);
-extern int unregister_toedev(struct toedev *dev);
-extern int activate_offload(struct toedev *dev);
-extern int toe_send(struct toedev *dev, struct mbuf *m);
-extern void toe_arp_update(struct rtentry *rt);
-extern struct ifnet *offload_get_phys_egress(struct ifnet *dev,
-						  struct socket *so,
-						  int context);
-extern int toe_receive_mbuf(struct toedev *dev, struct mbuf **m, int n);
+int	 register_tom(struct tom_info *t);
+int	 unregister_tom(struct tom_info *t);
+int	 register_toedev(struct toedev *dev, const char *name);
+int	 unregister_toedev(struct toedev *dev);
+int	 activate_offload(struct toedev *dev);
+int	 toe_send(struct toedev *dev, struct mbuf *m);
+void	 toe_arp_update(struct rtentry *rt);
+struct ifnet *offload_get_phys_egress(struct ifnet *dev,
+	    struct socket *so, int context);
+int	 toe_receive_mbuf(struct toedev *dev, struct mbuf **m, int n);
 	
-static inline void toe_neigh_update(struct ifnet *neigh) {}
-static inline void toe_failover(struct ifnet *bond_ifp,
-				struct ifnet *fail_ifp, int event)
-{}
-static inline int toe_enslave(struct ifnet *bond_ifp,
-			      struct ifnet *slave_ifp)
+static __inline void
+toe_neigh_update(struct ifnet *neigh)
+{
+}
+
+static __inline void
+toe_failover(struct ifnet *bond_ifp, struct ifnet *fail_ifp, int event)
 {
-	return 0;
 }
 
-#endif /* _OFFLOAD_DEV_H_ */
+static __inline int
+toe_enslave(struct ifnet *bond_ifp, struct ifnet *slave_ifp)
+{
+
+	return (0);
+}
+
+#endif /* !_NETINET_TOEDEV_H_ */
