diff options
| author | Ben Pfaff <blp@nicira.com> | 2011-03-21 12:49:44 -0700 |
|---|---|---|
| committer | Ben Pfaff <blp@nicira.com> | 2011-04-01 15:52:20 -0700 |
| commit | 7a6735157c0df93375e9daadf0bbd1dca4160533 (patch) | |
| tree | 6f9477194e8852c6772aa07fad657aeb8e8cdaca /lib | |
| parent | 14cff48183cfd6ea939d4d8012fde192b03eeca1 (diff) | |
| download | openvswitch-7a6735157c0df93375e9daadf0bbd1dca4160533.tar.gz | |
bridge: Drop LACP configuration members from struct iface and struct port.
There's no reason that I can see to maintain this information in struct
port and struct iface. It's redundant, since the lacp implementation
maintains the same information.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/lacp.c | 8 | ||||
| -rw-r--r-- | lib/lacp.h | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/lib/lacp.c b/lib/lacp.c index 005165fdd..c8fae6219 100644 --- a/lib/lacp.c +++ b/lib/lacp.c @@ -142,6 +142,14 @@ lacp_configure(struct lacp *lacp, const char *name, lacp->fast = fast; } +/* Returns true if 'lacp' is configured in active mode, false if 'lacp' is + * configured for passive mode. */ +bool +lacp_is_active(const struct lacp *lacp) +{ + return lacp->active; +} + /* Processes 'pdu', a parsed LACP packet received on 'slave_'. This function * should be called on all packets received on 'slave_' with Ethernet Type * ETH_TYPE_LACP and parsable by parse_lacp_packet(). */ diff --git a/lib/lacp.h b/lib/lacp.h index 8d3bc7862..c5f3c2ffd 100644 --- a/lib/lacp.h +++ b/lib/lacp.h @@ -27,9 +27,12 @@ typedef void lacp_send_pdu(void *slave, const struct lacp_pdu *); void lacp_init(void); struct lacp *lacp_create(void); void lacp_destroy(struct lacp *); + void lacp_configure(struct lacp *, const char *name, const uint8_t sys_id[ETH_ADDR_LEN], uint16_t sys_priority, bool active, bool fast); +bool lacp_is_active(const struct lacp *); + void lacp_process_pdu(struct lacp *, const void *slave, const struct lacp_pdu *); bool lacp_negotiated(const struct lacp *); |
