Question about IR/IR-DYN remainder header?

Asked by tony

In rohc-1.6.0 code packet, Function code_IR_packet(Line 1803), there is a process :
g_context->code_ir_remainder(context, dest, counter)

this used to add a remainder header to the ROHC packet.

But according to RFC3095(Page 97), IR packet (5.7.7.1), there is not anything described
about the "remainder header"

5.7.7.1. Basic structure of the IR packet
  --- --- --- --- --- --- --- ---
   | Add-CID octet | if for small CIDs and CID != 0
   +---+---+---+---+---+---+---+---+
   | 1 1 1 1 1 1 0 | D |
   +---+---+---+---+---+---+---+---+
   | |
   / 0-2 octets of CID info / 1-2 octets if for large CIDs
   | |
   +---+---+---+---+---+---+---+---+
   | Profile | 1 octet
   +---+---+---+---+---+---+---+---+
   | CRC | 1 octet
   +---+---+---+---+---+---+---+---+
   | |
   | Static chain | variable length
   | |
   +---+---+---+---+---+---+---+---+
   | |
   | Dynamic chain | present if D = 1, variable length
   | |
    - - - - - - - - - - - - - - - -
   | |
   | Payload | variable length
   | |
    - - - - - - - - - - - - - - - -

It seems that the code is not associate with the RFC.

Where can i find the discription about the "remainder header" of IR/IR-DYN packet?

Thanks a lot.

Question information

Language:
English Edit question
Status:
Solved
For:
rohc Edit question
Assignee:
No assignee Edit question
Solved by:
Didier Barvaux
Solved:
Last query:
Last reply:
Revision history for this message
Best Didier Barvaux (didier-barvaux) said :
#1

Hello,

The code_ir_remainder() callback is used by compression profiles that need to append some bytes at the end of the IR and IR-DYN packets. The IP/UDP, IP/UDP-Lite and IP-only profiles make use of it to append an additional 2-byte SN field.

The 2-byte SN field is described for the UDP profile in RFC 3095 §5.11.1 (https://tools.ietf.org/html/rfc3095#section-5.11.1):
   For ROHC UDP, the dynamic part of a UDP packet is different from
   section 5.7.7.5: a two-octet field containing the UDP SN is added
   after the Checksum field. This affects the format of dynamic chains
   in IR and IR-DYN packets.

In source code, the c_ip_code_ir_remainder() function in the src/comp/c_ip.c file implements the code_ir_remainder() callback and appends the 2-byte SN field.

Regards,
Didier

Revision history for this message
tony (scu-wsx) said :
#2

Thanks Didier Barvaux, that solved my question.