[...]
> diff --git a/iscsiuio/src/uip/ipv6.h b/iscsiuio/src/uip/ipv6.h
> index 231f454..9e218fc 100644
> --- a/iscsiuio/src/uip/ipv6.h
> +++ b/iscsiuio/src/uip/ipv6.h
> @@ -71,7 +71,13 @@ struct udp_hdr {
> };
>
> struct mac_address {
> - u8_t addr[6];
> + union {
> + u8_t addr[6];
> + struct {
> + u16_t first_2_bytes;
> + u32_t last_4_bytes;
> + };
> + };
> };
>
Are you sure the nested struct never gets alignment to long word boundaries
(for example)? If so, the union could be 8 bytes instead of six. In the feel of
K&R C (obsolete, I know), "addr+2" seems safer than "&last_4_bytes". Whether
it's safe to cast the first address to a long word is another question. It's
always safe to do for the second address, but it's not guaranteed that both
addresses are the same (in my understanding of C).
Regards,
Ulrich
> #define HOST_TO_NET16(a) htons(a)
> --
> 1.9.3
>
> --
> You received this message because you are subscribed to the Google Groups
> "open-iscsi" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/open-iscsi.
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.