SCTP Discussions

Text archives Help


Re: [SCTP-Discussion] SCTP socket api


Chronological Thread 
  • From: Thomas Dreibholz <dreibh AT exp-math.uni-essen.de>
  • To: Francois Buntschu <francois.buntschu AT eif.ch>
  • Cc: discussion AT sctp.de
  • Subject: Re: [SCTP-Discussion] SCTP socket api
  • Date: Thu Sep 5 09:47:01 2002
  • List-id: SCTP Discussions <discussion.sctp.de>
  • Organization: University of Essen, Institute for Experimental Mathematics

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am Mittwoch, 4. September 2002 16:40 schrieben Sie:
> Hi,
>
> I'm trying to implement the sctp socket API on Linux and FreeBSD and I
> got some questions concerning the examples that are provided with the code.
>
> I got two machines connected through an IP router, and I installed the
> sctplib and sctp socket api on both.
>
> a. sctpterminal
>
> I started the sctpterminal on both side:
>
> ./sctpterminal 10.1.1.1:1234 -local=10.1.2.2
> ./sctpterminal 10.1.2.2:1234 -local=10.1.1.1

sctpterminal is only a client application, e.g. like Telnet. You have to
start a server to use sctpterminal. Example: ./sctpmultiserver. Now, you can
connect to this server via port 7 (echo), port 9 (discard), port 13 (daytime)
or port 19 (chargen), e.g. ./sctpterminal 10.1.1.1:7 or ./sctpterminal
hostname:daytime (sctpterminal automatically resolves service names to port
numbers and host names to addresses).


> b. sctptest

sctptest is only a demo to use the internal SCTPSocket and SCTPAssociation
classes. It should not be compiled by default and is useful for you
if you want to modify the internal SCTP socket classes. When you want to
program using the C++ socket API, use the class Socket, as it is done in
sctpterminal.cc and sctpmultiserver.cc. This class also supports other
protocols like TCP and UDP, you are not limited to SCTP. Furthermore, the
internal SCTP classes' APIs are subject to change when new features are added
to the sctplib.
To solve the socklen_t problem, you can add "#define HAVE_SOCKLEN_T" as first
line of your program or compile with -DHAVE_SOCKLEN_T (GNU C/C++). The best
solution is to add the program to the automake system by adding it to
Makefile.am. Then, config.h is included, which contains the definition
HAVE_SOCKLEN_T if your OS has already defined it. Otherwise, it is defined in
tdsystem.h.


Best regards
- --
=======================================================================
Dipl.-Inform. Thomas Dreibholz

University of Essen, Room ES210
Inst. for Experimental Mathematics Ellernstraße 29
Computer Networking Technology Group D-45326 Essen/Germany
- -----------------------------------------------------------------------
E-Mail:
dreibh AT exp-math.uni-essen.de
Homepage: http://www.exp-math.uni-essen.de/~dreibh
=======================================================================
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9dw2232BbsHYPLWURAqDgAKDVrv52l7nwEtbXjf9oXaKg5KROaACgrFak
A2ahxOm1D927pv07tB582BM=
=ZMFh
-----END PGP SIGNATURE-----




Archive powered by MHonArc 2.6.19+.

Top of page