lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140304.170050.2058599034902221847.davem@davemloft.net>
Date:	Tue, 04 Mar 2014 17:00:50 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	phoebe.buckheister@...m.fraunhofer.de
Cc:	netdev@...r.kernel.org, linux-zigbee-devel@...ts.sourceforge.net
Subject: Re: [PATCH net-next v4 1/4] ieee802154: add generic header
 handling routines

From: Phoebe Buckheister <phoebe.buckheister@...m.fraunhofer.de>
Date: Tue,  4 Mar 2014 15:34:45 +0100

> +struct ieee802154_sechdr {
> +	u8 sc;
> +	u32 frame_ctr;
> +	union {
> +		struct {
> +			u16 pan_id;
> +			u16 short_addr;
> +		} pan;
> +		u8 hw[IEEE802154_ADDR_LEN];
> +	} key_source;
> +	u8 key_id;
> +};
> +
> +struct ieee802154_hdr {
> +	u16 fc;
> +	u8 seq;
> +	struct ieee802154_addr source;
> +	struct ieee802154_addr dest;
> +	struct ieee802154_sechdr sec;
> +};

You're going to have to address endianness both in these structure
definitions and the code.

For types larger than u8 you'll need to use __be16, __le16, __be32,
__le32 etc. as appropriate.

When setting/loading values, you'll need to use cpu_to_be16(),
cpu_to_le16() etc.  as appropriate.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