Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pkon(2) [v7 man page]

PKON(2) 							System Calls Manual							   PKON(2)

NAME
pkon, pkoff - establish packet protocol SYNOPSIS
pkon(fd, size) pkoff(fd) DESCRIPTION
Pkon establishes packet protocol (see pk(4)) on the open character special file whose file descriptor is fd. Size is a desired packet size, a power of 2 in the range 32<=size<=4096. The size is negotiated with a remote packet driver, and a possibly smaller actual packet size is returned. An asynchronous line used for packet communication should be in raw mode; see tty(4). Pkoff turns off the packet driver on the channel whose file descriptor is fd. SEE ALSO
pk(4), pkopen(3), tty(4), signal(2) DIAGNOSTICS
Pkon returns -1 if fd does not describe an open file, or if packet communication cannot be established. Pkoff returns -1 for an unknown file descriptor. Writing on a packet driver link that has been shut down by close or pkoff at the other end raises signal SIGPIPE in the writing process. PKON(2)

Check Out this Related Man Page

PKOPEN(3)						     Library Functions Manual							 PKOPEN(3)

NAME
pkopen, pkclose, pkread, pkwrite, pkfail - packet driver simulator SYNOPSIS
char *pkopen(fd) pkclose(ptr) char *ptr; pkread(ptr, buffer, count) char *ptr, *buffer; pkwrite(ptr, buffer, count) char *ptr, *buffer; pkfail() DESCRIPTION
These routines are a user-level implementation of the full-duplex end-to-end communication protocol described in pk(4). If fd is a file descriptor open for reading and writing, pkopen carries out the initial synchronization and returns an identifying pointer. The pointer is used as the first parameter to pkread, pkwrite, and pkclose. Pkread, pkwrite and pkclose behave analogously to read, write and close(2). However, a write of zero bytes is meaningful and will produce a corresponding read of zero bytes. SEE ALSO
pk(4), pkon(2) DIAGNOSTICS
Pkfail is called upon persistent breakdown of communication. Pkfail must be supplied by the user. Pkopen returns a null (0) pointer if packet protocol can not be established. Pkread returns -1 on end of file, 0 in correspondence with a 0-length write. BUGS
This simulation of pk(4) leaves something to be desired in needing special read and write routines, and in not being inheritable across calls of exec(2). Its prime use is on systems that lack pk. These functions use alarm(2); simultaneous use of alarm for other puposes may cause trouble. deprecated PKOPEN(3)
Man Page