bug when use "-o"command

Asked by qingbaibai

hello,

I test the rohc library. I input the command "test -c rohc.pcap smallcid source.pcap" and I get the right result. But when I input the command "test -o ofilename.pcap -c rohc.pcap smallcid source.pcap". Bug appears as follow:

                </log>
                <status>ok</status>
        </shutdown>

</test>

D:\Program Files\SlickEditV16.0.2\project\rohc>Debug\rohc -o d:\ofilename.pcap -
c d:\rohc.pcap smallcid d:\source.pcap
<?xml version="1.0" encoding="ISO-8859-15"?>
<test>
        <startup>
                <log>
[../rohc-1.3.1/src/comp/rohc_comp.c:84 rohc_alloc_compressor()] creating compres
sor
[../rohc-1.3.1/src/comp/rohc_comp.c:84 rohc_alloc_compressor()] creating compres
sor
                </log>
                <status>ok</status>
        </startup>

        <packet id="1" comp="1">
                <compression>
                        <log>
[../rohc-1.3.1/src/comp/rohc_comp.c:192 rohc_compress()] size of IP packet = 92
bytes
[../rohc-1.3.1/src/comp/rohc_comp.c:218 rohc_compress()] IP protocol = 17
[../rohc-1.3.1/src/comp/rohc_comp.c:979 c_get_profile_from_packet()] UDP port =
0x139c (5020)
[../rohc-1.3.1/src/comp/rohc_comp.c:227 rohc_compress()] using profile 'RTP / Co
mpressor' (0x0001)
[../rohc-1.3.1/src/comp/rohc_comp.c:1207 c_find_context()] no context was found
[../rohc-1.3.1/src/comp/rohc_comp.c:1121 c_create_context()] take the first unus
ed context (CID = 0)
[../rohc-1.3.1/src/comp/rohc_comp.c:1161 c_create_context()] context (CID = 0) c
reated (num_used = 1)
[../rohc-1.3.1/src/comp/rohc_comp.c:1388 c_piggyback_get()] add 0 byte(s) of fee
dback data
[../rohc-1.3.1/src/comp/rohc_comp.c:293 rohc_compress()] compress the packet #1
[../rohc-1.3.1/src/common/ts_sc_comp.c:89 c_add_ts()] Timestamp = 244480
[../rohc-1.3.1/src/common/ts_sc_comp.c:105 c_add_ts()] state INIT_TS
[../rohc-1.3.1/src/comp/c_generic.c:837 c_generic_encode()] SN = 60813
[../rohc-1.3.1/src/comp/c_generic.c:6318 changed_dynamic_both_hdr()] check for c
hanged fields in the outer IP header
[../rohc-1.3.1/src/comp/c_generic.c:860 c_generic_encode()] send_static = 0, sen
d_dynamic = 0
[../rohc-1.3.1/src/comp/c_generic.c:868 c_generic_encode()] ip_id = 0x02fc, cont
ext_sn = 60813
[../rohc-1.3.1/src/comp/c_generic.c:2351 update_variables()] ip_id delta = 0xfff
f156f / 4294907247
[../rohc-1.3.1/src/comp/c_generic.c:2352 update_variables()] ip_id bits = -1
[../rohc-1.3.1/src/comp/c_generic.c:2362 update_variables()] sn bits=-1
[../rohc-1.3.1/src/comp/c_generic.c:2705 decide_packet()] IR state
[../rohc-1.3.1/src/comp/c_generic.c:2939 code_IR_packet()] code IR packet (CID =
 0)
[../rohc-1.3.1/src/comp/cid.c:74 code_cid_values()] CID = 0 => no add-CID
[../rohc-1.3.1/src/comp/c_generic.c:2956 code_IR_packet()] type of packet + D fl
ag = 0xfd
[../rohc-1.3.1/src/comp/c_generic.c:2960 code_IR_packet()] profile ID = 0x01
[../rohc-1.3.1/src/comp/c_generic.c:2966 code_IR_packet()] CRC = 0x00 for CRC ca
lculation
[../rohc-1.3.1/src/comp/c_generic.c:3231 code_ipv4_static_part()] version = 0x40

