X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fmac-learning.h;h=c4a0e28b5b316a22f2a93294fefbdd0c8a5736de;hb=4c0f178060b740faac9a5aec915a24dc3b61770c;hp=e2ee74ba4c7afff681347fe2af7ba94f6f6888eb;hpb=30a2c8b16234daf7b089372cc136b872f2e543d7;p=openvswitch diff --git a/lib/mac-learning.h b/lib/mac-learning.h index e2ee74ba..c4a0e28b 100644 --- a/lib/mac-learning.h +++ b/lib/mac-learning.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009 Nicira Networks. + * Copyright (c) 2008, 2009, 2010 Nicira Networks. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -51,11 +51,14 @@ struct mac_learning { front, most recently used at the back. */ struct list table[MAC_HASH_SIZE]; /* Hash table. */ struct mac_entry entries[MAC_MAX]; /* All entries. */ - uint32_t secret; /* Secret for */ + uint32_t secret; /* Secret for randomizing hash table. */ + unsigned long *flood_vlans; /* Bitmap of learning disabled VLANs. */ }; struct mac_learning *mac_learning_create(void); void mac_learning_destroy(struct mac_learning *); +bool mac_learning_set_flood_vlans(struct mac_learning *, + unsigned long *bitmap); tag_type mac_learning_learn(struct mac_learning *, const uint8_t src[ETH_ADDR_LEN], uint16_t vlan, uint16_t src_port);