Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ select(3X25) — DECnet WAN Support 3.0A

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

select(2)

getdtablesize(2)

X25ReadData(3X25)

X25ReadDataQM(3X25)

X25ReadOOB(3X25)

X25SendData(3X25)

X25SendDataQM(3X25)

X25SendInterrupt(3X25)

X25WaitForEvent(3X25)

select(3X25)  —  Subroutines

Digital

NAME

select − Synchronous X.25 I/O multiplexing

LIBRARY

X.25 Library (libx25.a)

SYNOPSIS

#include <netx25/x25.h>
#include <sys/types.h>
#include <sys/time.h>

int select(
int nfds,
fd_set ∗readfds,
fd_set ∗writefds,
fd_set ∗exceptfds,
struct timeval ∗timeout) ;

void FD_CLR(
int fd,
fd_set ∗fdset);

void X25_FD_CLR(
int pd,
fd_set ∗fdset);

int FD_ISSET(
int fd,
fd_set ∗fdset);

int X25_FD_ISSET(
int pd,
fd_set ∗fdset);

void FD_SET(
int fd,
fd_set ∗fdset);

void X25_FD_SET(
int pd,
fd_set ∗fdset);

void FD_ZERO(
fd_set ∗fdset);

PARAMETERS

nfdsSpecifies the number of open objects that may be ready for reading or writing or that have exceptions pending.  The nfds parameter cannot be greater than FD_SETSIZE. 

readfdsPoints to an I/O descriptor set consisting of file descriptors and/or X.25 port (a port and listener is considered the same for simplicity reasons) descriptors opened for reading. When the readfds parameter is a null pointer, the read I/O descriptor set is ignored by the select() function. 

writefdsPoints to an I/O descriptor set consisting of file descriptors and/or X.25 port descriptors opened for writing. When the writefds parameter is a null pointer, the write I/O descriptor set is ignored. 

exceptfdsPoints to an I/O descriptor set consisting of file descriptors and/or X.25 port descriptors opened for reading or writing that have an exception pending.  When the exceptfds parameter is a null pointer, the exception I/O descriptor set is ignored. 

timeoutPoints to a type timeval structure that specifies the time to wait for a response to a select() function. When the timeout parameter has a nonzero value, the maximum time interval to wait for the select() function to complete is specified by values stored in space reserved by the type timeval structure pointed to by the timeout parameter. 

When the timeout parameter is a null pointer, the select() function blocks indefinitely. To poll, the timeout parameter should be specified as a nonzero value and point to a zero-valued timeval structure. 

fdSpecifies a file descriptor. 

pdSpecifies a X.25 port descriptor. 

fdsetPoints to an I/O descriptor set. 

DESCRIPTION

For a complete descripton of the select() function call and the macros (FD_CLR, FD_ISSET, FD_SET, FD_ZERO), read the select(2) man pages. 

After an I/O descriptor set is created, X.25 port descriptors may be added, deleted or tested with the following macros:

X25_FD_CLR(pd, &fdset)
Clears the I/O descriptor bit specified by the X.25 port descriptor pd in the I/O descriptor set addressed by fdset. 

X25_FD_ISSET(pd, &fdset)
Returns a nonzero value when the I/O descriptor bit for pd is included in the I/O descriptor set addressed by fdset.  Otherwise 0 (zero) is returned. 

X25_FD_SET(pd, &fdset)
Includes the particular I/O descriptor bit specified by pd in the I/O descriptor set addressed by fdset. 

The behavior of these macros is undefined when parameter pd has a value less than 0 (zero) or greater than or equal to FD_SETSIZE, which is normally at least equal to the maximum number of file descriptors plus X.25 port descriptors supported by the system. 

Any furthur information can be found in the select(2) man pages. 

RELATED INFORMATION

Functions: select(2), getdtablesize(2), X25ReadData(3X25), X25ReadDataQM(3X25), X25ReadOOB(3X25), X25SendData(3X25) X25SendDataQM(3X25), X25SendInterrupt(3X25), X25WaitForEvent(3X25)

X.25 for Digital UNIX − Programmer’s Reference Manual. 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026