[../rohc-1.3.1/src/comp/c_generic.c:3236 code_ipv4_static_part()] protocol = 0x1
1
[../rohc-1.3.1/src/comp/c_generic.c:3246 code_ipv4_static_part()] src addr = c0
a8 11 03
[../rohc-1.3.1/src/comp/c_generic.c:3254 code_ipv4_static_part()] dst addr = c0
a8 11 06
[../rohc-1.3.1/src/comp/c_udp.c:468 udp_code_static_udp_part()] UDP source port
= 0x8813
[../rohc-1.3.1/src/comp/c_udp.c:473 udp_code_static_udp_part()] UDP dest port =
0x9c13
[../rohc-1.3.1/src/comp/c_rtp.c:452 rtp_code_static_rtp_part()] RTP SSRC = 0x439
66fc2
[../rohc-1.3.1/src/comp/c_generic.c:3445 code_ipv4_dynamic_part()] TOS = 0x10, T
TL = 0x40, IP-ID = 0xfc02, df_rnd_nbo = 0xa0 (DF = 1, RND = 0, NBO = 1)
[../rohc-1.3.1/src/comp/c_rtp.c:520 rtp_code_dynamic_rtp_part()] UDP checksum =
0xb3a3
[../rohc-1.3.1/src/comp/c_rtp.c:540 rtp_code_dynamic_rtp_part()] part 2 = 0x80
[../rohc-1.3.1/src/comp/c_rtp.c:548 rtp_code_dynamic_rtp_part()] part 3 = 0x72
[../rohc-1.3.1/src/comp/c_rtp.c:554 rtp_code_dynamic_rtp_part()] part 4 = 0xed 0
x8d
[../rohc-1.3.1/src/comp/c_rtp.c:560 rtp_code_dynamic_rtp_part()] part 5 = 0x00 0
x03 0xbb 0x00
[../rohc-1.3.1/src/comp/c_generic.c:3032 code_IR_packet()] CRC (header length =
38, crc = 0xdd)
[../rohc-1.3.1/src/comp/rohc_comp.c:368 rohc_compress()] ROHC size = 90 (feedbac
k = 0, header = 38, payload = 52), output buffer size = 5120
                        </log>
                        <status>ok</status>
                </compression>

                <rohc_comparison>
                        <log>
------------------------------ Compare ------------------------------
packets have different sizes (88 != 90), compare only the 88 first bytes
[0xfd] [0x01] #0x3a# [0x40] [0xfd] [0x01] #0xdd# [0x40]
[0x11] [0xc0] [0xa8] [0x11] [0x11] [0xc0] [0xa8] [0x11]
[0x03] [0xc0] [0xa8] [0x11] [0x03] [0xc0] [0xa8] [0x11]
[0x06] [0x13] #0x88# #0x13# [0x06] [0x13] #0x2f# #0x16#
[0x9c] [0xc2] [0x6f] [0x96] [0x9c] [0xc2] [0x6f] [0x96]
[0x43] [0x10] [0x40] [0x02] [0x43] [0x10] [0x40] [0x02]
[0xfc] [0xa0] #0xa3# #0xb3# [0xfc] [0xa0] #0x00# #0xa3#
#0x80# #0x72# #0xed# #0x8d# #0xb3# #0x80# #0x72# #0xed#
#0x00# #0x03# #0xbb# #0x00# #0x8d# #0x00# #0x03# #0xbb#
#0x2d# #0xae# #0x9f# #0xa0# #0x00# #0x00# #0x2d# #0xae#
#0x65# #0xbc# #0x5f# #0x63# #0x9f# #0xa0# #0x65# #0xbc#
#0x8e# #0xcc# #0xa2# #0xfc# #0x5f# #0x63# #0x8e# #0xcc#
#0x9d# #0xfb# #0x1d# #0xd1# #0xa2# #0xfc# #0x9d# #0xfb#
#0xd1# #0x96# #0x63# #0x9e# #0x1d# #0xd1# #0xd1# #0x96#
#0xa0# #0x67# #0x2d# #0xc2# #0x63# #0x9e# #0xa0# #0x67#
#0x51# #0xcb# #0xf2# #0x41# #0x2d# #0xc2# #0x51# #0xcb#
#0x92# #0xf3# #0x9e# #0xc1# #0xf2# #0x41# #0x92# #0xf3#
#0x67# #0x5e# #0xa5# #0xc3# #0x9e# #0xc1# #0x67# #0x5e#
#0x65# #0xfa# #0x3b# #0x90# #0xa5# #0xc3# #0x65# #0xfa#
#0x84# #0x2d# #0x61# #0xc5# #0x3b# #0x90# #0x84# #0x2d#
#0xad# #0x92# #0x5d# #0xb1# #0x61# #0xc5# #0xad# #0x92#
#0x64# #0xb5# #0xb3# #0x17# #0x5d# #0xb1# #0x64# #0xb5#
----------------------- packets are different -----------------------
                        </log>
                        <status>failed</status>
                </rohc_comparison>

                <decompression>
                        <log>
