batman-adv: trivial endianness annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Sven Eckelmann <sven@narfation.org>
This commit is contained in:
parent
1a5852d81a
commit
3e2f1a1bb5
2 changed files with 9 additions and 9 deletions
|
@ -258,7 +258,7 @@ static void bla_send_claim(struct bat_priv *bat_priv, uint8_t *mac,
|
||||||
struct net_device *soft_iface;
|
struct net_device *soft_iface;
|
||||||
uint8_t *hw_src;
|
uint8_t *hw_src;
|
||||||
struct bla_claim_dst local_claim_dest;
|
struct bla_claim_dst local_claim_dest;
|
||||||
uint32_t zeroip = 0;
|
__be32 zeroip = 0;
|
||||||
|
|
||||||
primary_if = primary_if_get_selected(bat_priv);
|
primary_if = primary_if_get_selected(bat_priv);
|
||||||
if (!primary_if)
|
if (!primary_if)
|
||||||
|
@ -506,7 +506,7 @@ static void bla_send_announce(struct bat_priv *bat_priv,
|
||||||
struct backbone_gw *backbone_gw)
|
struct backbone_gw *backbone_gw)
|
||||||
{
|
{
|
||||||
uint8_t mac[ETH_ALEN];
|
uint8_t mac[ETH_ALEN];
|
||||||
uint16_t crc;
|
__be16 crc;
|
||||||
|
|
||||||
memcpy(mac, announce_mac, 4);
|
memcpy(mac, announce_mac, 4);
|
||||||
crc = htons(backbone_gw->crc);
|
crc = htons(backbone_gw->crc);
|
||||||
|
@ -627,7 +627,7 @@ static int handle_announce(struct bat_priv *bat_priv,
|
||||||
|
|
||||||
/* handle as ANNOUNCE frame */
|
/* handle as ANNOUNCE frame */
|
||||||
backbone_gw->lasttime = jiffies;
|
backbone_gw->lasttime = jiffies;
|
||||||
crc = ntohs(*((uint16_t *)(&an_addr[4])));
|
crc = ntohs(*((__be16 *)(&an_addr[4])));
|
||||||
|
|
||||||
bat_dbg(DBG_BLA, bat_priv,
|
bat_dbg(DBG_BLA, bat_priv,
|
||||||
"handle_announce(): ANNOUNCE vid %d (sent by %pM)... CRC = %04x\n",
|
"handle_announce(): ANNOUNCE vid %d (sent by %pM)... CRC = %04x\n",
|
||||||
|
|
|
@ -105,7 +105,7 @@ enum bla_claimframe {
|
||||||
struct bla_claim_dst {
|
struct bla_claim_dst {
|
||||||
uint8_t magic[3]; /* FF:43:05 */
|
uint8_t magic[3]; /* FF:43:05 */
|
||||||
uint8_t type; /* bla_claimframe */
|
uint8_t type; /* bla_claimframe */
|
||||||
uint16_t group; /* group id */
|
__be16 group; /* group id */
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
struct batman_header {
|
struct batman_header {
|
||||||
|
@ -134,7 +134,7 @@ struct icmp_packet {
|
||||||
uint8_t msg_type; /* see ICMP message types above */
|
uint8_t msg_type; /* see ICMP message types above */
|
||||||
uint8_t dst[ETH_ALEN];
|
uint8_t dst[ETH_ALEN];
|
||||||
uint8_t orig[ETH_ALEN];
|
uint8_t orig[ETH_ALEN];
|
||||||
uint16_t seqno;
|
__be16 seqno;
|
||||||
uint8_t uid;
|
uint8_t uid;
|
||||||
uint8_t reserved;
|
uint8_t reserved;
|
||||||
} __packed;
|
} __packed;
|
||||||
|
@ -148,7 +148,7 @@ struct icmp_packet_rr {
|
||||||
uint8_t msg_type; /* see ICMP message types above */
|
uint8_t msg_type; /* see ICMP message types above */
|
||||||
uint8_t dst[ETH_ALEN];
|
uint8_t dst[ETH_ALEN];
|
||||||
uint8_t orig[ETH_ALEN];
|
uint8_t orig[ETH_ALEN];
|
||||||
uint16_t seqno;
|
__be16 seqno;
|
||||||
uint8_t uid;
|
uint8_t uid;
|
||||||
uint8_t rr_cur;
|
uint8_t rr_cur;
|
||||||
uint8_t rr[BAT_RR_LEN][ETH_ALEN];
|
uint8_t rr[BAT_RR_LEN][ETH_ALEN];
|
||||||
|
@ -167,20 +167,20 @@ struct unicast_frag_packet {
|
||||||
uint8_t flags;
|
uint8_t flags;
|
||||||
uint8_t align;
|
uint8_t align;
|
||||||
uint8_t orig[ETH_ALEN];
|
uint8_t orig[ETH_ALEN];
|
||||||
uint16_t seqno;
|
__be16 seqno;
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
struct bcast_packet {
|
struct bcast_packet {
|
||||||
struct batman_header header;
|
struct batman_header header;
|
||||||
uint8_t reserved;
|
uint8_t reserved;
|
||||||
uint32_t seqno;
|
__be32 seqno;
|
||||||
uint8_t orig[ETH_ALEN];
|
uint8_t orig[ETH_ALEN];
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
struct vis_packet {
|
struct vis_packet {
|
||||||
struct batman_header header;
|
struct batman_header header;
|
||||||
uint8_t vis_type; /* which type of vis-participant sent this? */
|
uint8_t vis_type; /* which type of vis-participant sent this? */
|
||||||
uint32_t seqno; /* sequence number */
|
__be32 seqno; /* sequence number */
|
||||||
uint8_t entries; /* number of entries behind this struct */
|
uint8_t entries; /* number of entries behind this struct */
|
||||||
uint8_t reserved;
|
uint8_t reserved;
|
||||||
uint8_t vis_orig[ETH_ALEN]; /* originator reporting its neighbors */
|
uint8_t vis_orig[ETH_ALEN]; /* originator reporting its neighbors */
|
||||||
|
|
Loading…
Add table
Reference in a new issue