summaryrefslogtreecommitdiff
path: root/include/linux/dn.h
diff options
context:
space:
mode:
authorSteven Whitehouse <steve@chygwyn.com>2006-03-21 09:42:39 +0300
committerDavid S. Miller <davem@davemloft.net>2006-03-21 09:42:39 +0300
commitc4ea94ab3710eb2434abe2eab1a479c2dc01f8ac (patch)
tree72e07ca7d2d5fe2de31b3f5a4e64fa411efdf18d /include/linux/dn.h
parent2c7946a7bf45ae86736ab3b43d0085e43947945c (diff)
downloadlinux-c4ea94ab3710eb2434abe2eab1a479c2dc01f8ac.tar.xz
[DECnet]: Endian annotation and fixes for DECnet.
The typedef for dn_address has been removed in favour of using __le16 or __u16 directly as appropriate. All the DECnet header files are updated accordingly. The byte ordering of dn_eth2dn() and dn_dn2eth() are both changed since just about all their callers wanted network order rather than host order, so the conversion is now done in the functions themselves. Several missed endianess conversions have been picked up during the conversion process. The nh_gw field in struct dn_fib_info has been changed from a 32 bit field to 16 bits as it ought to be. One or two cases of using htons rather than dn_htons in the routing code have been found and fixed. There are still a few warnings to fix, but this patch deals with the important cases. Signed-off-by: Steven Whitehouse <steve@chygwyn.com> Signed-off-by: Patrick Caulfield <patrick@tykepenguin.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/dn.h')
-rw-r--r--include/linux/dn.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/include/linux/dn.h b/include/linux/dn.h
index 782cae49e64c..10b6a6fd5837 100644
--- a/include/linux/dn.h
+++ b/include/linux/dn.h
@@ -71,17 +71,17 @@
struct dn_naddr
{
- unsigned short a_len;
- unsigned char a_addr[DN_MAXADDL];
+ __le16 a_len;
+ __u8 a_addr[DN_MAXADDL]; /* Two bytes little endian */
};
struct sockaddr_dn
{
- unsigned short sdn_family;
- unsigned char sdn_flags;
- unsigned char sdn_objnum;
- unsigned short sdn_objnamel;
- unsigned char sdn_objname[DN_MAXOBJL];
+ __u16 sdn_family;
+ __u8 sdn_flags;
+ __u8 sdn_objnum;
+ __le16 sdn_objnamel;
+ __u8 sdn_objname[DN_MAXOBJL];
struct dn_naddr sdn_add;
};
#define sdn_nodeaddrl sdn_add.a_len /* Node address length */
@@ -93,38 +93,38 @@ struct sockaddr_dn
* DECnet set/get DSO_CONDATA, DSO_DISDATA (optional data) structure
*/
struct optdata_dn {
- unsigned short opt_status; /* Extended status return */
+ __le16 opt_status; /* Extended status return */
#define opt_sts opt_status
- unsigned short opt_optl; /* Length of user data */
- unsigned char opt_data[16]; /* User data */
+ __le16 opt_optl; /* Length of user data */
+ __u8 opt_data[16]; /* User data */
};
struct accessdata_dn
{
- unsigned char acc_accl;
- unsigned char acc_acc[DN_MAXACCL];
- unsigned char acc_passl;
- unsigned char acc_pass[DN_MAXACCL];
- unsigned char acc_userl;
- unsigned char acc_user[DN_MAXACCL];
+ __u8 acc_accl;
+ __u8 acc_acc[DN_MAXACCL];
+ __u8 acc_passl;
+ __u8 acc_pass[DN_MAXACCL];
+ __u8 acc_userl;
+ __u8 acc_user[DN_MAXACCL];
};
/*
* DECnet logical link information structure
*/
struct linkinfo_dn {
- unsigned short idn_segsize; /* Segment size for link */
- unsigned char idn_linkstate; /* Logical link state */
+ __le16 idn_segsize; /* Segment size for link */
+ __u8 idn_linkstate; /* Logical link state */
};
/*
* Ethernet address format (for DECnet)
*/
union etheraddress {
- unsigned char dne_addr[6]; /* Full ethernet address */
+ __u8 dne_addr[6]; /* Full ethernet address */
struct {
- unsigned char dne_hiord[4]; /* DECnet HIORD prefix */
- unsigned char dne_nodeaddr[2]; /* DECnet node address */
+ __u8 dne_hiord[4]; /* DECnet HIORD prefix */
+ __u8 dne_nodeaddr[2]; /* DECnet node address */
} dne_remote;
};
@@ -133,7 +133,7 @@ union etheraddress {
* DECnet physical socket address format
*/
struct dn_addr {
- unsigned short dna_family; /* AF_DECnet */
+ __le16 dna_family; /* AF_DECnet */
union etheraddress dna_netaddr; /* DECnet ethernet address */
};