[../rohc-1.3.1/src/decomp/rohc_decomp.c:432 rohc_decompress()] decompress the pa
cket #1
[../rohc-1.3.1/src/decomp/rohc_decomp.c:587 d_decode_feedback_first()] skip 0 by
te(s) of padding
[../rohc-1.3.1/src/decomp/rohc_decomp.c:929 rohc_decomp_decode_cid()] no add-CID
 found, CID defaults to 0
[../rohc-1.3.1/src/decomp/rohc_decomp.c:670 d_decode_header()] ROHC packet is an
 IR packet
[../rohc-1.3.1/src/decomp/rohc_decomp.c:681 d_decode_header()] profile 0x0001 fo
und in IR packet
[../rohc-1.3.1/src/decomp/rohc_decomp.c:707 d_decode_header()] context with CID
0 either does not already exist or does not match profile 0x0001 found in IR pac
ket
[../rohc-1.3.1/src/decomp/d_generic.c:2301 d_generic_detect_ir_size()] dynamic c
hain detected
[../rohc-1.3.1/src/decomp/d_generic.c:2352 d_generic_detect_ir_size()] length of
 fields 2 + 4-7 = 19 bytes
[../rohc-1.3.1/src/decomp/d_rtp.c:326 rtp_detect_ir_size()] RX flag not set
[../rohc-1.3.1/src/decomp/rohc_decomp.c:1056 rohc_ir_packet_crc_ok()] size of IR
 packet header : 38
[ERROR] [../rohc-1.3.1/src/decomp/rohc_decomp.c:1069 rohc_ir_packet_crc_ok()] CR
C failed (real = 0xdd, calc = 0x92, profile_id = 1, largecid = 0, addcidUsed = 0
, ir_size = 38)
[ERROR] [../rohc-1.3.1/src/decomp/rohc_decomp.c:722 d_decode_header()] IR packet
 has incorrect CRC, abort all changes
[../rohc-1.3.1/src/decomp/rohc_decomp.c:444 rohc_decompress()] state in decompre
ssor = 1
[../rohc-1.3.1/src/decomp/rohc_decomp.c:503 rohc_decompress()] feedback curr 100

[../rohc-1.3.1/src/decomp/rohc_decomp.c:504 rohc_decompress()] feedback max 300
                        </log>
                        <status>failed</status>
                </decompression>

                <ip_comparison>
                        <log>
Decompression failed, cannot compare the packets!
                        </log>
                        <status>failed</status>
                </ip_comparison>
        </packet>

        <summary>
                <packets_processed>2</packets_processed>
                <compression_failed>0</compression_failed>
                <decompression_failed>1</decompression_failed>
                <matches>0</matches>
        </summary>

        <infos>
                <instance>
                        <creator>LULEA/SMD143/2003</creator>
                        <version>1.0</version>
                        <status>enabled</status>
                        <flows>1</flows>
                        <packets>1</packets>
                        <compression_ratio>97%</compression_ratio>
                        <max_cid>15</max_cid>
                        <mrru>0</mrru>
                        <large_cid>no</large_cid>
                        <connection_type>3</connection_type>
                        <feedback_freq>7</feedback_freq>

                        <profiles>
                                <profile id="1" name="RTP / Compressor" version=
"alpha" active="yes" />
                                <profile id="2" name="UDP / Compressor" version=
"1.0b" active="yes" />
                                <profile id="8" name="UDP-Lite / Compressor" ver
sion="1.0b" active="yes" />
                                <profile id="4" name="IP / Compressor" version="
1.0b" active="yes" />
                                <profile id="0" name="Uncompressed / Compressor"
 version="1.0b" active="yes" />
                        </profiles>

                        <context type="compressor" cid="0">
                                <cid_state>USED</cid_state>
                                <state>IR</state>
                                <mode>U-mode</mode>
                                <profile>RTP / Compressor</profile>
                                <ratio>
                                        <all_packets>97%</all_packets>
                                        <all_headers>95%</all_headers>
                                        <last_16_packets>97%</last_16_packets>
                                        <last_16_headers>95%</last_16_headers>
                                </ratio>
                                <mean>
                                        <all_packets>90</all_packets>
                                        <all_headers>38</all_headers>
                                        <last_16_packets>90</last_16_packets>
                                        <last_16_headers>38</last_16_headers>
                                </mean>
                                <activation_time>0</activation_time>
                                <idle_time>0</idle_time>
                                <packets sent_total="1" sent_ir="1" sent_irdyn="
