HP X.25/9000 Programmer's Guide
34 Chapter3
Establishing and Terminating a Socket Connection
Connection Establishment for the Client Process
Connection Establishment for the Client
Process
This section discusses the system calls which the client process must
make to establish an SVC with a server process. There are two
mandatory steps:
1. Create a socket using the socket() call.
2. Make a connection request using the connect() call.
These steps are described below.
Creating a Socket
This is similar to the server process. The client process must also use the
socket() call to create a BSD IPC socket (communications endpoint).
The socket must be created before the connect() call is executed.
For a client, the socket() call and its parameters are identical to those
used by the server when it creates a socket. See “Syntax for socket()”
above.
The socket descriptor for the newly-created socket should be included in
the connect() system call and (after the connection is established) in all
subsequent data transmission.
Refer to the socket(2) entry in your man pages for more information.
Requesting a Connection
The client process requests a connection with the connect() call. The
server must be prepared to service a CALL INDICATION packet (with
an active listen socket) when connect() is executed.
The client process specifies the X.121 address, subaddress, and protocol
ID of the server with which it wants to establish an SVC using the
connect() call. HP does not provide a programmatic method for getting
this addressing information. It must be acquired from an authority
associated with the remote host. When a connect() system call is
issued, X.25 sends a CALL REQUEST packet with the specified
addressing information.
36960-90061.bk Page 34 Friday, November 10, 2000 3:42 PM










