userspace: Define and use struct eth_addr.
[cascardo/ovs.git] / include / openflow / openflow-1.1.h
index b5a7310..5b4ba2b 100644 (file)
@@ -110,7 +110,7 @@ enum ofp11_port_features {
 struct ofp11_port {
     ovs_be32 port_no;
     uint8_t pad[4];
-    uint8_t hw_addr[OFP_ETH_ALEN];
+    struct eth_addr hw_addr;
     uint8_t pad2[2];                  /* Align to 64 bits. */
     char name[OFP_MAX_PORT_NAME_LEN]; /* Null-terminated */
 
@@ -133,11 +133,10 @@ OFP_ASSERT(sizeof(struct ofp11_port) == 64);
 struct ofp11_port_mod {
     ovs_be32 port_no;
     uint8_t pad[4];
-    uint8_t hw_addr[OFP_ETH_ALEN]; /* The hardware address is not
-                                      configurable.  This is used to
-                                      sanity-check the request, so it must
-                                      be the same as returned in an
-                                      ofp11_port struct. */
+    struct eth_addr hw_addr; /* The hardware address is not configurable.  This
+                                is used to sanity-check the request, so it must
+                                be the same as returned in an ofp11_port
+                                struct. */
     uint8_t pad2[2];        /* Pad to 64 bits. */
     ovs_be32 config;        /* Bitmap of OFPPC_* flags. */
     ovs_be32 mask;          /* Bitmap of OFPPC_* flags to be changed. */
@@ -194,10 +193,10 @@ struct ofp11_match {
     struct ofp11_match_header omh;
     ovs_be32 in_port;          /* Input switch port. */
     ovs_be32 wildcards;        /* Wildcard fields. */
-    uint8_t dl_src[OFP_ETH_ALEN]; /* Ethernet source address. */
-    uint8_t dl_src_mask[OFP_ETH_ALEN]; /* Ethernet source address mask.  */
-    uint8_t dl_dst[OFP_ETH_ALEN]; /* Ethernet destination address. */
-    uint8_t dl_dst_mask[OFP_ETH_ALEN]; /* Ethernet destination address mask. */
+    struct eth_addr dl_src;    /* Ethernet source address. */
+    struct eth_addr dl_src_mask; /* Ethernet source address mask.  */
+    struct eth_addr dl_dst;    /* Ethernet destination address. */
+    struct eth_addr dl_dst_mask; /* Ethernet destination address mask. */
     ovs_be16 dl_vlan;          /* Input VLAN id. */
     uint8_t dl_vlan_pcp;       /* Input VLAN priority. */
     uint8_t pad1[1];           /* Align to 32-bits */