1 PCKT(7M) STREAMS Modules PCKT(7M) 2 3 NAME 4 pckt - STREAMS Packet Mode module 5 6 SYNOPSIS 7 int ioctl( fd, I_PUSH, "pckt"); 8 9 10 DESCRIPTION 11 pckt is a STREAMS module that may be used with a pseudo terminal to 12 packetize certain messages. The pckt module should be pushed (see 13 I_PUSH on streamio(7I)) onto the manager side of a pseudo terminal. 14 15 16 Packetizing is performed by prefixing a message with an M_PROTO 17 message. The original message type is stored in the 1 byte data 18 portion of the M_PROTO message. 19 20 21 On the read-side, only the M_PROTO, M_PCPROTO, M_STOP, M_START, 22 M_STOPI, M_STARTI, M_IOCTL, M_DATA, M_FLUSH, and M_READ messages are 23 packetized. All other message types are passed upstream unmodified. 24 25 26 Since all unread state information is held in the manager's stream head 27 read queue, flushing of this queue is disabled. 28 29 30 On the write-side, all messages are sent down unmodified. 31 32 33 With this module in place, all reads from the manager side of the 34 pseudo terminal should be performed with the getmsg(2) or getpmsg() 35 function. The control part of the message contains the message type. 36 The data part contains the actual data associated with that message 37 type. The onus is on the application to separate the data into its 38 component parts. 39 40 SEE ALSO 41 getmsg(2), ioctl(2), ldterm(7M), ptem(7M), streamio(7I), termio(7I) 42 43 44 STREAMS Programming Guide 45 46 February 5, 2022 PCKT(7M)