[ofw] ipv6_hdr_t fields should be net*_t ?

Alex Naslednikov xalex at mellanox.co.il
Sun Nov 14 01:51:18 PST 2010


Please, SB

-----Original Message-----
From: Smith, Stan [mailto:stan.smith at intel.com] 
Sent: Wednesday, November 10, 2010 11:16 PM
To: Alex Naslednikov
Cc: ofw at lists.openfabrics.org
Subject: RE: ipv6_hdr_t fields should be net*_t ?

Smith, Stan wrote:
> Hello,
>   A minor point although important.
> In your recent commit 2984 inc\kernel\ip_packet.h, the ipv6_hdr_t
> fields which are > 8 bits should be typed as net*_t to indicate
> network byte ordering. Do you agree?
[Xalex] Yes, I am.
>
> thanks,
>
> stan.
>
> typedef struct _ipv6_hdr
>  {
> -     uint32_t        ver_tc_fl;
> -     uint16_t        payload_length;
> +     net32_t ver_tc_fl;
> +     net16_t payload_length;
>       uint8_t next_header;
>       uint8_t hop_limit;
>       uint8_t src_addr[16];

upon further consideration, why did you choose not to use the Microsoft IPV6_HEADER definition located in netiodef.h ?
[XaleX] I tried to be aligned with the IPv4 code, but this is not critical - we can change the definition thereafter

stan.



More information about the ofw mailing list