SCTP Discussions

Text archives Help


RE: [SCTP-Discussion] Sctplib on Android


Chronological Thread 
  • From: Dag Ove <daggy2k AT hotmail.com>
  • To: Thomas Dreibholz <dreibh AT iem.uni-due.de>
  • Cc: Michael Tuexen <michael.tuexen AT micmac.franken.de>, "sctp-discussion AT sctp.de" <sctp-discussion AT sctp.de>
  • Subject: RE: [SCTP-Discussion] Sctplib on Android
  • Date: Fri, 28 Feb 2014 15:40:19 +0100
  • Importance: Normal
  • List-archive: <http://lists.franken.de/pipermail/sctp-discussion>
  • List-id: SCTP Discussions <sctp-discussion.sctp.de>

Hello again, 

I didn't manage to build the Socket API because of problems with PTHREAD 
(I found out that Android's Bionic C library comes with its own pthread implementation bundled in, 
which doesn't support pthread_cancel_enable, pthread_cancel_disable etc). 
So Socket API is out of the question without a major rebuild suited for Android.

I was hoping to call the sctplib directly without using the Socket APi. 
The problem is that sctp_initLibrary() returns an "adaption level error" because its
trying to open a raw socket, even if SCTP_OVER_UDP is defined.

I also looked at the build process and the corresponding files for libsctp in Firefox, and tried to build it on Android. 
It vent much better than the original usrsctp, but at a point i got the message from my Android NDK builder:

jni/netinet/sctp_asconf.c: In function 'sctp_process_asconf_set_primary':
jni/netinet/sctp_asconf.c:533:4: error: 'sctppcbinfo' undeclared (first use in this function)
jni/netinet/sctp_asconf.c: In function 'sctp_asconf_iterator_end':
jni/netinet/sctp_asconf.c:2274:3: error: 'sctppcbinfo' undeclared (first use in this function)
jni/netinet/sctp_asconf.c: In function 'sctp_addr_mgmt_ep_sa':
jni/netinet/sctp_asconf.c:3260:3: error: 'sctppcbinfo' undeclared (first use in this function)

and haven't managed to sort that out.

So I am not sure where to go from here; try to make sctplib work on Android, og try to 
make usrsctp on Android :)

Best Regards
Dag Ove,
Norway

> From: dreibh AT iem.uni-due.de
> To: daggy2k AT hotmail.com
> CC: michael.tuexen AT micmac.franken.de; sctp-discussion AT sctp.de
> Subject: Re: [SCTP-Discussion] Sctplib on Android
> Date: Thu, 27 Feb 2014 15:57:28 +0100
>
> Hi,
>
> Torsdag 27. februar 2014 14.12.41 skrev Dag Ove:
> > In the SCTP-API of sctplib: 6.4 ULP-to-SCTP6.4.1. sctp_initLibrary()"This
> > function will open raw sockets for capturing SCTP packets (IPv4 and if
> > possible, IPv6 too) from the network and initialize the timer list. It
> > needs to be called before any other functions of the libsctp-library are
> > called"
> > I interpret the above line that function sctp_library() needs to
> > be called regardless if using SCTP/IP or SCTP/UDP. Is it possible that if I
> > only intend to use SCTP/UDP I dont need to call sctp_initLibrary() ? The
> > context I want to use SCTP/UDP is as an example protocol for comparing it
> > to HTTP/TCP and plain UDP when exchanging SOAP messages/XML data with a Web
> > service server, so I simply want to use in a peer-to-peer system between
> > Android and a java server. It had a look at usrsctp, but I had more trouble
> > compiling the native C for Android, some classes/headers were missing
> > (ifaddrs.h, umem.h, pthread.h). I am not very familiar with freeBSD.
> > SCTPLIB was easier to compile and install on Android, but the problem
> > arised when" sctp_initLibrary()" calls "adl_init_adaptation_layer()", which
> > in turn calls "adl_open_sctp_socket()". I don't understand why the function
> > "adl_open_sctp_socket()" in adaptation.c tries to open a raw socket even if
> > SCTP_OVER_UDP is set (ref lines 571-585 in
> > https://github.com/dreibh/sctplib/blob/master/sctplib/sctp/adaptation.c) I
> > this is not an implementation error, I would be very interrested in what
> > functions to use to enable SCTP_over_UDP.
>
> "./configure --enable-sctp-over-udp" enables the SCTP over UDP mode.
>
> If you use the socket API, also use "./configure --enable-sctp-over-udp" when
> building the socketapi. With sctplib/socketapi, you have in fact the full API
> of a kernel implementation available. (In the FreeBSD-derived userland
> usrsctp, important things like poll()/select() are missing.)
>
> --
> Best regards / Mit freundlichen Grüßen / Med vennlig hilsen
>
> =======================================================================
> Thomas Dreibholz
>
> Simula Research Laboratory
> Simula Innovation AS, Network Systems Group
> Visiting address: Martin Linges vei 17, 1364 Fornebu, Norway
> Mailing address: P.O.Box 134, 1325 Lysaker, Norway
> -----------------------------------------------------------------------
> E-Mail: dreibh AT simula.no
> Homepage: http://simula.no/people/dreibh
> =======================================================================



Archive powered by MHonArc 2.6.19+.

Top of page