Question #201484 on rohc changed: https://answers.launchpad.net/rohc/+question/201484
Didier Barvaux posted a new comment: Hi, > Thanks for the excellent explanation. However i have a doubt > regarding the 3rd bullet. > > 3/ Scenario "RND=0 and change to RND=1": > - at compressor: IPv4 + context(RND): 0 -> 1 => UOR-2-RTP > + extension 3 with packet(RND)=1 > - at decompressor: IPv4 + context(RND)=0 => UOR-2-ID > - when parsing extension 3, packet(RND)=1 is found, and > packet is re-parsed as UOR-2-RTP > > Can you please highlight or share the reference in the source code where we > compute the ip_id correctly? a/ When parsing extension 3, the library checks for changed RND: http://bazaar.launchpad.net/~didier-barvaux/rohc/main/view/head:/src/decomp/d_generic.c#L7041 b/ In such case, the parsing of the UOR-2* packet is stopped because it has to be reparsed with different asumptions: http://bazaar.launchpad.net/~didier-barvaux/rohc/main/view/head:/src/decomp/d_generic.c#L5712 c/ The correct type of UOR-2* packet is detected here, then packet is parsed again (please note the 2 calls to parse_uor2(): http://bazaar.launchpad.net/~didier-barvaux/rohc/main/view/head:/src/decomp/d_generic.c#L5938 The Offset IP-ID is always decoded the same way from bits extracted from the packet: http://bazaar.launchpad.net/~didier- barvaux/rohc/main/view/head:/src/decomp/d_generic.c#L8547 > Here is my understanding: > > a. when 1st packet received with RND bit 1, then we have to > compute and store the id_offset_ref as curr_ip_id - curr_SN > b. when 2nd packet is received with RND bit toggled to 0, then > we hv to use the id_ref computed at step 1 and compute the > current ip_id as id_offset_ref + curr_SN. > > pls correct my algorithm if you think there are any mistakes. I do not understand your algorithm. Scenario 3 is about RND changing from 0 to 1, not from 1 to 0. Are you talking about scenario 4 instead? For a/, the random IP-ID value is recorded as the new reference by a call to ip_id_offset_set_ref() in the update_context() function that is called once a packet is successfully decompressed. For b/, if RND=0, then some bits of IP-ID offset are transmitted. They must be used to compute the new IP-ID offset (see the description of the W-LSB algorithm in RFC 3095). Once the new IP-ID Offset is decoded, the new IP-ID value can be decoded from the IP-ID offset and the decoded SN (see the description of the Offset IP-ID algorithm in RFC 3095). The Offset IP-ID decoded at step a/ is not used. I hope that my explanations were clear enough. Do not hesitate to ask additional questions if you need to. Regards, Didier -- You received this question notification because you are a member of ROHC Team, which is an answer contact for rohc. _______________________________________________ Mailing list: https://launchpad.net/~rohc Post to : [email protected] Unsubscribe : https://launchpad.net/~rohc More help : https://help.launchpad.net/ListHelp

