rohc team mailing list archive
-
rohc team
-
Mailing list archive
-
Message #02105
Re: [Question #403875]: make check failure
Question #403875 on rohc changed:
https://answers.launchpad.net/rohc/+question/403875
BHASKAR TILAK posted a new comment:
Thaks for the prompt response.
I have moved on without tests for the time-being. however I will surely
try this out when time permits.
Now, just for an experiment I commented the code which appends FAKE_PAYLOAD to IP packet and I see following problem.
The version is reported as 1.
build a fake IP packet
0x45 0x00 0x00 0x26 0x00 0x00 0x00 0x00
0x01 0x86 0xa9 0x3f 0x01 0x02 0x03 0x04
0x05 0x06 0x07 0x08
compress the fake IP packet
[net_pkt.c:68 net_pkt_parse()] outer IP header: 20 bytes
[net_pkt.c:70 net_pkt_parse()] outer IP header: version 1
However I realized that I failed to update the total_length in main(), when I corrected that I got the correct output as below:
enable several ROHC decompression profiles
build a fake IP packet
0x45 0x00 0x00 0x14 0x00 0x00 0x00 0x00
0x01 0x86 0xa9 0x3f 0x01 0x02 0x03 0x04
0x05 0x06 0x07 0x08
compress the fake IP packet
[net_pkt.c:68 net_pkt_parse()] outer IP header: 20 bytes
[net_pkt.c:70 net_pkt_parse()] outer IP header: version 4
[net_pkt.c:75 net_pkt_parse()] outer IP header: next header is of type 134
[net_pkt.c:80 net_pkt_parse()] outer IP header: next layer is of type 134
How the reading of version is related here, I see some problem here:
Please correct me if I am wrong; just by changing the total-length from 0x26 to 0x14 how does it start reporting correct version?
The ip_hdr in below code is not same as iphdr we used in main() function.
bool ip_create(struct ip_packet *const ip,
const uint8_t *const packet,
const size_t size)
{
const struct ip_hdr *const ip_hdr = (struct ip_hdr *) packet;
/* get the version of the IP packet */
if(size >= sizeof(struct ip_hdr))
{
ip->version = ip_hdr->version;
}
else
{
ip->version = IP_UNKNOWN;
}
......
}
Thanks in advance.
--
You received this question notification because your team ROHC Team is
an answer contact for rohc.