aboutsummaryrefslogtreecommitdiff
path: root/lib/mac-learning.h
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2011-03-18 15:03:24 -0700
committerBen Pfaff <blp@nicira.com>2011-03-22 09:52:39 -0700
commit1bfe968160d7cc030e44481ba3a2ac68824c2869 (patch)
tree68ac6ba75f4873d3e2ae7ee5c04c254a8facbab7 /lib/mac-learning.h
parentdb8077c315f12fd523ace965cc22778ed8d5939a (diff)
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.
Diffstat (limited to 'lib/mac-learning.h')
-rw-r--r--lib/mac-learning.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/mac-learning.h b/lib/mac-learning.h
index c5c94bb3..2bff4656 100644
--- a/lib/mac-learning.h
+++ b/lib/mac-learning.h
@@ -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 *);