[Top][All Lists]

[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

From: mfkexpress
Subject: Re: [lwip-users] How to explicitly set IP6 header version = 6 in outgoing packets
Date: Fri, 5 Dec 2014 03:55:27 -0700 (MST)


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.

So what I did was I first ORed ip6hdr->_v_tc_fl with 0x6 and then left
shifted it 28 bits which I have implemented as follows:

              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);

With above settings, now my outgoing packet has IP6H_V = 6 and as we just
want Traffic Class (tc) and FLow Label (fl) to be "0" at the moment. 

Is it proper approach?
As atleast with above settings, packets sent from my device are being
received on my PC which initially were not.

Also one issue that I face is  pinging with my target's IP6 address gives me
"General Failure" error.
Any help for this error please...

Thanks & Regards,

View this message in context: 
Sent from the lwip-users mailing list archive at Nabble.com.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]