How to debug the rohc library~

Asked by sleepswallow

hello Dider:
              thank for you very much!
             Now I run simple_rohc_program example to follow the process of rohc compressor , the print information is display the "c_generic_create"function called , but I can't to find where calling this function, please give me some help?
       another: I want to use "gcc" to debug it single step or set breakpoint , how to do it ?
       third: if I write my self test program , how to set verbose to display the "stderr" or not ?
      last : how to set rohc mode ?
     thanks!

Regards:
   sleepswallow

Question information

Language:
English Edit question
Status:
Expired
For:
rohc Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
sleepswallow (sleepswallow128) said :
#1

hello Dider:
   I go to https://bugs.launchpad.net/rohc/, I want to ask all bugs are resloved or not .
for example :"Wrong W-LSB decoding if interpretation interval straddles the field boundaries" is resloved and all changes in revision 777 ?
 another: is the extension header of IPv6 compressed in rohc library?
 last: I want to know the diffrence of : ~didier-barvaux/rohc/main/revision/777, 1.5.x( ~didier-arvaux/rohc/1.5.x/revision/583) and 1.6.x.(~didier-barvaux/rohc/1.6.x/revision/763), thanks~~

    Regard:
   sleepswallow

Revision history for this message
Didier Barvaux (didier-barvaux) said :
#2

Hello,

> Now I run simple_rohc_program example to follow the process
> of rohc compressor , the print information is display the
> "c_generic_create"function called , but I can't to find where
> calling this function, please give me some help?

The c_generic_create() function is defined in src/comp/c_generic.c. It is called by the IP, UDP, UDP-Lite, ESP, and RTP profiles to create the "generic" part of the compression context. Here "generic" means that it is shared by all IP-based profiles. See the c_ip.c, c_udp.c (and so on) files.

> I want to use "gcc" to debug it single step or set breakpoint ,
> how to do it ?

You probably means "gdb", not "gcc". Simply start your program with gdb or attach to your program once started as usual. Ensure that the ROHC library was built with the -g (ie. make CFLAGS="-g") to see symbol names within gdb. More explanations about gdb is out of scope of this mailing list. See http://sourceware.org/gdb/current/onlinedocs/gdb/

> if I write my self test program , how to set verbose to display
> the "stderr" or not ?

Use the rohc_comp_set_traces_cb() function for compressor traces:
    http://rohc-lib.org/doc/rohc-doc-1.6.0/rohc__comp_8h.html#affa6d3ce4976d53b13dc1193d6d4c66d
Example:
    http://bazaar.launchpad.net/~didier-barvaux/rohc/1.6.x/view/head:/app/tunnel/tunnel.c#L732

Use the rohc_decomp_set_traces_cb() function for decompressor traces:
    http://rohc-lib.org/doc/rohc-doc-1.6.0/rohc__decomp_8h.html#a6fb60f5bcaa453af00047d048b750b07
Example:
    http://bazaar.launchpad.net/~didier-barvaux/rohc/1.6.x/view/head:/app/tunnel/tunnel.c#L765

> how to set rohc mode ?

You cannot set it directly. It is controlled by the rohc_alloc_decompressor() function that creates a decompressor. If you specify a local compressor, then O-mode will be used and feedback will be transmitted to the compressor on the other side through the local compressor you specified. If you specify NULL, U-mode will be used.
See http://rohc-lib.org/doc/rohc-doc-1.6.0/group__rohc__decomp.html#ga5848bedb63470ce0675033796f6de95a

> I go to https://bugs.launchpad.net/rohc/, I want to ask all bugs
> are resloved or not .
> for example :"Wrong W-LSB decoding if interpretation interval
> straddles the field boundaries" is resloved and all changes in
> revision 777 ?

Bugs shall be resolved in all active branches. Currently there are 3 actives branches:
 - "1.5.x" for fixing bugs in stable releases 1.5.0, 1.5.1, 1.5.2...
 - "1.6.x" for fixing bugs in stable releases 1.6.0, 1.6.1...
 - "main" or "trunk" for new features (and bug fixes of course) and
     next major release 1.7.0.

