36
Converting Sockets-Based Applications to Use
SDP
There are three ways to convert your sockets-based applications to use SDP instead of TCP, which are
described in the table below:
S
Table 6-1:
SDP Conversion Information
Conversion
Type
Method
Required Action
Explicit/
source code
Converts sockets to use
SDP based on application
source code.
This is useful when you
want full control from
your application when
using SDP.
1. Change your source code to use
AF_INET_SDP
instead of
AF_INET
when calling the socket ( ) system call.
•
AF_INET_SDP
is defined in
/usr/local/topspin/include/sdp_sock.h
Explicit/
application
Converts socket streams to
use SDP based on the
application environment.
1. Load the installed
libsdp_sys.so
library in one of the
following ways:
•
Edit the
LD_PRELOAD
environment variable. Set this to the
full path of the library you want to use and it will be
preloaded.
or
•
Add the full path of the library into
/etc/ld.so.preload
. The library will be preloaded
for every executable that is linked with
libc
.
2. Set the application environment to include AF_INET_SDP.
Example:
csh setenv AF_INET_SDP
sh AF_INET_SDP =1
export AF_INET_SDP