← Back to team overview

rohc team mailing list archive

Re: organisation of source code (Was: Re: (no subject))

 

Hello Shen,


>                 Thank you for you reply!

Please, answer to the mailing list so that anyone may follow the
discussion and eventually participate :)


>                 I have learned ROHC library only one month,it's a
> very big library,and it's very complex :).So till now I also can't
>  to get to the main point,such as   the organisation of the source
> code of the ROHC library,I wonder if you can show me the SDL chart of
> ROHC Library or something about this(I have learned RFC3095 )?

The public API is described here: http://www.tech.viveris.com/docs/rohc/

There is actually no big picture of the internals of the library.
However I explained several points about the source organisation in the
second part of the following email on the mailing list:
https://lists.launchpad.net/rohc/msg00162.html. It is worth reading it.


> And can you show me how a  profile(IPorUDPorRTP) compress and
> decompress a packet?

The rohc_comp.[ch] and rohc_decomp.[ch] files define both the public API
of the ROHC library and the core functions.

Every compression and decompression profiles define a set of variables
and functions that do the profile-specific job (see [1] for the
compression set and [2] for the decompression set). The implementation
of all theses functions are located in dedicated source files (eg.
c_udp.c/c_udp.h for the UDP compression profile, d_rtp.c/d_rtp.h for
the RTP decompression profile...).

The core functions do the generic work that is not specific of a given
profile and call the functions defined by a profile only when a
specific treatment is required. It's a kind of object-oriented
programming done in C language.

Here is a "quick" explanation of the compression process:
 1/ An application that uses the ROHC library calls the rohc_compress()
    function [3] to compress one IP packet.
 2/ The function analyses the IP headers of the packet, chooses the
    best compression profile for the packet and then the best context of
    that profile for the packet. Let's say for this example that the
    Uncompressed profile is chosen.
 3/ The rohc_compress() function then wants to compress the packet.
    To achieve that, it calls the "encode" function defined by the
    compression profile [4].
 4/ Because the Uncompressed profile was selected during step 2, the
    "encode" function in this case points to the c_uncompressed_encode()
    function [5].
 5/ The c_uncompressed_encode() function builds the ROHC header
    following the rules defined by RFC3095 for the Uncompressed profile.
 6/ Once the c_uncompressed_encode() function finished its job, the
    rohc_compress() function checks the return code of the
    c_uncompressed_encode() function to manage eventual errors, copies
    the packet payload in the ROHC packet and updates some statistics.
 7/ If the application wants to compress another packet, go to step 1.

The "encode" function is not the only function defined by a compressed
profile. There are other functions, see [1] for a list. The
decompression process works the same way the compression process: core
functions that call profile-specific functions.

I hope that all these explanations will help you :)


> That's all!Thank you  very much! ^_^,my english
> is not well due to lack of practice!Thank for your patience!!! a fun
> of ROHC

No problem with your English. Mine is probably not perfect either :)

Regards,
Didier


Links used in this email:
[1] The set of variables and functions for a compression profile:
http://bazaar.launchpad.net/~didier-barvaux/rohc/main/annotate/head:/src/comp/rohc_comp.h#L185
[2] The set of variables and functions for a decompression profile:
http://bazaar.launchpad.net/~didier-barvaux/rohc/main/annotate/head:/src/decomp/rohc_decomp.h#L186
[3] The rohc_compress() function:
http://bazaar.launchpad.net/~didier-barvaux/rohc/main/annotate/head:/src/comp/rohc_comp.c#L161
[4] Using the "encode" function defined by the compression profile to
    compress the packet:
http://bazaar.launchpad.net/~didier-barvaux/rohc/main/annotate/head:/src/comp/rohc_comp.c#L300
[5] The c_uncompressed_encode() function, ie. the "encode" function
    defined by the Uncompressed compression profile to compress the
    packet:
http://bazaar.launchpad.net/~didier-barvaux/rohc/main/annotate/head:/src/comp/c_uncompressed.c#L96



> ________________________________
> From: Didier Barvaux <didier@xxxxxxxxxxx>
> To: rohc@xxxxxxxxxxxxxxxxxxx
> Sent: Thu, June 3, 2010 4:19:09 AM
> Subject: Re: [Rohc] (no subject)
> 
> Sanmingshen,
> 
> >         Sorry to bother you!
> 
> No problem. The list is there to discuss about the ROHC library and
> ask questions about it :)
> 
> 
> >         I'm a chinese student in wuhan university, now i'm learning
> > ROHC project.But,till now,i also don't know how many datapath in
> > this project,is RTP/UDP/IP/UNCOMPRESSED/UDP_LITE profile??
> 
> I'm not sure to correctly understand your question. Is your question
> about the organisation of the source code of the ROHC library ?
> 
> 
> > And ,can you show me the total process of how an IP packet being
> > compressed and decompressed,and the category of packets and how they
> > changed in different states?
> 
> Do you want information about the process of compression/decompression
> as defined by the IETF standard (ie. the ROHC protocol itself) or
> about the way the ROHC protocol is implemented in the ROHC library
> (ie. the design of the ROHC library) ?
> 
> Regards,
> 
> Didier Barvaux
> 

Attachment: signature.asc
Description: PGP signature


References