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

PK(4)							     Kernel Interfaces Manual							     PK(4)

NAME
pk - packet driver DESCRIPTION
The packet driver implements a full-duplex end-to-end flow control strategy for machine-to-machine communication. Packet driver protocol is established by calling pkon(2) with a character device file descriptor and a desired packet size in bytes. The packet size must be a power of 2, 32<=size<=4096. The file descriptor must represent an 8-bit data path. This is normally obtained by setting the device in raw mode (see ioctl(2)). The actual packet size, which may be smaller than the desired packet size, is arrived at by negotiation with the packet driver at the remote end of the data link. The packet driver maintains two data areas for incoming and outgoing packets. The output area is needed to implement retransmission on errors, and arriving packets are queued in the input area. Data arriving for a file not open for reading is discarded. Initially the size of both areas is set to two packets. It is not necessary that reads and writes be multiples of the packet size although there is less system overhead if they are. Read opera- tions return the maximum amount of data available from the input area up to the number of bytes specified in the system call. The buffer sizes in write operations are not normally transmitted across the link. However, writes of zero length are treated specially and are reflected at the remote end as a zero-length read. This facilitates marking the serial byte stream, usually for delimiting files. When one side of a packet driver link is shut down by close(2)or pkoff (see pkon(2)), read(2) on the other side will return 0, and write on the other side will raise a SIGPIPE signal. SEE ALSO
pkon(2), pkopen(3) local PK(4)
Man Page