2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

mac-learning: Change 'port' member to a union.

This allow the client a little more flexibility.  The next commit shows
how this can be useful.
This commit is contained in:
Ben Pfaff
2011-03-18 15:03:24 -07:00
parent db8077c315
commit 1bfe968160
4 changed files with 20 additions and 16 deletions

View File

@@ -44,8 +44,12 @@ struct mac_entry {
time_t grat_arp_lock; /* Gratuitous ARP lock expiration time. */
uint8_t mac[ETH_ADDR_LEN]; /* Known MAC address. */
uint16_t vlan; /* VLAN tag. */
int port; /* Port on which MAC was most recently seen. */
tag_type tag; /* Tag for this learning entry. */
/* Learned port. */
union {
int i;
} port;
};
int mac_entry_age(const struct mac_entry *);