0" recv_feedback="0" />
                        </context>
                </instance>

                <instance>
                        <creator>LULEA/SMD143/2003</creator>
                        <version>1.0</version>
                        <status>enabled</status>
                        <flows>0</flows>
                        <packets>0</packets>
                        <compression_ratio>0%</compression_ratio>
                        <max_cid>15</max_cid>
                        <mrru>0</mrru>
                        <large_cid>no</large_cid>
                        <connection_type>3</connection_type>
                        <feedback_freq>7</feedback_freq>

                        <profiles>
                                <profile id="1" name="RTP / Compressor" version=
"alpha" active="yes" />
                                <profile id="2" name="UDP / Compressor" version=
"1.0b" active="yes" />
                                <profile id="8" name="UDP-Lite / Compressor" ver
sion="1.0b" active="yes" />
                                <profile id="4" name="IP / Compressor" version="
1.0b" active="yes" />
                                <profile id="0" name="Uncompressed / Compressor"
 version="1.0b" active="yes" />
                        </profiles>
                </instance>

                <instance>
                        <profiles>
                                <profile id="0" name="Uncompressed / Decompresso
r" version="1.0" active="yes" />
                                <profile id="2" name="UDP / Decompressor" versio
n="1.0" active="yes" />
                                <profile id="4" name="IP / Decompressor" version
="1.0" active="yes" />
                                <profile id="8" name="UDP-Lite / Decompressor" v
ersion="1.0" active="yes" />
                                <profile id="1" name="RTP / Decompressor" versio
n="beta" active="yes" />
                        </profiles>
                </instance>

                <instance>
                        <profiles>
                                <profile id="0" name="Uncompressed / Decompresso
r" version="1.0" active="yes" />
                                <profile id="2" name="UDP / Decompressor" versio
n="1.0" active="yes" />
                                <profile id="4" name="IP / Decompressor" version
="1.0" active="yes" />
                                <profile id="8" name="UDP-Lite / Decompressor" v
ersion="1.0" active="yes" />
                                <profile id="1" name="RTP / Decompressor" versio
n="beta" active="yes" />
                        </profiles>
                </instance>

        </infos>

        <shutdown>
                <log>

[../rohc-1.3.1/src/comp/rohc_comp.c:141 rohc_free_compressor()] free contexts
[../rohc-1.3.1/src/comp/rohc_comp.c:145 rohc_free_compressor()] free feedback bu
ffer
[../rohc-1.3.1/src/comp/rohc_comp.c:141 rohc_free_compressor()] free contexts
[../rohc-1.3.1/src/comp/rohc_comp.c:145 rohc_free_compressor()] free feedback bu
ffer
                </log>
                <status>ok</status>
        </shutdown>

</test>

Question information

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

Hello,

It seems as if you ran that test under Windows. I'm not able to run any test under Windows. Could you try to run the same test under Linux? It would be interesting to know whether the problem is global or Windows-only. In the former case, I could investigate it under Linux.

Regards,
Didier

Revision history for this message
qingbaibai (sunqing-cztz) said :
#2

hello,
I try to test it in linux. But in fact I haven't learn how to write shell. And I try to modify the rohc-1.3.1/test/report/samples/test_ipv4_udp_rtp_voip.sh according to its original grammar. It can be tested successfully. I post the pcap files and the shell cause I am not sure whether I modify the shell in the right way.
Regards,qingbaibai

