calling ROHC library from java project in eclipse

Asked by johnny

Hello,
i am working on a project about SDN. i am using floodlight controller.
I want to compress all incoming packets on the controller.
I am able to get the packet content n eclipse (using java), how can i use the ROHC library to perform compression?
i saw that i can use JNI (Java Native Interface) to call a c library for example.

Is it possible with ROHC or hard ? do you have any suggestions?

Thank you for your time,
Johnny

Question information

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

(i know it isn't efficient but i'm required to do it)
Johnny

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

Hello,

> I am able to get the packet content n eclipse (using java), how can i use the ROHC
> library to perform compression? i saw that i can use JNI (Java Native Interface) to
> call a c library for example.
>
> Is it possible with ROHC or hard ? do you have any suggestions?

It should be definitely possible to use the ROHC library in a Java application with JNI. I didn't know JNI well enough however, so I cannot comment about the difficulty level.

In practice, I recommend you to use the main dev branch as a starting point. I recommend you also to work step by step. Start with the rohc_version() function, it is very basic, so it is the best target to test your JNI setup. Then continue with the compression API (compressor creation/deletion, packet compression). Finally, add the same functions for decompression API.

Having a Java binding for the ROHC library would be great, so don't hesitate to ask me questions if needed :)

Regards,
Didier

Can you help with this problem?

Provide an answer of your own, or ask johnny for more information if necessary.

To post a message you must log in.