logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

stropts.h.0p (10409B)


  1. '\" et
  2. .TH stropts.h "0P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. stropts.h
  12. \(em STREAMS interface (\fBSTREAMS\fP)
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <stropts.h>
  17. .fi
  18. .SH DESCRIPTION
  19. The
  20. .IR <stropts.h>
  21. header shall define the
  22. .BR bandinfo
  23. structure, which shall include at least the following members:
  24. .sp
  25. .RS 4
  26. .nf
  27. int bi_flag \fRFlushing type.\fR
  28. unsigned char bi_pri \fRPriority band.\fR
  29. .fi
  30. .P
  31. .RE
  32. .P
  33. The
  34. .IR <stropts.h>
  35. header shall define the
  36. .BR strpeek
  37. structure, which shall include at least the following members:
  38. .sp
  39. .RS 4
  40. .nf
  41. struct strbuf ctlbuf \fRThe control portion of the message.\fR
  42. struct strbuf databuf \fRThe data portion of the message.\fR
  43. t_uscalar_t flags \fRRS_HIPRI or 0.\fR
  44. .fi
  45. .P
  46. .RE
  47. .P
  48. The
  49. .IR <stropts.h>
  50. header shall define the
  51. .BR strbuf
  52. structure, which shall include at least the following members:
  53. .sp
  54. .RS 4
  55. .nf
  56. char *buf \fRPointer to buffer.\fP
  57. int len \fRLength of data.\fP
  58. int maxlen \fRMaximum buffer length.\fP
  59. .fi
  60. .P
  61. .RE
  62. .P
  63. The
  64. .IR <stropts.h>
  65. header shall define the
  66. .BR strfdinsert
  67. structure, which shall include at least the following members:
  68. .sp
  69. .RS 4
  70. .nf
  71. struct strbuf ctlbuf \fRThe control portion of the message.\fR
  72. struct strbuf databuf \fRThe data portion of the message.\fR
  73. int fildes \fRFile descriptor of the other STREAM.\fR
  74. t_uscalar_t flags \fRRS_HIPRI or 0.\fR
  75. int offset \fRRelative location of the stored value.\fR
  76. .fi
  77. .P
  78. .RE
  79. .P
  80. The
  81. .IR <stropts.h>
  82. header shall define the
  83. .BR strioctl
  84. structure, which shall include at least the following members:
  85. .sp
  86. .RS 4
  87. .nf
  88. int ic_cmd \fIioctl\fR(\|) command.\fR
  89. char *ic_dp \fRPointer to buffer.\fR
  90. int ic_len \fRLength of data.\fR
  91. int ic_timout \fRTimeout for response.\fR
  92. .fi
  93. .P
  94. .RE
  95. .P
  96. The
  97. .IR <stropts.h>
  98. header shall define the
  99. .BR strrecvfd
  100. structure, which shall include at least the following members:
  101. .sp
  102. .RS 4
  103. .nf
  104. int fd \fRReceived file descriptor.\fR
  105. gid_t gid \fRGID of sender.\fR
  106. uid_t uid \fRUID of sender.\fR
  107. .fi
  108. .P
  109. .RE
  110. .P
  111. The
  112. .IR <stropts.h>
  113. header shall define the
  114. .BR uid_t
  115. and
  116. .BR gid_t
  117. types through
  118. .BR typedef ,
  119. as described in
  120. .IR <sys/types.h> .
  121. .P
  122. The
  123. .IR <stropts.h>
  124. header shall define the
  125. .BR t_scalar_t
  126. and
  127. .BR t_uscalar_t
  128. types, respectively, as signed and unsigned opaque types of equal
  129. length of at least 32 bits.
  130. .P
  131. The
  132. .IR <stropts.h>
  133. header shall define the
  134. .BR str_list
  135. structure, which shall include at least the following members:
  136. .sp
  137. .RS 4
  138. .nf
  139. struct str_mlist *sl_modlist \fRSTREAMS module names.\fR
  140. int sl_nmods \fRNumber of STREAMS module names.\fR
  141. .fi
  142. .P
  143. .RE
  144. .P
  145. The
  146. .IR <stropts.h>
  147. header shall define the
  148. .BR str_mlist
  149. structure, which shall include at least the following member:
  150. .sp
  151. .RS 4
  152. .nf
  153. char l_name[FMNAMESZ+1] \fRA STREAMS module name.\fR
  154. .fi
  155. .P
  156. .RE
  157. .P
  158. The
  159. .IR <stropts.h>
  160. header shall define at least the following symbolic constants for use
  161. as the
  162. .IR request
  163. argument to
  164. \fIioctl\fR():
  165. .IP I_ATMARK 12
  166. Is the top message ``marked''?
  167. .IP I_CANPUT 12
  168. Is a band writable?
  169. .IP I_CKBAND 12
  170. See if any messages exist in a band.
  171. .IP I_FDINSERT 12
  172. Send implementation-defined information about another STREAM.
  173. .IP I_FIND 12
  174. Look for a STREAMS module.
  175. .IP I_FLUSH 12
  176. Flush a STREAM.
  177. .IP I_FLUSHBAND 12
  178. Flush one band of a STREAM.
  179. .IP I_GETBAND 12
  180. Get the band of the top message on a STREAM.
  181. .IP I_GETCLTIME 12
  182. Get close time delay.
  183. .IP I_GETSIG 12
  184. Retrieve current notification signals.
  185. .IP I_GRDOPT 12
  186. Get the read mode.
  187. .IP I_GWROPT 12
  188. Get the write mode.
  189. .IP I_LINK 12
  190. Connect two STREAMs.
  191. .IP I_LIST 12
  192. Get all the module names on a STREAM.
  193. .IP I_LOOK 12
  194. Get the top module name.
  195. .IP I_NREAD 12
  196. Size the top message.
  197. .IP I_PEEK 12
  198. Peek at the top message on a STREAM.
  199. .IP I_PLINK 12
  200. Persistently connect two STREAMs.
  201. .IP I_POP 12
  202. Pop a STREAMS module.
  203. .IP I_PUNLINK 12
  204. Dismantle a persistent STREAMS link.
  205. .IP I_PUSH 12
  206. Push a STREAMS module.
  207. .IP I_RECVFD 12
  208. Get a file descriptor sent via I_SENDFD.
  209. .IP I_SENDFD 12
  210. Pass a file descriptor through a STREAMS pipe.
  211. .IP I_SETCLTIME 12
  212. Set close time delay.
  213. .IP I_SETSIG 12
  214. Ask for notification signals.
  215. .IP I_SRDOPT 12
  216. Set the read mode.
  217. .IP I_STR 12
  218. Send a STREAMS
  219. \fIioctl\fR().
  220. .IP I_SWROPT 12
  221. Set the write mode.
  222. .IP I_UNLINK 12
  223. Disconnect two STREAMs.
  224. .P
  225. The
  226. .IR <stropts.h>
  227. header shall define at least the following symbolic constant for use
  228. with I_LOOK:
  229. .IP FMNAMESZ 12
  230. The minimum size in bytes of the buffer referred to by the
  231. .IR arg
  232. argument.
  233. .P
  234. The
  235. .IR <stropts.h>
  236. header shall define at least the following symbolic constants for use
  237. with I_FLUSH:
  238. .IP FLUSHR 12
  239. Flush read queues.
  240. .IP FLUSHRW 12
  241. Flush read and write queues.
  242. .IP FLUSHW 12
  243. Flush write queues.
  244. .P
  245. The
  246. .IR <stropts.h>
  247. header shall define at least the following symbolic constants for use
  248. with I_SETSIG:
  249. .IP S_BANDURG 12
  250. When used in conjunction with S_RDBAND, SIGURG is generated instead of
  251. SIGPOLL when a priority message reaches the front of the STREAM head
  252. read queue.
  253. .IP S_ERROR 12
  254. Notification of an error condition reaches the STREAM head.
  255. .IP S_HANGUP 12
  256. Notification of a hangup reaches the STREAM head.
  257. .IP S_HIPRI 12
  258. A high-priority message is present on a STREAM head read queue.
  259. .IP S_INPUT 12
  260. A message, other than a high-priority message, has arrived at the head
  261. of a STREAM head read queue.
  262. .IP S_MSG 12
  263. A STREAMS signal message that contains the SIGPOLL signal reaches the
  264. front of the STREAM head read queue.
  265. .IP S_OUTPUT 12
  266. The write queue for normal data (priority band 0) just below the STREAM
  267. head is no longer full. This notifies the process that there is room
  268. on the queue for sending (or writing) normal data downstream.
  269. .IP S_RDBAND 12
  270. A message with a non-zero priority band has arrived at the head of a
  271. STREAM head read queue.
  272. .IP S_RDNORM 12
  273. A normal (priority band set to 0) message has arrived at the head of a
  274. STREAM head read queue.
  275. .IP S_WRBAND 12
  276. The write queue for a non-zero priority band just below the STREAM head
  277. is no longer full.
  278. .IP S_WRNORM 12
  279. Equivalent to S_OUTPUT.
  280. .P
  281. The
  282. .IR <stropts.h>
  283. header shall define at least the following symbolic constant for use
  284. with I_PEEK:
  285. .IP RS_HIPRI 12
  286. Only look for high-priority messages.
  287. .P
  288. The
  289. .IR <stropts.h>
  290. header shall define at least the following symbolic constants for use
  291. with I_SRDOPT:
  292. .IP RMSGD 12
  293. Message-discard mode.
  294. .IP RMSGN 12
  295. Message-non-discard mode.
  296. .IP RNORM 12
  297. Byte-STREAM mode, the default.
  298. .IP RPROTDAT 12
  299. Deliver the control part of a message as data when a process issues a
  300. \fIread\fR().
  301. .IP RPROTDIS 12
  302. Discard the control part of a message, delivering any data part, when a
  303. process issues a
  304. \fIread\fR().
  305. .IP RPROTNORM 12
  306. Fail
  307. \fIread\fR()
  308. with
  309. .BR [EBADMSG]
  310. if a message containing a control part is at the front of the STREAM
  311. head read queue.
  312. .P
  313. The
  314. .IR <stropts.h>
  315. header shall define at least the following symbolic constant for use
  316. with I_SWOPT:
  317. .IP SNDZERO 12
  318. Send a zero-length message downstream when a
  319. \fIwrite\fR()
  320. of 0 bytes occurs.
  321. .P
  322. The
  323. .IR <stropts.h>
  324. header shall define at least the following symbolic constants for use
  325. with I_ATMARK:
  326. .IP ANYMARK 12
  327. Check if the message is marked.
  328. .IP LASTMARK 12
  329. Check if the message is the last one marked on the queue.
  330. .P
  331. The
  332. .IR <stropts.h>
  333. header shall define at least the following symbolic constant for use
  334. with I_UNLINK:
  335. .IP MUXID_ALL 12
  336. Unlink all STREAMs linked to the STREAM associated with
  337. .IR fildes .
  338. .P
  339. The
  340. .IR <stropts.h>
  341. header shall define the following symbolic constants for
  342. \fIgetmsg\fR(),
  343. \fIgetpmsg\fR(),
  344. \fIputmsg\fR(),
  345. and
  346. \fIputpmsg\fR():
  347. .IP MORECTL 12
  348. More control information is left in message.
  349. .IP MOREDATA 12
  350. More data is left in message.
  351. .IP MSG_ANY 12
  352. Receive any message.
  353. .IP MSG_BAND 12
  354. Receive message from specified band.
  355. .IP MSG_HIPRI 12
  356. Send/receive high-priority message.
  357. .P
  358. The
  359. .IR <stropts.h>
  360. header may make visible all of the symbols from
  361. .IR <unistd.h> .
  362. .P
  363. The
  364. .IR <stropts.h>
  365. header may also define macros for message types using names that
  366. start with
  367. .IR M_ .
  368. .P
  369. The following shall be declared as functions and may also be defined as
  370. macros. Function prototypes shall be provided.
  371. .sp
  372. .RS 4
  373. .nf
  374. int fattach(int, const char *);
  375. int fdetach(const char *);
  376. int getmsg(int, struct strbuf *restrict, struct strbuf *restrict,
  377. int *restrict);
  378. int getpmsg(int, struct strbuf *restrict, struct strbuf *restrict,
  379. int *restrict, int *restrict);
  380. int ioctl(int, int, ...);
  381. int isastream(int);
  382. int putmsg(int, const struct strbuf *, const struct strbuf *, int);
  383. int putpmsg(int, const struct strbuf *, const struct strbuf *, int,
  384. int);
  385. .fi
  386. .P
  387. .RE
  388. .LP
  389. .IR "The following sections are informative."
  390. .SH "APPLICATION USAGE"
  391. None.
  392. .SH RATIONALE
  393. None.
  394. .SH "FUTURE DIRECTIONS"
  395. None.
  396. .SH "SEE ALSO"
  397. .IR "\fB<sys_types.h>\fP",
  398. .IR "\fB<unistd.h>\fP"
  399. .P
  400. The System Interfaces volume of POSIX.1\(hy2017,
  401. .IR "\fIclose\fR\^(\|)",
  402. .IR "\fIfattach\fR\^(\|)",
  403. .IR "\fIfcntl\fR\^(\|)",
  404. .IR "\fIfdetach\fR\^(\|)",
  405. .IR "\fIgetmsg\fR\^(\|)",
  406. .IR "\fIioctl\fR\^(\|)",
  407. .IR "\fIisastream\fR\^(\|)",
  408. .IR "\fIopen\fR\^(\|)",
  409. .IR "\fIpipe\fR\^(\|)",
  410. .IR "\fIread\fR\^(\|)",
  411. .IR "\fIpoll\fR\^(\|)",
  412. .IR "\fIputmsg\fR\^(\|)",
  413. .IR "\fIsignal\fR\^(\|)",
  414. .IR "\fIwrite\fR\^(\|)"
  415. .\"
  416. .SH COPYRIGHT
  417. Portions of this text are reprinted and reproduced in electronic form
  418. from IEEE Std 1003.1-2017, Standard for Information Technology
  419. -- Portable Operating System Interface (POSIX), The Open Group Base
  420. Specifications Issue 7, 2018 Edition,
  421. Copyright (C) 2018 by the Institute of
  422. Electrical and Electronics Engineers, Inc and The Open Group.
  423. In the event of any discrepancy between this version and the original IEEE and
  424. The Open Group Standard, the original IEEE and The Open Group Standard
  425. is the referee document. The original Standard can be obtained online at
  426. http://www.opengroup.org/unix/online.html .
  427. .PP
  428. Any typographical or formatting errors that appear
  429. in this page are most likely
  430. to have been introduced during the conversion of the source files to
  431. man page format. To report such errors, see
  432. https://www.kernel.org/doc/man-pages/reporting_bugs.html .