if_lagg.h (169228) | if_lagg.h (169327) |
---|---|
1/* $OpenBSD: if_trunk.h,v 1.11 2007/01/31 06:20:19 reyk Exp $ */ 2 3/* 4 * Copyright (c) 2005, 2006 Reyk Floeter <reyk@openbsd.org> 5 * 6 * Permission to use, copy, modify, and distribute this software for any 7 * purpose with or without fee is hereby granted, provided that the above 8 * copyright notice and this permission notice appear in all copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 * | 1/* $OpenBSD: if_trunk.h,v 1.11 2007/01/31 06:20:19 reyk Exp $ */ 2 3/* 4 * Copyright (c) 2005, 2006 Reyk Floeter <reyk@openbsd.org> 5 * 6 * Permission to use, copy, modify, and distribute this software for any 7 * purpose with or without fee is hereby granted, provided that the above 8 * copyright notice and this permission notice appear in all copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 * |
18 * $FreeBSD: head/sys/net/if_lagg.h 169228 2007-05-03 09:07:36Z thompsa $ | 18 * $FreeBSD: head/sys/net/if_lagg.h 169327 2007-05-07 00:18:56Z thompsa $ |
19 */ 20 21#ifndef _NET_LAGG_H 22#define _NET_LAGG_H 23 24/* 25 * Global definitions 26 */ --- 104 unchanged lines hidden (view full) --- 131/* Private data used by the loadbalancing protocol */ 132#define LAGG_LB_MAXKEYS 8 133struct lagg_lb { 134 u_int32_t lb_key; 135 struct lagg_port *lb_ports[LAGG_MAX_PORTS]; 136}; 137 138struct lagg_mc { | 19 */ 20 21#ifndef _NET_LAGG_H 22#define _NET_LAGG_H 23 24/* 25 * Global definitions 26 */ --- 104 unchanged lines hidden (view full) --- 131/* Private data used by the loadbalancing protocol */ 132#define LAGG_LB_MAXKEYS 8 133struct lagg_lb { 134 u_int32_t lb_key; 135 struct lagg_port *lb_ports[LAGG_MAX_PORTS]; 136}; 137 138struct lagg_mc { |
139 union { 140 struct ether_multi *mcu_enm; 141 } mc_u; 142 struct sockaddr_storage mc_addr; 143 144 SLIST_ENTRY(lagg_mc) mc_entries; | 139 struct ifmultiaddr *mc_ifma; 140 SLIST_ENTRY(lagg_mc) mc_entries; |
145}; 146 147struct lagg_softc { 148 struct ifnet *sc_ifp; /* virtual interface */ 149 struct mtx sc_mtx; 150 int sc_proto; /* lagg protocol */ 151 u_int sc_count; /* number of ports */ 152 struct lagg_port *sc_primary; /* primary port */ 153 struct ifmedia sc_media; /* media config */ 154 caddr_t sc_psc; /* protocol data */ 155 156 SLIST_HEAD(__tplhd, lagg_port) sc_ports; /* list of interfaces */ 157 SLIST_ENTRY(lagg_softc) sc_entries; 158 | 141}; 142 143struct lagg_softc { 144 struct ifnet *sc_ifp; /* virtual interface */ 145 struct mtx sc_mtx; 146 int sc_proto; /* lagg protocol */ 147 u_int sc_count; /* number of ports */ 148 struct lagg_port *sc_primary; /* primary port */ 149 struct ifmedia sc_media; /* media config */ 150 caddr_t sc_psc; /* protocol data */ 151 152 SLIST_HEAD(__tplhd, lagg_port) sc_ports; /* list of interfaces */ 153 SLIST_ENTRY(lagg_softc) sc_entries; 154 |
159 SLIST_HEAD(__mclhd, lagg_mc) sc_mc_head; /* multicast addresses */ 160 | |
161 /* lagg protocol callbacks */ 162 int (*sc_detach)(struct lagg_softc *); 163 int (*sc_start)(struct lagg_softc *, struct mbuf *); 164 struct mbuf *(*sc_input)(struct lagg_softc *, struct lagg_port *, 165 struct mbuf *); 166 int (*sc_port_create)(struct lagg_port *); 167 void (*sc_port_destroy)(struct lagg_port *); 168 void (*sc_linkstate)(struct lagg_port *); --- 9 unchanged lines hidden (view full) --- 178 179 u_char lp_iftype; /* interface type */ 180 uint32_t lp_prio; /* port priority */ 181 uint32_t lp_flags; /* port flags */ 182 int lp_ifflags; /* saved ifp flags */ 183 void *lh_cookie; /* if state hook */ 184 caddr_t lp_psc; /* protocol data */ 185 | 155 /* lagg protocol callbacks */ 156 int (*sc_detach)(struct lagg_softc *); 157 int (*sc_start)(struct lagg_softc *, struct mbuf *); 158 struct mbuf *(*sc_input)(struct lagg_softc *, struct lagg_port *, 159 struct mbuf *); 160 int (*sc_port_create)(struct lagg_port *); 161 void (*sc_port_destroy)(struct lagg_port *); 162 void (*sc_linkstate)(struct lagg_port *); --- 9 unchanged lines hidden (view full) --- 172 173 u_char lp_iftype; /* interface type */ 174 uint32_t lp_prio; /* port priority */ 175 uint32_t lp_flags; /* port flags */ 176 int lp_ifflags; /* saved ifp flags */ 177 void *lh_cookie; /* if state hook */ 178 caddr_t lp_psc; /* protocol data */ 179 |
180 SLIST_HEAD(__mclhd, lagg_mc) lp_mc_head; /* multicast addresses */ 181 |
|
186 /* Redirected callbacks */ 187 int (*lp_ioctl)(struct ifnet *, u_long, caddr_t); 188 int (*lp_output)(struct ifnet *, struct mbuf *, struct sockaddr *, 189 struct rtentry *); 190 191 SLIST_ENTRY(lagg_port) lp_entries; 192}; 193 --- 17 unchanged lines hidden --- | 182 /* Redirected callbacks */ 183 int (*lp_ioctl)(struct ifnet *, u_long, caddr_t); 184 int (*lp_output)(struct ifnet *, struct mbuf *, struct sockaddr *, 185 struct rtentry *); 186 187 SLIST_ENTRY(lagg_port) lp_entries; 188}; 189 --- 17 unchanged lines hidden --- |