3 Using SDP
Integrating applications with SDP using libsdp.so library
The dynamically linked libsdp.so library is used for transparent integration of applications with SDP. The library is preloaded and hence, takes precedence over the libc library for certain socket calls. Therefore, the libsdp.so library can transparently replace the TCP socket family with SDP socket calls.
Using a configuration file (/etc/libsdp.conf), the system administrator can set up the policy that selects the type of socket to be used. The libsdp.so library also has the option to allow server sockets to listen on both SDP and TCP interfaces. The various configurations with SDP and TCP sockets are explained in the /etc/libsdp.conf file.
Using socket address family control
The socket control statements allow the user to specify when the libsdp.so library replaces AF_INET/SOCK_STREAM sockets with AF_SDP/SOCK_STREAM sockets. To apply a control statement, all its sub expressions must match the rule.
The generic statement that controls the type of sockets to be opened is
use
The
sdp specifies when an SDP protocol can be used in the control statement
tcp specifies when an SDP protocol cannot be used in the control statement
both specifies when SDP and AF_INET sockets can be used in the control statement
NOTE: The address family both functions differently for server and client roles. If the server role is used, the server listens on both sdp and tcp. If the client role is used, the connect prefers using sdp, but opts for tcp if the sdp connection fails.
The <role> field can be one of the following:
server or listen defines the listening port address family
client or connect defines the connected port address family
The
The <address*> field can be either the local address the server is bind to or the remote server address to which the client is connected. Syntax for address matching is
<IPv4>[/<prefix_length>]*
IP address can be IPv4 in
Prefix_length refers to the number of bits to match. A prefix_length of 16 matches the subnet mask 255.255.0.0 in IPv4. A prefix_length of 32 bits for IPv4 is required to match the exact IP address.
The <port range> is
If a match does not exist, the libsdp library uses the address family both by default. For example,
Use SDP by clients connecting to machines that belong to subnet 192.168.1.*
6Using SDP