10-24-2013, 05:22 AM | #1 |
Evangelist
Posts: 404
Karma: 2200000
Join Date: May 2012
Device: kt
|
Openlipc
Being fed up with executing lipc files through exec calls from my c programs I wrote a stub for openlipc.h. A header for liblipc. Now it will be possible to call some lipc functions directly from c programs, like setting some lipc properties, reading them or sending lipc events.
As a POC I also recreated lipc-set-prop, lipc-get-prop and lipc-send-event programs. These are not exact copies, I skipped some params checking, multiple tries to send event, etc. I just wanted to use all the lipc functions in these examples, so that it would be clear how to use them. You will find source code on my github. I am also attaching compiled binaries. |
10-24-2013, 06:11 AM | #2 |
Guru
Posts: 608
Karma: 1588610
Join Date: Jan 2012
Device: Kindle Scribe
|
Lets see... how tough would a python binding be...
|
Advert | |
|
10-24-2013, 06:35 AM | #3 |
Wizard
Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
|
That's great, thank you, baf! I think we might steal from that header file for use in KoReader in a LuaJIT FFI binding.
|
10-24-2013, 06:38 AM | #4 |
Guru
Posts: 608
Karma: 1588610
Join Date: Jan 2012
Device: Kindle Scribe
|
Swig rocks. PULL REQUEST AWAY!
|
10-24-2013, 07:00 AM | #5 |
Guru
Posts: 608
Karma: 1588610
Join Date: Jan 2012
Device: Kindle Scribe
|
Again, how the heck do we compile this again? LD complains about not finding -llipc. Do I have to get some other stuff off the kindle? Maybe pull and .so or two?
P.S: I again said again twice, again. |
Advert | |
|
10-24-2013, 07:05 AM | #6 |
Wizard
Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
|
Where are you compiling? Crosscompiling, perhaps? Then you would need to provide the library to your crosscompiler to link against it. When not in a standard library search path of ld, you might need to give the -L parameter to point to the directory where the .so can be found. Note that you might need the .so plus some of the symlinks pointing to it, depending on its SONAME (an ELF file property).
|
10-24-2013, 07:30 AM | #7 |
Evangelist
Posts: 404
Karma: 2200000
Join Date: May 2012
Device: kt
|
|
10-24-2013, 07:31 AM | #8 |
Evangelist
Posts: 404
Karma: 2200000
Join Date: May 2012
Device: kt
|
|
10-24-2013, 08:32 AM | #9 |
THE NOOB
Posts: 701
Karma: 1545649
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
|
It sounds really interesting...I'll check the source asap (I'm a bit busy ATM...).
In the meanwhile....could it be useful for WAFs? Maybe setting up some events before running a WAF than, from inside the WAF, trigger those events... |
10-24-2013, 12:28 PM | #10 | |
Guru
Posts: 608
Karma: 1588610
Join Date: Jan 2012
Device: Kindle Scribe
|
Quote:
I need to cross compile the app using a cross compiler and have the .so in the linking step. Okay. Back to cross compiling. BTW can I use tcc? |
|
10-24-2013, 12:41 PM | #11 |
BLAM!
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Whee! Awesome .
|
10-25-2013, 02:04 AM | #12 |
Linux devotee
Posts: 598
Karma: 2069047
Join Date: Feb 2011
Device: Kindle 3, Kindle 4B, Kindle PW2
|
I wonder what actually is lipc ?
Is it anything more than plain DBus ? |
10-25-2013, 03:21 AM | #13 |
Evangelist
Posts: 404
Karma: 2200000
Join Date: May 2012
Device: kt
|
|
10-25-2013, 03:23 AM | #14 |
Evangelist
Posts: 404
Karma: 2200000
Join Date: May 2012
Device: kt
|
This is rather meant as a shortcut for developers writing their programs in c/c++.
|
10-25-2013, 03:24 AM | #15 |
Evangelist
Posts: 404
Karma: 2200000
Join Date: May 2012
Device: kt
|
|