So, there is not one single status for a bug, but three. In case of bug #1209260 entitled ""Wrong W-LSB decoding if interpretation interval straddles the field boundaries", the bug is:
 - fixed in the 1.5.x branch and shipped in release 1.5.3,
 - fixed in the 1.6.x branch and shipped in release 1.6.1,
 - fixed in the main branch and not shipped in any release yet (because 1.7.0 is not released yet).

So, if you got 1.5.3 or 1.6.1, you're safe. If you got main with a revision >= 777, you're safe too.

> another: is the extension header of IPv6 compressed in rohc library?

Yes, it is.

> last: I want to know the diffrence of :
> ~didier-barvaux/rohc/main/revision/777,
> 1.5.x( ~didier-arvaux/rohc/1.5.x/revision/583) and
> 1.6.x.(~didier-barvaux/rohc/1.6.x/revision/763)

Same correction for the same bug on different branches.

Regards,
Didier

Revision history for this message
sleepswallow (sleepswallow128) said :
#3

hello Dider:
       thanks !
       first about "gdb" to debug, I find in the configure.ac included the -g ,then login in "root" : run the .o file in examples directory, error is
/bin/bash: /home/..../simple_rohc_program-simple_rohc_program.o: Premission denied, why?

   sencod: Use the rohc_comp_set_traces_cb() and rohc_decomp_set_traces_cb() to trace the compressor or decompressor process? some *.0 file running with verbose will display the trace info, I want to know how to set the verbose option to get the same result.
     The use of callback function is to trace the process?

    third: about the rohc mode. if the rohc_alloc_decompressor function use the parameter “ compressor",meaning to use O-mode , if the parameter "NULL", U-mode will be used?

    next: I want the diffrence of want to know the diffrence of content(~didier-barvaux/rohc/main/revision/777, 1.5.x( ~didier-arvaux/rohc/1.5.x/revision/583) and 1.6.x.(~didier-barvaux/rohc/1.6.x/revision/763)), for instance, main 777 includes the tcp profile, 1.5.x and 1.6.x. are not ?
         I will compress the RTP/UDP/IPv4(IPv6) and TCP/IPv4(IPv6) header in my project , I want to which branche is more appropriate ?
    thank you very much!

  Regards,
   sleepswallow

Revision history for this message
sleepswallow (sleepswallow128) said :
#4

hello Dider:
    continue questions, thanks!
     The above all tests run on fedora18, today I want to test the "tunnel"example on fedora18(host a) and fedora8(host b),then I use ./configure --enable-app-tunnel on fedora8, there are error:
   error 'ETH-ALEN' no declare
  then run ./configure --enable-linux-kernel-module on fedora8, error:
      error: kmode-test.c in function 'rohc-couple-int-phase1'
                kmode-test.c :156 error , 'pr-err' and so on errors
      how to resolve?

   last: what is the fuction of "tunnel" example ?

   thanks~~

  Regards,
   sleepswallow

Revision history for this message
Didier Barvaux (didier-barvaux) said :
#5

Hello,

I don't understand well your questions. Sorry to say that to you, but you seems to mix almost everything! Really! The traces that you report are truncated and contain errors and typos ("-" instead of "_" for example). You ask questions that have straight answers on the website, wiki or API documentation. You ask the very same questions several times. You also seems to lack basic knowledge about developement on Unix/Linux systems. Sorry but you don't match the minimal requirements for using the ROHC library in your project.

Learn more about dev on Unix/Linux (compilation, binaries, object files, static and dynamic libraries, autotools). Learn more about revision control system about revisions and about branches. There are plenty of books, online tutorials, mailing lists or forums to learn those things. This mailing list is not the place for that.

Once you got that knowledge, you could come back here. I'll enjoy helping you on the ROHC protocol and/or the ROHC library.

Regards,
Didier

Revision history for this message
sleepswallow (sleepswallow128) said :
#6

Hello Didier:
    first thank you very much!
      you are right,I need some time to learn about dev on linux, rohc library and branches. but time urgent,before the end of november I must complete function testing of rohc , insert the rohc to linux kernel and test it in the device, so I have some worry and want to get more help from you ^_^ Now I will take some time to learn there and to elevate my ability.
      If I meet some difficulties on the rohc protocol and library , I will look for help from you ,thanks you!
      Regards,
     sleepswallow

Revision history for this message
Launchpad Janitor (janitor) said :
#7

This question was expired because it remained in the 'Open' state without activity for the last 15 days.