[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] How to explicitly set IP6 header version = 6 in outgoin
Re: [lwip-users] How to explicitly set IP6 header version = 6 in outgoing packets
Fri, 5 Dec 2014 05:02:20 -0700 (MST)
Simon Goldschmidt wrote
> mfkexpress wrote:
>> I think there is a bug related to setting ip6 header version in
>> IP6H_VTCFL_SET() function.
>> Because this function do not set the header version to 6 which I found by
>> debugging into my code.
>> IP6H_VTCFL_SET(ip6hdr, 6, tc, 0);
>> ip6hdr->_v_tc_fl = htonl(ip6hdr->_v_tc_fl | (0x6));
>> ip6hdr->_v_tc_fl = htonl((ip6hdr->_v_tc_fl) << 28);
>> Is it proper approach?
> Doesn't seem like the proper approach, no.
> Could you try this instead:
> #define IP6H_VTCFL_SET(hdr, v, tc, fl) (hdr)->_v_tc_fl =
> (htonl((((u32_t)(v)) << 28) | (((u32_t)(tc)) << 20) | (fl)))
> Maybe your compiler has problems with shifting the constant '6' left by
> 28... Which platform were you using again?
> lwip-users mailing list
Thank you sooo much Simon...
This really worked for me. I was such a fool that I didn't consider
But one problem is why I can't ping to my device?
Though some NS, NA packets are getting Tx/Rx from my device to PC, I get
"General failure" message in reply whenever I'm pinging IP6 address of my
Please help me for that. It would be highly appreciated.
Thanks & Regards,
View this message in context:
Sent from the lwip-users mailing list archive at Nabble.com.