guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Initial SCTP support for the upcoming 1.6.5 release


From: Michael Tuexen
Subject: Re: Initial SCTP support for the upcoming 1.6.5 release
Date: Tue, 24 Aug 2004 19:35:26 +0200

Marius,

see my comments in-line.

Best regards
Michael

On Aug 24, 2004, at 4:15 PM, Marius Vollmer wrote:


As long as SCTP needs an external library and is not supported
directly by libc, we think it is better to not include it in
guile-core.

Hmm. This might be a bit special. The functions socket, send, recv
and so on are simply extended to support SCTP. New functions will
not become part of libc. All SCTP implementations (well, the
Linux Kernel implementation, the BSD kernel implementation and
the Solaris implementation) provide the sctp_* functions in a
libsctp library. This is similar to Solaris, for example, where
you need to link against a socket library to use socket functions.
So they is also not part of libc. But, yes, networking is not core
functionality, it is only needed by some, not by all, programs.

I think I have misunderstood the nature of SCTP.  Although one can
argue that networking is not needed by all programs, we nevertheless
do provide sockets in guile-core.  So, from the perspective of Guile,
networking clearly is core functionality, right now.

That is correct and on some platforms (Solaris, for example) you
have to link against some additional libraries.
I thought SCTP was a kind of additional protocol for a specific
purpose, like maybe FTP or HTTP.  I don't think we should have support
for protocols like this in guile-core.  (I did understand that SCTP is
on the same layer as TCP and UDP...)
Possibly I was not clear enough. Yes, SCTP is at the same layer as TCP
or UDP, it is implemented in the kernel and accessible via the normal
socket API. You can used all socket function with SCTP after getting
the socket via
s = socket(AF_INET, SOCK_STREAM, IPPROTO_SCTP)
(in this case it can be used similar to TCP)
or
s = socket(AF_INET, SOCK_SEQPACKET, IPPROTO_SCTP)
(in which case it can be used similar to UDP)
Since SCTP support some additional features compared to TCP and UDP
not everything could be mapped in an appropriate way to the
existing API, such that we defined some new functions, named sctp_*
(sctp_connectx, sctp_bindx, ...). These are normally available
in a special library depending on the system (some define these
functions using special sysctl, some define by using other general
socket API functions).

But as you say, SCTP seems different.  The socket function directly
understands the request for SOCK_SEQPACKET (which will use SCTP,
right?) and you can use the read/write syscalls to use such a socket.
Yes you are right. You can port (some) application running over
TCP to SCTP by just replacing
s = socket(AF_INET, SOCK_STREAM, 0)
by
s = socket(AF_INET, SOCK_STREAM, IPPROTO_SCTP)
or a UDP based application from
s = socket(AF_INET, SOCK_DGRAM, 0)
by
s = socket(AF_INET, SOCK_SEQPACKET, IPPROTO_SCTP)

SCTP is a transport layer which is used for transporting telephony
signalling (SS7) over IP. It will also be used in other areas, but
I have developed test tools (a tool which is used to test SS7/IP
and SCTP implementations). The tests are implemented in scheme
and guile is extended to support SCTP. These tests will be published
(as open source) soon, and I found guile to be a very good tool
for this application. To have an easy way for people using these
test tools I need an defined procedure to get an SCTP enabled guile
on different hosts (Linux, BSD, Solaris, Mac OS X). I got the
solution as an extension now working but it would be simpler
(from the user perspective or the code perspective) to
have the SCTP functions included in socket.c.
The two functions I need are the send/receive functions which
allow to access an additional SCTP protocol element, which describes
the upper layer. That is why I can not use the provided send/receive
functions. sendmsg and recvmsg would work with extensive use of
CMG_HDRs, but guile does not provide an API for these functions
(and providing them is not that simple, because they use very
generic stuff).

Is that correct?
Yes. I hope it is a bit clearer now. If the sctp_* calls could be
included in socket.c would be great. But if that is not possible,
I have a now way of getting this functionality using the dynamic library.

Let me know what you think or if you have any questions.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]