HPlogo X25/9000: X.25/9000 Programmer's Guide > Chapter 1 Introduction to X.25 Programmatic Access

Using BSD IPC

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

BSD IPC is a set of program development tools for interprocess communication. HP's implementation of BSD IPC is a subset of the networking services originally developed by the University of California at Berkeley. Before you attempt to use BSD IPC, you must be familiar with the C programming language.

The BSD IPC facility allows you to create distributed applications that pass data between processes (on the same computer or on different computers connected by a network) without requiring a complete understanding of the many layers of networking protocols. This is accomplished by using a set of system calls. These system calls, when used in the correct sequence, allow you to create communication endpoints called sockets and transfer data between them.

You will also find a description here of the steps involved in establishing and using X.25 programmatic access through BSD IPC connections. This manual also describes the protocols you must use and how the BSD IPC system calls interact.

The library routines and system calls that you need to implement a BSD IPC application are described throughout this manual.

You need not specify any special libraries when compiling or linking to use BSD IPC over X.25. The all required library routines are in the common C library (libc.a). The compiler uses libc.a automatically.

Details of each system call are described in the Section 2 entries of your man pages.

Using BSD IPC and X.25 with the Client/Server Model

In order to run X.25 applications over BSD IPC, two separate application processes must be running on both ends of a VC. The following is a sequential synopsis of BSD/X.25 communications:

  1. The client process requests a connection by sending a CALL REQUEST packet.

  2. The server process, receives the CALL INDICATION packet and accepts it by sending a CALL ACCEPTED packet.

    The server process:

    1. creates a socket, binds an address or range of addresses to it,

    2. sets up a listen queue for receiving connection requests,

    3. and then passively waits for connection requests until they arrive

    When a request arrives the server process can either accept or reject the connection based on the information contained in the request.

  3. The client process creates a socket and requests a connection to the remote server process, using as a destination one of the addresses to which the server has bound its socket.

Once the server process accepts a client process's request and a connection is established, full-duplex (two-way) communication can occur between the two sockets; the two processes are then peers and can exchange data as equals.