diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2006-05-23 04:35:53 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2006-05-23 04:35:53 +0000 |
commit | d909ca841b6ac0984505c65ebf06af969fc8847a (patch) | |
tree | b5534641c334cff04d018832e6699a7d6b4947a1 /sys/net/if_trunk.h | |
parent | af6faf403f7970676508744d330450eb4cc12ddc (diff) |
add
Diffstat (limited to 'sys/net/if_trunk.h')
-rw-r--r-- | sys/net/if_trunk.h | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/sys/net/if_trunk.h b/sys/net/if_trunk.h index 72cb55013b4..6049b0db17c 100644 --- a/sys/net/if_trunk.h +++ b/sys/net/if_trunk.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_trunk.h,v 1.8 2006/05/20 22:03:24 reyk Exp $ */ +/* $OpenBSD: if_trunk.h,v 1.9 2006/05/23 04:35:52 reyk Exp $ */ /* * Copyright (c) 2005, 2006 Reyk Floeter <reyk@openbsd.org> @@ -40,7 +40,8 @@ enum trunk_proto { TRUNK_PROTO_NONE = 0, /* no trunk protocol defined */ TRUNK_PROTO_ROUNDROBIN = 1, /* simple round robin */ TRUNK_PROTO_FAILOVER = 2, /* active failover */ - TRUNK_PROTO_MAX = 3 + TRUNK_PROTO_LOADBALANCE = 3, /* loadbalance */ + TRUNK_PROTO_MAX = 4 }; struct trunk_protos { @@ -50,10 +51,11 @@ struct trunk_protos { #define TRUNK_PROTO_DEFAULT TRUNK_PROTO_ROUNDROBIN #define TRUNK_PROTOS { \ - { "roundrobin", TRUNK_PROTO_ROUNDROBIN }, \ - { "failover", TRUNK_PROTO_FAILOVER }, \ - { "none", TRUNK_PROTO_NONE }, \ - { "default", TRUNK_PROTO_DEFAULT } \ + { "roundrobin", TRUNK_PROTO_ROUNDROBIN }, \ + { "failover", TRUNK_PROTO_FAILOVER }, \ + { "loadbalance", TRUNK_PROTO_LOADBALANCE }, \ + { "none", TRUNK_PROTO_NONE }, \ + { "default", TRUNK_PROTO_DEFAULT } \ } /* @@ -160,6 +162,13 @@ struct trunk_softc { #define tr_ifname tr_ac.ac_if.if_xname /* name */ #define tr_capabilities tr_ac.ac_if.if_capabilities /* capabilities */ +/* Private data used by the loadbalancing protocol */ +#define TRUNK_LB_MAXKEYS 8 +struct trunk_lb { + u_int32_t lb_key; + struct trunk_port *lb_ports[TRUNK_MAX_PORTS]; +}; + void trunk_port_ifdetach(struct ifnet *); int trunk_input(struct ifnet *, struct ether_header *, struct mbuf *); #endif /* _KERNEL */ |