no TCP codes and some test can not compress?

Asked by regulararmy on 2013-05-11

Hello Teacher:
        firstly, In the rohc-1.5.1.tar.bz2,is there no compression and decompression codes for TCP protocol, if so,can I get it from yours?
        secondly, after unzipping rohc-1.5.1.tar.bz2, there is folder " examples" with a simple_rohc_program.c, the main function in it compress only one IP packet, yes,the size of IP packet become bigger than before, however,I use a lot of IP packets as input,the codes in the .c file still can not make the sizes of IP packets smaller after compression. is it right?
       thirdly,is there test codes for UDP/IP compression and decompression in the rohc-1.5.1.tar.bz2,if so,which foder and file?

                                                                                                              Thank you very much!

Question information

Language:
English Edit question
Status:
Solved
For:
rohc Edit question
Assignee:
No assignee Edit question
Solved by:
Didier Barvaux
Solved:
2013-05-14
Last query:
2013-05-14
Last reply:
2013-05-13

This question was reopened

> Hello Teacher:

Hello young padawan :)

> firstly, In the rohc-1.5.1.tar.bz2,is there no compression and
> decompression codes for TCP protocol, if so,can I get it from
> yours?

The 1.5.1 release can compress TCP streams, but it is not as efficient as one could expect: it compresses only the IPv4/IPv6 header. For best compression, you need the TCP profile. It is available in a separate dev branch: https://code.launchpad.net/~didier-barvaux/+junk/rohc-tcp . Use with some caution, it is still beta quality.

> secondly, after unzipping rohc-1.5.1.tar.bz2, there is folder
> "examples" with a simple_rohc_program.c, the main function
> in it compress only one IP packet, yes,the size of IP packet
> become bigger than before, however,I use a lot of IP packets
> as input,the codes in the .c file still can not make the sizes of
> IP packets smaller after compression. is it right?

Probably not, but difficult to say without additional information about the additional IP packets. Do they belong to the same stream as the first one? Belonging to the same stream means: same source IP address, same destination IP address, and same protocol field for IPv4-only streams. If they do, there is probably a problem; if they don't that's expected, they are all compressed in an independent fashion.

> thirdly,is there test codes for UDP/IP compression and
> decompression in the rohc-1.5.1.tar.bz2,if so,which foder and file?

Please read the documentation! There are many information about this everywhere:
 - in sources:
     - README file: http://bazaar.launchpad.net/~didier-barvaux/rohc/main/view/head:/README#L34
     - INSTALL file: http://bazaar.launchpad.net/~didier-barvaux/rohc/main/view/head:/INSTALL#L57
 - on wiki:
    - install instructions on wiki:
       http://rohc-lib.org/wiki/doku.php?id=library-install-sources#native_build_on_unix-like_systems
    - ROHC tunnel over UDP: http://rohc-lib.org/wiki/doku.php#rohc_over_udp_tunnel
    - ROHC sniffer: http://rohc-lib.org/wiki/doku.php#rohc_sniffer

'make check' builds plenty of small test programs, and runs them with input data, checking in an automated way the results. For tests with real world streams, the ROHC tunnel over UDP and the ROHC sniffer are possible options. The code of all thoses tests and applications are useful sources of information too.

Regards,
Didier

regulararmy (regulararmy) said : #2

thank you.
       for the second answer, as for the input IP packets I used, they are exactly the same as each other,it is just the IP packet constructed in the main function of the simple_rohc_program.c.

regulararmy (regulararmy) said : #3

Thanks Didier Barvaux, that solved my question.

> as for the input IP packets I used, they are exactly the same
> as each other,it is just the IP packet constructed in the main
> function of the simple_rohc_program.c.

When compressing 10 times the same fake IP packet, the three first packets weight 39 bytes, but the third one is only 29-byte long, the fourth is 20-byte long, the 7th packet is 19-byte long. The payload is 18-byte long, so starting at the 7th packet, the 20-byte IP header is compressed to 1-byte ROHC header. It saves you 95% of headers and 50% of the whole packet.

Regard,
Didier

regulararmy (regulararmy) said : #5

another question:
               In http://rohc-lib.org/wiki/doku.php#rohc_sniffer(ROHC sniffer), it said "Developed in the app/sniffer/ sub-directory of the library source code.",however,I can not find the test example in the rohc-1.5.1.tar.bz2. where is it? thank you.

> In http://rohc-lib.org/wiki/doku.php#rohc_sniffer(ROHC sniffer), it
> said "Developed in the app/sniffer/ sub-directory of the library source
> code.",however,I can not find the test example in the rohc-1.5.1.tar.bz2.
> where is it? thank you.

Sorry again, documentation is not accurate: the sniffer is for versions >= 1.6.0 only. Use the main dev branch if you want to use it.

Regards,
Didier

regulararmy (regulararmy) said : #7

parden, what is the "main dev branch", where is it? thank you.

regulararmy (regulararmy) said : #8

Thank you for answering me so many questions in time and in patience .

> parden, what is the "main dev branch", where is it? thank you.

All branches are available on Launchpad:
https://code.launchpad.net/rohc

The main branch is there:
https://code.launchpad.net/~didier-barvaux/rohc/main

Regards,
Didier

regulararmy (regulararmy) said : #10

Thanks Didier Barvaux, that solved my question.