📄 pk.4
字号:
.TH PK 4 local.SH NAMEpk \- packet driver.SH DESCRIPTIONThe packet driverimplements a full-duplex end-to-end flow control strategyfor machine-to-machine communication.Packet driver protocol is established bycalling.IR pkon (2)with a character device file descriptor anda desired packet size in bytes.The packet size must be a power of 2,.RI 32\(<= size \(<=4096.The file descriptormust represent an 8-bit data path.This is normally obtained by settingthe device in raw mode(see.IR ioctl (2))..PPThe actual packet size, which may be smaller thanthe desired packet size, is arrived at bynegotiation with the packet driverat the remote end of the data link..PPThe packet driver maintains twodata areasfor incoming and outgoing packets.The output area is needed to implement retransmissionon errors,andarriving 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 setto two packets..PPIt is not necessary that reads and writesbe multiples of the packet size althoughthere is less system overhead if they are.Read operations return the maximum amount of dataavailable from the input area up to the number of bytes specified in the system call.The buffer sizes in write operationsare not normally transmitted across the link.However, writes of zero length are treated speciallyand are reflected at the remote end as azero-length read.This facilitates marking the serial byte stream,usually for delimiting files..PPWhen one side of a packet driver link is shut down by .IR close (2) or.I pkoff(see.IR pkon (2)),.IR read (2)on the other side will return 0, and.I writeon the other sidewill raise a SIGPIPE signal..SH "SEE ALSO"pkon(2), pkopen(3)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -