aboutsummaryrefslogtreecommitdiff
path: root/lib/mac-learning.h
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2009-07-15 11:02:24 -0700
committerBen Pfaff <blp@nicira.com>2009-07-16 09:17:06 -0700
commit321943f7904e1e28948e68cb1c78d89f169c07a2 (patch)
tree6b8a811edb9d936c63be278c92d0894012396cce /lib/mac-learning.h
parenteaa71334348aa0d99abf5588e17b3e55d0db28ce (diff)
mac-learning: New function mac_entry_age().
This function will be used as part of printing the MAC learning table at user request.
Diffstat (limited to 'lib/mac-learning.h')
-rw-r--r--lib/mac-learning.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/mac-learning.h b/lib/mac-learning.h
index aa164d3b..6a2d30b4 100644
--- a/lib/mac-learning.h
+++ b/lib/mac-learning.h
@@ -28,6 +28,9 @@
#define MAC_MAX 1024
+/* Time, in seconds, before expiring a mac_entry due to inactivity. */
+#define MAC_ENTRY_IDLE_TIME 60
+
/* A MAC learning table entry. */
struct mac_entry {
struct list hash_node; /* Element in a mac_learning 'table' list. */
@@ -39,6 +42,8 @@ struct mac_entry {
tag_type tag; /* Tag for this learning entry. */
};
+int mac_entry_age(const struct mac_entry *);
+
/* MAC learning table. */
struct mac_learning {
struct list free; /* Not-in-use entries. */