> To: <email address hidden>
> From: <email address hidden>
> Date: Sun, 11 Dec 2011 15:50:48 +0000
> Subject: Re: [Rohc] [Question #181472]: bug when use "-o"command
>
> Question #181472 on rohc changed:
> https://answers.launchpad.net/rohc/+question/181472
>
> Status: Open => Needs information
>
> Didier Barvaux requested more information:
> Hello,
>
> It seems as if you ran that test under Windows. I'm not able to run any
> test under Windows. Could you try to run the same test under Linux? It
> would be interesting to know whether the problem is global or Windows-
> only. In the former case, I could investigate it under Linux.
>
> 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 address hidden>
> Unsubscribe : https://launchpad.net/~rohc
> More help : https://help.launchpad.net/ListHelp

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

Hello,

I didn't find your attachements. I think your email attachements are dropped by the "question/answer" mechanism of Launchpad. If they are not too large, try sending your files directly to the mailing list. See http://launchpad.net/~rohc/+join to subscribe to the ML.

Regards,
Didier

Revision history for this message
qingbaibai (sunqing-cztz) said :
#4

hello,
I'm sorry. I don't know how to send my files directly to the mailing list. Please give me an available email address. Thank you.
Regards,qingbaibai

> To: <email address hidden>
> From: <email address hidden>
> Subject: Re: [Question #181472]: bug when use "-o"command
> Date: Tue, 13 Dec 2011 09:01:13 +0000
>
> Your question #181472 on rohc changed:
> https://answers.launchpad.net/rohc/+question/181472
>
> Status: Open => Needs information
>
> Didier Barvaux requested more information:
> Hello,
>
> I didn't find your attachements. I think your email attachements are
> dropped by the "question/answer" mechanism of Launchpad. If they are not
> too large, try sending your files directly to the mailing list. See
> http://launchpad.net/~rohc/+join to subscribe to the ML.
>
> Regards,
> Didier
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/rohc/+question/181472
>
> You received this question notification because you asked the question.

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

Hello,

Please read the wikipedia's page to learn about mailing lists: http://en.wikipedia.org/wiki/Electronic_mailing_list

Then, subscribe to the mailing list. Follow instructions on http://launchpad.net/~rohc/+join

Finally, send your email to <email address hidden> with a clear subject and introduction. The emails sent to this special email address are received by all the people that subscribed to the mailing list (42 persons at the moment). Previous emails are archived and may be found at https://lists.launchpad.net/rohc/

Please avoid large attachements. Refer to question #180689 to reduce the attachement's size if needed.

Regards,
Didier

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

Sorry, here is the direct link to question #180689: https://answers.launchpad.net/rohc/+question/180689

Revision history for this message
qingbaibai (sunqing-cztz) said :
#7

hello,

I modified the shell "test_ipv4_udp_rtp_voip_smallcid.sh" as followed.
SCRIPT="$0"
VERBOSE="$1"
if [ "x$MAKELEVEL" != "x" ] ; then
 BASEDIR="${srcdir}"
 APP="./test"
else
 BASEDIR=$( dirname "${SCRIPT}" )
 APP="${BASEDIR}/test"
fi

# extract the CID type and capture name from the name of the script
CID_TYPE=$( echo "${SCRIPT}" | \
            sed -e 's#^.*/test_\(.\+\)_\(.\+\)\.sh#\2#' )
STREAM=$( echo "${SCRIPT}" | \
          sed -e 's#^.*/test_\(.\+\)_\(.\+\)\.sh#\1#' | \
          sed -e 's#_#/#g' )
CAPTURE_SOURCE="${BASEDIR}/report/samples/${STREAM}/source.pcap"
CAPTURE_COMPARE="${BASEDIR}/report/samples/${STREAM}/rohc_${CID_TYPE}.pcap"
CAPTURE_OFILE="${BASEDIR}/report/samples/${STREAM}/ofile.pcap"

# check that capture names are not empty
if [ -z "${CAPTURE_SOURCE}" ] ; then
 echo "empty source capture name, please do not run $0 directly!"
 exit 1
fi
if [ -z "${CAPTURE_COMPARE}" ] ; then
 echo "empty compare capture name, please do not run $0 directly!"
 exit 1
fi
if [ -z "${CAPTURE_OFILE}" ] ; then
 echo "empty compare capture name, please do not run $0 directly!"
 exit 1
fi
CMD="${APP} -o ${CAPTURE_OFILE} -c ${CAPTURE_COMPARE} ${CID_TYPE} ${CAPTURE_SOURCE}"

# run in verbose mode or quiet mode
if [ "${VERBOSE}" = "verbose" ] ; then
 ${CMD} || exit $?
else
 ${CMD} > /dev/null 2>&1 || exit $?
fi

If I modified it in right way, the rohc packets could be dumped into a pcap file. And there is no bug in decompression.

Regards,
qingbaibai

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

Hello,

Your changes are fine. Was the test successful on a Linux system with these changes and your PCAP capture?

Regards,
Didier

Revision history for this message
qingbaibai (sunqing-cztz) said :
#9

Hello,

The test was successful on a linux system. I changed test.c. I didn't output ROHC packets. I output decompressed packed and the test was successful.

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

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

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

Mark as solved. Re-open if needed.