← Back to team overview

rohc team mailing list archive

decompressor not working for me

 

Hi Friends,

I am trying to used the rohc source code in my application for uclinux.

I have done initialization of comp and decomp and crc tables as
described in the instructions.

I give 84 byte ip packet to rohc_compress function.
this works fine and does not crash and does shows rohc_size less than
84.

for testing purpose i called rohc_decompress function immediately after
the rohc compress but decompress function crashes the application when
it tries to read the IP-ID from the ROHC_packet given as input.

given below are the input ip packet to compressor and output of
compressor.
IP packet ---
45 0  0  54 0  0  40 0  40 1  85 42 c6 a8 14 a  c6 a8 14 c  8  0  12 a4
eb 2  0  0  40 7a b9 de 0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
0  0  0  0  0  0  0  0  0  0  0  0

Compressed ip packet - out of rohc_compress and input of rohc_decompress
fd 4  aa 40 1  c6 a8 14 a  c6 a8 14 c  0  40 0  0  a0 0  1  8  0  12 a4
eb 2  0  0  40 7a b9 de 0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
0  0  0  0  0  0  0  0  0  0  0  0


Given below is the code i use..
	rohc_size = rohc_compress(comp,
                                  pkt, DataLen,
                                  rohc_packet, MAX_SIZE);
	if(rohc_size <= 0)
	{
		printf("compression of packet failed\n");
                exit(1);
	}

        printf("ip_size = %d & rohc_size = %d\n",DataLen,rohc_size);

	ip_size = rohc_decompress(decomp,
	                          rohc_packet, 
                                  rohc_size,
	                          ip_packet, MAX_SIZE);
	if(ip_size <= 0)
	{
           if(ip_size == ROHC_FEEDBACK_ONLY)
	   {
	      /* the ROHC packet contained feedback only, so there is no
		     decompressed IP data */
                  printf("ROHC_FEEDBACK_ONLY\n");
		}
		else
		{
		  printf("decompression of packet failed\n");
		 /* manage the error here */
	    }
	}


The code crashes the application above give packet.

can you please advise me something?

Regards,
Harpreet

-- 
Software Engineer
1Spatial Australia
+61 3 52616840




Follow ups