History

uapi: Convert some uses of 6 to ETH_ALEN

Use the #define where appropriate. Add #include <linux/if_ether.h> where appropriate too.

Joe Perches committed 13 years ago

Commit e2169751 parent bd3f5436 files · +12 −8Browse files

Showing the changes to include/uapi/linux (6 of 6 files). Show all

Unified · Split

6 files
  1. include/uapi/linux/dn.h +2 −1
  2. include/uapi/linux/if_bridge.h +2 −1
  3. include/uapi/linux/netfilter_bridge/ebt_802_3.h +3 −2
  4. include/uapi/linux/netfilter_ipv4/ipt_CLUSTERIP.h +2 −1
  5. include/uapi/linux/virtio_net.h +1 −1
  6. include/uapi/linux/wimax/i2400m.h +2 −2
include/uapi/linux/dn.h+2−1
@@ -2,6 +2,7 @@ · 1 unmodified line
2#define _LINUX_DN_H2#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 { · 112 unmodified lines
120 * Ethernet address format (for DECnet)121 * Ethernet address format (for DECnet)
121 */122 */
122union etheraddress {123union 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 */
include/uapi/linux/if_bridge.h+2−1
@@ -14,6 +14,7 @@ · 13 unmodified lines
14#define _UAPI_LINUX_IF_BRIDGE_H14#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 { · 68 unmodified lines
88};89};
89 90
90struct __fdb_entry {91struct __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;
include/uapi/linux/netfilter_bridge/ebt_802_3.h+3−2
@@ -2,6 +2,7 @@ · 1 unmodified line
2#define _UAPI__LINUX_BRIDGE_EBT_802_3_H2#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 0x017#define EBT_802_3_SAP 0x01
7#define EBT_802_3_TYPE 0x028#define EBT_802_3_TYPE 0x02
@@ -42,8 +43,8 @@ struct hdr_ni { · 34 unmodified lines
42};43};
43 44
44struct ebt_802_3_hdr {45struct 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;
include/uapi/linux/netfilter_ipv4/ipt_CLUSTERIP.h+2−1
@@ -2,6 +2,7 @@ · 1 unmodified line
2#define _IPT_CLUSTERIP_H_target2#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
6enum clusterip_hashmode {7enum clusterip_hashmode {
7 CLUSTERIP_HASHMODE_SIP = 0,8 CLUSTERIP_HASHMODE_SIP = 0,
@@ -22,7 +23,7 @@ struct ipt_clusterip_tgt_info { · 14 unmodified lines
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];
include/uapi/linux/virtio_net.h+1−1
@@ -60,7 +60,7 @@ · 59 unmodified lines
60 60
61struct virtio_net_config {61struct 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;
include/uapi/linux/wimax/i2400m.h+2−2
@@ -122,7 +122,7 @@ · 121 unmodified lines
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 busses128 * Host Device Interface (HDI) common to all busses
@@ -487,7 +487,7 @@ struct i2400m_tlv_l4_message_versions { · 358 unmodified lines
487struct i2400m_tlv_detailed_device_info {487struct 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

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t