summaryrefslogtreecommitdiff
path: root/lib/netdev-provider.h
diff options
context:
space:
mode:
authorWang Sheng-Hui <shhuiw@gmail.com>2014-10-22 14:58:43 +0800
committerBen Pfaff <blp@nicira.com>2014-10-22 08:46:52 -0700
commit3bd0fd39ebeaca5f87284704e7606d225d0e1bbb (patch)
treedc783fa5bcb1aafc28d81f61ffef9c2b74907f8e /lib/netdev-provider.h
parentd1da76691a84a16f910501116adeb6e33c9fb09c (diff)
downloadopenvswitch-3bd0fd39ebeaca5f87284704e7606d225d0e1bbb.tar.gz
Use magic ETH_ADDR_LEN instead of 6 for Ethernet address length.
ETH_ADDR_LEN is defined in lib/packets.h, valued 6. Use this macro instead of magic number 6 to represent the length of eth mac address. Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'lib/netdev-provider.h')
-rw-r--r--lib/netdev-provider.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/netdev-provider.h b/lib/netdev-provider.h
index af9ea3c23..7862c2d5d 100644
--- a/lib/netdev-provider.h
+++ b/lib/netdev-provider.h
@@ -23,6 +23,7 @@
#include "netdev.h"
#include "list.h"
#include "ovs-numa.h"
+#include "packets.h"
#include "seq.h"
#include "shash.h"
#include "smap.h"
@@ -309,13 +310,15 @@ struct netdev_class {
void (*send_wait)(struct netdev *netdev, int qid);
/* Sets 'netdev''s Ethernet address to 'mac' */
- int (*set_etheraddr)(struct netdev *netdev, const uint8_t mac[6]);
+ int (*set_etheraddr)(struct netdev *netdev,
+ const uint8_t mac[ETH_ADDR_LEN]);
/* Retrieves 'netdev''s Ethernet address into 'mac'.
*
* This address will be advertised as 'netdev''s MAC address through the
* OpenFlow protocol, among other uses. */
- int (*get_etheraddr)(const struct netdev *netdev, uint8_t mac[6]);
+ int (*get_etheraddr)(const struct netdev *netdev,
+ uint8_t mac[ETH_ADDR_LEN]);
/* Retrieves 'netdev''s MTU into '*mtup'.
*
@@ -653,7 +656,7 @@ struct netdev_class {
* This function may be set to null if it would always return EOPNOTSUPP
* anyhow. */
int (*arp_lookup)(const struct netdev *netdev, ovs_be32 ip,
- uint8_t mac[6]);
+ uint8_t mac[ETH_ADDR_LEN]);
/* Retrieves the current set of flags on 'netdev' into '*old_flags'. Then,
* turns off the flags that are set to 1 in 'off' and turns on the flags