aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2005-06-20 16:32:05 -0400
committerDavid S. Miller <davem@davemloft.net>2005-06-20 16:32:05 -0400
commitf6e276ee67c0ac9efafd24bc6f7a84aa359656df (patch)
tree33e3377739fb67573ef7cba8312f142765ccff79
parentf852640e74f71e6dd38146e1149ec1fe6da2fb07 (diff)
[ATALK]: endian annotations
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/linux/atalk.h26
-rw-r--r--net/appletalk/aarp.c2
-rw-r--r--net/appletalk/ddp.c2
3 files changed, 15 insertions, 15 deletions
diff --git a/include/linux/atalk.h b/include/linux/atalk.h
index 31d3fc25ccbd..09a1451c1159 100644
--- a/include/linux/atalk.h
+++ b/include/linux/atalk.h
@@ -20,7 +20,7 @@
20#define SIOCATALKDIFADDR (SIOCPROTOPRIVATE + 0) 20#define SIOCATALKDIFADDR (SIOCPROTOPRIVATE + 0)
21 21
22struct atalk_addr { 22struct atalk_addr {
23 __u16 s_net; 23 __be16 s_net;
24 __u8 s_node; 24 __u8 s_node;
25}; 25};
26 26
@@ -33,8 +33,8 @@ struct sockaddr_at {
33 33
34struct atalk_netrange { 34struct atalk_netrange {
35 __u8 nr_phase; 35 __u8 nr_phase;
36 __u16 nr_firstnet; 36 __be16 nr_firstnet;
37 __u16 nr_lastnet; 37 __be16 nr_lastnet;
38}; 38};
39 39
40#ifdef __KERNEL__ 40#ifdef __KERNEL__
@@ -70,8 +70,8 @@ struct atalk_iface {
70struct atalk_sock { 70struct atalk_sock {
71 /* struct sock has to be the first member of atalk_sock */ 71 /* struct sock has to be the first member of atalk_sock */
72 struct sock sk; 72 struct sock sk;
73 unsigned short dest_net; 73 __be16 dest_net;
74 unsigned short src_net; 74 __be16 src_net;
75 unsigned char dest_node; 75 unsigned char dest_node;
76 unsigned char src_node; 76 unsigned char src_node;
77 unsigned char dest_port; 77 unsigned char dest_port;
@@ -95,9 +95,9 @@ struct ddpehdr {
95 deh_hops:4, 95 deh_hops:4,
96 deh_len:10; 96 deh_len:10;
97#endif 97#endif
98 __u16 deh_sum; 98 __be16 deh_sum;
99 __u16 deh_dnet; 99 __be16 deh_dnet;
100 __u16 deh_snet; 100 __be16 deh_snet;
101 __u8 deh_dnode; 101 __u8 deh_dnode;
102 __u8 deh_snode; 102 __u8 deh_snode;
103 __u8 deh_dport; 103 __u8 deh_dport;
@@ -142,24 +142,24 @@ struct ddpshdr {
142 142
143/* AppleTalk AARP headers */ 143/* AppleTalk AARP headers */
144struct elapaarp { 144struct elapaarp {
145 __u16 hw_type; 145 __be16 hw_type;
146#define AARP_HW_TYPE_ETHERNET 1 146#define AARP_HW_TYPE_ETHERNET 1
147#define AARP_HW_TYPE_TOKENRING 2 147#define AARP_HW_TYPE_TOKENRING 2
148 __u16 pa_type; 148 __be16 pa_type;
149 __u8 hw_len; 149 __u8 hw_len;
150 __u8 pa_len; 150 __u8 pa_len;
151#define AARP_PA_ALEN 4 151#define AARP_PA_ALEN 4
152 __u16 function; 152 __be16 function;
153#define AARP_REQUEST 1 153#define AARP_REQUEST 1
154#define AARP_REPLY 2 154#define AARP_REPLY 2
155#define AARP_PROBE 3 155#define AARP_PROBE 3
156 __u8 hw_src[ETH_ALEN] __attribute__ ((packed)); 156 __u8 hw_src[ETH_ALEN] __attribute__ ((packed));
157 __u8 pa_src_zero __attribute__ ((packed)); 157 __u8 pa_src_zero __attribute__ ((packed));
158 __u16 pa_src_net __attribute__ ((packed)); 158 __be16 pa_src_net __attribute__ ((packed));
159 __u8 pa_src_node __attribute__ ((packed)); 159 __u8 pa_src_node __attribute__ ((packed));
160 __u8 hw_dst[ETH_ALEN] __attribute__ ((packed)); 160 __u8 hw_dst[ETH_ALEN] __attribute__ ((packed));
161 __u8 pa_dst_zero __attribute__ ((packed)); 161 __u8 pa_dst_zero __attribute__ ((packed));
162 __u16 pa_dst_net __attribute__ ((packed)); 162 __be16 pa_dst_net __attribute__ ((packed));
163 __u8 pa_dst_node __attribute__ ((packed)); 163 __u8 pa_dst_node __attribute__ ((packed));
164}; 164};
165 165
diff --git a/net/appletalk/aarp.c b/net/appletalk/aarp.c
index 54640c01b50c..10d040461021 100644
--- a/net/appletalk/aarp.c
+++ b/net/appletalk/aarp.c
@@ -565,7 +565,7 @@ int aarp_send_ddp(struct net_device *dev, struct sk_buff *skb,
565 * numbers we just happen to need. Now put the 565 * numbers we just happen to need. Now put the
566 * length in the lower two. 566 * length in the lower two.
567 */ 567 */
568 *((__u16 *)skb->data) = htons(skb->len); 568 *((__be16 *)skb->data) = htons(skb->len);
569 ft = 1; 569 ft = 1;
570 } 570 }
571 /* 571 /*
diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c
index 876dbac71060..192b529f86a4 100644
--- a/net/appletalk/ddp.c
+++ b/net/appletalk/ddp.c
@@ -401,7 +401,7 @@ out_err:
401} 401}
402 402
403/* Find a match for a specific network:node pair */ 403/* Find a match for a specific network:node pair */
404static struct atalk_iface *atalk_find_interface(int net, int node) 404static struct atalk_iface *atalk_find_interface(__be16 net, int node)
405{ 405{
406 struct atalk_iface *iface; 406 struct atalk_iface *iface;
407 407