SCTP protocol support in android

How can I use SCTP in Android?

I already know that Android systems do not support SCTP by default, however it is possible to enable it by inserting the SCTP kernel module or rebuilding the kernel with SCTP enabled in the module configuration.

I need some understanding of this problem. Is it possible? How to make Android protocol support? How to build a kernel module and insert it correctly? If we can get the system to support it, how can we use the protocol? Does the Java API for android support SCTP?

+7
source share
1 answer

Going up to him with a module is the right way. To answer your questions:

  • SCTP is already provided as a kernel module in the Linux source tree - "CONFIG_IP_SCTP = m" will enable this module. And you can change this to "y" for a hard link, although this is probably not possible, since for this you will need to rebuild the entire kernel.

  • The module must be built on the kernel version. Thus, basically for each provider, you need to get the kernel source data (doable), and then compile it against it.

To use: In user mode - create a socket by calling s = socket (AF_INET [6], SOCK_STREAM, IPPROTO_SCTP); From now on, socket APIs work just the same, with a few exceptions (namely setsockopt, which is special for the protocol type).

From Java - it actually supports the protocol in its latest incarnations (JDK7 with milestone 3), but Java support does not mean that Dalvik ("java vm" for Android). Although Android has SCTP ready-made support, it is not yet in Dalvik (at least not in 4.2). However, you could create a Java class, as in a package that would wrap your own library with SCTP calls. This is a bit more complicated on Android due to NET permissions, but still manageable (from experience).

+8
source

All Articles