Use the #define where appropriate. Add #include <linux/if_ether.h> where appropriate too.
Showing the changes to include/uapi/linux (6 of 6 files). Show all
Unified · Split
| @@ -2,6 +2,7 @@ · 1 unmodified line | ||
| 2 | 2 | #define _LINUX_DN_H |
| 3 | 3 | |
| 4 | 4 | #include <linux/types.h> |
| 5 | +#include <linux/if_ether.h> | |
| 5 | 6 | |
| 6 | 7 | /* |
| 7 | 8 | |
| @@ -120,7 +121,7 @@ struct linkinfo_dn { · 112 unmodified lines | ||
| 120 | 121 | * Ethernet address format (for DECnet) |
| 121 | 122 | */ |
| 122 | 123 | union etheraddress { |
| 123 | − __u8 dne_addr[6]; /* Full ethernet address */ | |
| 124 | + __u8 dne_addr[ETH_ALEN]; /* Full ethernet address */ | |
| 124 | 125 | struct { |
| 125 | 126 | __u8 dne_hiord[4]; /* DECnet HIORD prefix */ |
| 126 | 127 | __u8 dne_nodeaddr[2]; /* DECnet node address */ |
| @@ -14,6 +14,7 @@ · 13 unmodified lines | ||
| 14 | 14 | #define _UAPI_LINUX_IF_BRIDGE_H |
| 15 | 15 | |
| 16 | 16 | #include <linux/types.h> |
| 17 | +#include <linux/if_ether.h> | |
| 17 | 18 | |
| 18 | 19 | #define SYSFS_BRIDGE_ATTR "bridge" |
| 19 | 20 | #define SYSFS_BRIDGE_FDB "brforward" |
| @@ -88,7 +89,7 @@ struct __port_info { · 68 unmodified lines | ||
| 88 | 89 | }; |
| 89 | 90 | |
| 90 | 91 | struct __fdb_entry { |
| 91 | − __u8 mac_addr[6]; | |
| 92 | + __u8 mac_addr[ETH_ALEN]; | |
| 92 | 93 | __u8 port_no; |
| 93 | 94 | __u8 is_local; |
| 94 | 95 | __u32 ageing_timer_value; |
| @@ -2,6 +2,7 @@ · 1 unmodified line | ||
| 2 | 2 | #define _UAPI__LINUX_BRIDGE_EBT_802_3_H |
| 3 | 3 | |
| 4 | 4 | #include <linux/types.h> |
| 5 | +#include <linux/if_ether.h> | |
| 5 | 6 | |
| 6 | 7 | #define EBT_802_3_SAP 0x01 |
| 7 | 8 | #define EBT_802_3_TYPE 0x02 |
| @@ -42,8 +43,8 @@ struct hdr_ni { · 34 unmodified lines | ||
| 42 | 43 | }; |
| 43 | 44 | |
| 44 | 45 | struct ebt_802_3_hdr { |
| 45 | − __u8 daddr[6]; | |
| 46 | − __u8 saddr[6]; | |
| 46 | + __u8 daddr[ETH_ALEN]; | |
| 47 | + __u8 saddr[ETH_ALEN]; | |
| 47 | 48 | __be16 len; |
| 48 | 49 | union { |
| 49 | 50 | struct hdr_ui ui; |
| @@ -2,6 +2,7 @@ · 1 unmodified line | ||
| 2 | 2 | #define _IPT_CLUSTERIP_H_target |
| 3 | 3 | |
| 4 | 4 | #include <linux/types.h> |
| 5 | +#include <linux/if_ether.h> | |
| 5 | 6 | |
| 6 | 7 | enum clusterip_hashmode { |
| 7 | 8 | CLUSTERIP_HASHMODE_SIP = 0, |
| @@ -22,7 +23,7 @@ struct ipt_clusterip_tgt_info { · 14 unmodified lines | ||
| 22 | 23 | __u32 flags; |
| 23 | 24 | |
| 24 | 25 | /* only relevant for new ones */ |
| 25 | − __u8 clustermac[6]; | |
| 26 | + __u8 clustermac[ETH_ALEN]; | |
| 26 | 27 | __u16 num_total_nodes; |
| 27 | 28 | __u16 num_local_nodes; |
| 28 | 29 | __u16 local_nodes[CLUSTERIP_MAX_NODES]; |
| @@ -60,7 +60,7 @@ · 59 unmodified lines | ||
| 60 | 60 | |
| 61 | 61 | struct virtio_net_config { |
| 62 | 62 | /* The config defining mac address (if VIRTIO_NET_F_MAC) */ |
| 63 | − __u8 mac[6]; | |
| 63 | + __u8 mac[ETH_ALEN]; | |
| 64 | 64 | /* See VIRTIO_NET_F_STATUS and VIRTIO_NET_S_* above */ |
| 65 | 65 | __u16 status; |
| 66 | 66 | /* Maximum number of each of transmit and receive queues; |
| @@ -122,7 +122,7 @@ · 121 unmodified lines | ||
| 122 | 122 | #define __LINUX__WIMAX__I2400M_H__ |
| 123 | 123 | |
| 124 | 124 | #include <linux/types.h> |
| 125 | − | |
| 125 | +#include <linux/if_ether.h> | |
| 126 | 126 | |
| 127 | 127 | /* |
| 128 | 128 | * Host Device Interface (HDI) common to all busses |
| @@ -487,7 +487,7 @@ struct i2400m_tlv_l4_message_versions { · 358 unmodified lines | ||
| 487 | 487 | struct i2400m_tlv_detailed_device_info { |
| 488 | 488 | struct i2400m_tlv_hdr hdr; |
| 489 | 489 | __u8 reserved1[400]; |
| 490 | − __u8 mac_address[6]; | |
| 490 | + __u8 mac_address[ETH_ALEN]; | |
| 491 | 491 | __u8 reserved2[2]; |
| 492 | 492 | } __attribute__((packed)); |
| 493 | 493 | |