summaryrefslogtreecommitdiffstats
path: root/src/vnet/interface.h
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2018-07-11 10:31:26 -0700
committerDamjan Marion <dmarion@me.com>2018-07-20 13:21:03 +0000
commit1855b8e48d95289cc9f0a6e339f2148d64ac705c (patch)
tree71e888d9aabc16a388c07a5f3c3089ade0fdadab /src/vnet/interface.h
parent631de0dffebf2633e32b55c5c9b4663867a50371 (diff)
IP directed broadcast
with ip direct broadcast enable a packet to the interface's subnet broadcast address with be sent L2 broadcast on the interface. dissabled, it will be dropped. it is disabled by default, which preserves current behaviour Change-Id: If154cb92e64834e97a541b32624354348a0eafb3 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/interface.h')
-rw-r--r--src/vnet/interface.h36
1 files changed, 22 insertions, 14 deletions
diff --git a/src/vnet/interface.h b/src/vnet/interface.h
index f82cf9d2485..d869b0c70a2 100644
--- a/src/vnet/interface.h
+++ b/src/vnet/interface.h
@@ -648,32 +648,40 @@ typedef enum
extern vnet_mtu_t vnet_link_to_mtu (vnet_link_t link);
-/* Software-interface. This corresponds to a Ethernet VLAN, ATM vc, a
- tunnel, etc. Configuration (e.g. IP address) gets attached to
- software interface. */
-typedef struct
+typedef enum vnet_sw_interface_flags_t_
{
- vnet_sw_interface_type_t type:16;
-
- u16 flags;
/* Interface is "up" meaning adminstratively up.
Up in the sense of link state being up is maintained by hardware interface. */
-#define VNET_SW_INTERFACE_FLAG_ADMIN_UP (1 << 0)
+ VNET_SW_INTERFACE_FLAG_ADMIN_UP = (1 << 0),
/* Interface is disabled for forwarding: punt all traffic to slow-path. */
-#define VNET_SW_INTERFACE_FLAG_PUNT (1 << 1)
+ VNET_SW_INTERFACE_FLAG_PUNT = (1 << 1),
-#define VNET_SW_INTERFACE_FLAG_PROXY_ARP (1 << 2)
+ VNET_SW_INTERFACE_FLAG_PROXY_ARP = (1 << 2),
-#define VNET_SW_INTERFACE_FLAG_UNNUMBERED (1 << 3)
+ VNET_SW_INTERFACE_FLAG_UNNUMBERED = (1 << 3),
-#define VNET_SW_INTERFACE_FLAG_BOND_SLAVE (1 << 4)
+ VNET_SW_INTERFACE_FLAG_BOND_SLAVE = (1 << 4),
/* Interface does not appear in CLI/API */
-#define VNET_SW_INTERFACE_FLAG_HIDDEN (1 << 5)
+ VNET_SW_INTERFACE_FLAG_HIDDEN = (1 << 5),
/* Interface in ERROR state */
-#define VNET_SW_INTERFACE_FLAG_ERROR (1 << 6)
+ VNET_SW_INTERFACE_FLAG_ERROR = (1 << 6),
+
+ /* Interface has IP configured directed broadcast */
+ VNET_SW_INTERFACE_FLAG_DIRECTED_BCAST = (1 << 7),
+
+} __attribute__ ((packed)) vnet_sw_interface_flags_t;
+
+/* Software-interface. This corresponds to a Ethernet VLAN, ATM vc, a
+ tunnel, etc. Configuration (e.g. IP address) gets attached to
+ software interface. */
+typedef struct
+{
+ vnet_sw_interface_type_t type:16;
+
+ vnet_sw_interface_flags_t flags;
/* Index for this interface. */
u32 sw_if_index;