diff options
author | Joe Perches <joe@perches.com> | 2013-08-01 19:17:47 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-08-02 15:33:54 -0400 |
commit | e216975ad97cfcfc436789aa66d59a0e93f337f7 (patch) | |
tree | 663a82d6e67757a80f51d4e9dda1c714bb92d6a6 | |
parent | bd3f5433255292d8d5080b532e729a577ec4912c (diff) |
uapi: Convert some uses of 6 to ETH_ALEN
Use the #define where appropriate.
Add #include <linux/if_ether.h>
where appropriate too.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/uapi/linux/dn.h | 3 | ||||
-rw-r--r-- | include/uapi/linux/if_bridge.h | 3 | ||||
-rw-r--r-- | include/uapi/linux/netfilter_bridge/ebt_802_3.h | 5 | ||||
-rw-r--r-- | include/uapi/linux/netfilter_ipv4/ipt_CLUSTERIP.h | 3 | ||||
-rw-r--r-- | include/uapi/linux/virtio_net.h | 2 | ||||
-rw-r--r-- | include/uapi/linux/wimax/i2400m.h | 4 |
6 files changed, 12 insertions, 8 deletions
diff --git a/include/uapi/linux/dn.h b/include/uapi/linux/dn.h index 9c50445462d9..5fbdd3d49eba 100644 --- a/include/uapi/linux/dn.h +++ b/include/uapi/linux/dn.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _LINUX_DN_H | 2 | #define _LINUX_DN_H |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/if_ether.h> | ||
5 | 6 | ||
6 | /* | 7 | /* |
7 | 8 | ||
@@ -120,7 +121,7 @@ struct linkinfo_dn { | |||
120 | * Ethernet address format (for DECnet) | 121 | * Ethernet address format (for DECnet) |
121 | */ | 122 | */ |
122 | union etheraddress { | 123 | union etheraddress { |
123 | __u8 dne_addr[6]; /* Full ethernet address */ | 124 | __u8 dne_addr[ETH_ALEN]; /* Full ethernet address */ |
124 | struct { | 125 | struct { |
125 | __u8 dne_hiord[4]; /* DECnet HIORD prefix */ | 126 | __u8 dne_hiord[4]; /* DECnet HIORD prefix */ |
126 | __u8 dne_nodeaddr[2]; /* DECnet node address */ | 127 | __u8 dne_nodeaddr[2]; /* DECnet node address */ |
diff --git a/include/uapi/linux/if_bridge.h b/include/uapi/linux/if_bridge.h index 2d70d79ce2fd..39f621a9fe82 100644 --- a/include/uapi/linux/if_bridge.h +++ b/include/uapi/linux/if_bridge.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #define _UAPI_LINUX_IF_BRIDGE_H | 14 | #define _UAPI_LINUX_IF_BRIDGE_H |
15 | 15 | ||
16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
17 | #include <linux/if_ether.h> | ||
17 | 18 | ||
18 | #define SYSFS_BRIDGE_ATTR "bridge" | 19 | #define SYSFS_BRIDGE_ATTR "bridge" |
19 | #define SYSFS_BRIDGE_FDB "brforward" | 20 | #define SYSFS_BRIDGE_FDB "brforward" |
@@ -88,7 +89,7 @@ struct __port_info { | |||
88 | }; | 89 | }; |
89 | 90 | ||
90 | struct __fdb_entry { | 91 | struct __fdb_entry { |
91 | __u8 mac_addr[6]; | 92 | __u8 mac_addr[ETH_ALEN]; |
92 | __u8 port_no; | 93 | __u8 port_no; |
93 | __u8 is_local; | 94 | __u8 is_local; |
94 | __u32 ageing_timer_value; | 95 | __u32 ageing_timer_value; |
diff --git a/include/uapi/linux/netfilter_bridge/ebt_802_3.h b/include/uapi/linux/netfilter_bridge/ebt_802_3.h index 5bf84912a082..f37522aade24 100644 --- a/include/uapi/linux/netfilter_bridge/ebt_802_3.h +++ b/include/uapi/linux/netfilter_bridge/ebt_802_3.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _UAPI__LINUX_BRIDGE_EBT_802_3_H | 2 | #define _UAPI__LINUX_BRIDGE_EBT_802_3_H |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/if_ether.h> | ||
5 | 6 | ||
6 | #define EBT_802_3_SAP 0x01 | 7 | #define EBT_802_3_SAP 0x01 |
7 | #define EBT_802_3_TYPE 0x02 | 8 | #define EBT_802_3_TYPE 0x02 |
@@ -42,8 +43,8 @@ struct hdr_ni { | |||
42 | }; | 43 | }; |
43 | 44 | ||
44 | struct ebt_802_3_hdr { | 45 | struct ebt_802_3_hdr { |
45 | __u8 daddr[6]; | 46 | __u8 daddr[ETH_ALEN]; |
46 | __u8 saddr[6]; | 47 | __u8 saddr[ETH_ALEN]; |
47 | __be16 len; | 48 | __be16 len; |
48 | union { | 49 | union { |
49 | struct hdr_ui ui; | 50 | struct hdr_ui ui; |
diff --git a/include/uapi/linux/netfilter_ipv4/ipt_CLUSTERIP.h b/include/uapi/linux/netfilter_ipv4/ipt_CLUSTERIP.h index c6a204c97047..eac0f6548f47 100644 --- a/include/uapi/linux/netfilter_ipv4/ipt_CLUSTERIP.h +++ b/include/uapi/linux/netfilter_ipv4/ipt_CLUSTERIP.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _IPT_CLUSTERIP_H_target | 2 | #define _IPT_CLUSTERIP_H_target |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/if_ether.h> | ||
5 | 6 | ||
6 | enum clusterip_hashmode { | 7 | enum clusterip_hashmode { |
7 | CLUSTERIP_HASHMODE_SIP = 0, | 8 | CLUSTERIP_HASHMODE_SIP = 0, |
@@ -22,7 +23,7 @@ struct ipt_clusterip_tgt_info { | |||
22 | __u32 flags; | 23 | __u32 flags; |
23 | 24 | ||
24 | /* only relevant for new ones */ | 25 | /* only relevant for new ones */ |
25 | __u8 clustermac[6]; | 26 | __u8 clustermac[ETH_ALEN]; |
26 | __u16 num_total_nodes; | 27 | __u16 num_total_nodes; |
27 | __u16 num_local_nodes; | 28 | __u16 num_local_nodes; |
28 | __u16 local_nodes[CLUSTERIP_MAX_NODES]; | 29 | __u16 local_nodes[CLUSTERIP_MAX_NODES]; |
diff --git a/include/uapi/linux/virtio_net.h b/include/uapi/linux/virtio_net.h index 227d4ce84e79..172a7f00780c 100644 --- a/include/uapi/linux/virtio_net.h +++ b/include/uapi/linux/virtio_net.h | |||
@@ -60,7 +60,7 @@ | |||
60 | 60 | ||
61 | struct virtio_net_config { | 61 | struct virtio_net_config { |
62 | /* The config defining mac address (if VIRTIO_NET_F_MAC) */ | 62 | /* The config defining mac address (if VIRTIO_NET_F_MAC) */ |
63 | __u8 mac[6]; | 63 | __u8 mac[ETH_ALEN]; |
64 | /* See VIRTIO_NET_F_STATUS and VIRTIO_NET_S_* above */ | 64 | /* See VIRTIO_NET_F_STATUS and VIRTIO_NET_S_* above */ |
65 | __u16 status; | 65 | __u16 status; |
66 | /* Maximum number of each of transmit and receive queues; | 66 | /* Maximum number of each of transmit and receive queues; |
diff --git a/include/uapi/linux/wimax/i2400m.h b/include/uapi/linux/wimax/i2400m.h index 62d356153565..fd198bc24a3c 100644 --- a/include/uapi/linux/wimax/i2400m.h +++ b/include/uapi/linux/wimax/i2400m.h | |||
@@ -122,7 +122,7 @@ | |||
122 | #define __LINUX__WIMAX__I2400M_H__ | 122 | #define __LINUX__WIMAX__I2400M_H__ |
123 | 123 | ||
124 | #include <linux/types.h> | 124 | #include <linux/types.h> |
125 | 125 | #include <linux/if_ether.h> | |
126 | 126 | ||
127 | /* | 127 | /* |
128 | * Host Device Interface (HDI) common to all busses | 128 | * Host Device Interface (HDI) common to all busses |
@@ -487,7 +487,7 @@ struct i2400m_tlv_l4_message_versions { | |||
487 | struct i2400m_tlv_detailed_device_info { | 487 | struct i2400m_tlv_detailed_device_info { |
488 | struct i2400m_tlv_hdr hdr; | 488 | struct i2400m_tlv_hdr hdr; |
489 | __u8 reserved1[400]; | 489 | __u8 reserved1[400]; |
490 | __u8 mac_address[6]; | 490 | __u8 mac_address[ETH_ALEN]; |
491 | __u8 reserved2[2]; | 491 | __u8 reserved2[2]; |
492 | } __attribute__((packed)); | 492 | } __attribute__((packed)); |
493 | 493 | ||