18 Mar
2018
18 Mar
'18
11:42 a.m.
On 17 March 2018 at 19:30, Dagfinn Reiakvam <dagfinn(a)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.