X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fmac-learning.h;h=16c92dbe5b11ae010aebccf03e2ac880d99c66db;hb=810605a233ba260bfe77e940de2281211eafd91e;hp=c5c94bb3d39aaea29de34a990c8e098e5c4f0c4a;hpb=db8077c315f12fd523ace965cc22778ed8d5939a;p=openvswitch diff --git a/lib/mac-learning.h b/lib/mac-learning.h index c5c94bb3..16c92dbe 100644 --- a/lib/mac-learning.h +++ b/lib/mac-learning.h @@ -44,8 +44,13 @@ 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 { + void *p; + int i; + } port; }; int mac_entry_age(const struct mac_entry *); @@ -108,6 +113,7 @@ struct mac_entry *mac_learning_lookup(const struct mac_learning *, uint16_t vlan, tag_type *); /* Flushing. */ +void mac_learning_expire(struct mac_learning *, struct mac_entry *); void mac_learning_flush(struct mac_learning *); #endif /* mac-learning.h */