[PATCH v2] iphlpapi: Add support for ConvertLengthToIpv4Mask()

Henri Verbeet hverbeet at gmail.com
Sun Mar 18 06:42:10 CDT 2018


On 17 March 2018 at 19:30, Dagfinn Reiakvam <dagfinn at reiakvam.no> wrote:
> +        IN_ADDR temp;
> +        temp.S_un.S_addr = 0xffffffff << ( 32 - MaskLength);
> +        *Mask = temp.S_un.S_un_b.s_b4 + ( temp.S_un.S_un_b.s_b3 << 8 ) + ( temp.S_un.S_un_b.s_b2 << 16 ) + ( temp.S_un.S_un_b.s_b1 << 24 );

Should that be "*mask = htonl(~0u << (32 - mask_len));"?

The tests would probably benefit from htonl() as well.



More information about the wine-devel mailing list