Lines Matching +full:max +full:- +full:functions
46 .Nd IPC messaging functions
80 .Fn ibuf_dynamic "size_t len" "size_t max"
108 functions provide a simple mechanism for communication between processes
115 A program using these functions should be linked with
116 .Em -lutil .
124 .Bd -literal -offset indent
140 but is not closed by any of the imsg functions.
184 A value of \-1 indicates no file descriptor should be passed.
196 if it succeeds, \-1 otherwise.
214 This routine returns 1 if it succeeds, \-1 otherwise.
227 It returns 0 if it succeeds, \-1 otherwise.
235 It returns the number of bytes read on success, or \-1 on error.
236 A return value of \-1 from
248 It returns the total size of the message, 0 if no messages are ready, or \-1
257 .Bd -literal -offset indent
274 .Bl -tag -width Ds -offset indent
283 Flags used internally by the imsg functions: should not be used by application
286 32-bit values specified on message creation and free for any use by the
293 .Bl -tag -width Ds -offset indent
296 socket control message API, or \-1 if no file descriptor was sent.
311 The imsg API defines functions to manipulate buffers, used internally and during
319 .Bd -literal -offset indent
324 size_t max;
339 function allocates a fixed-length buffer.
351 .Fa max .
359 0 is returned on success and \-1 on failure.
379 are functions which return the total bytes used and available in
396 It returns 1 if it succeeds, \-1 on error and 0 when no buffers were
427 It returns 1 if it succeeds, \-1 on error, and 0 when the queue was empty
447 .Bd -literal -offset indent
451 if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, imsg_fds) == -1)
455 case -1:
475 .Bd -literal -offset indent
488 0, 0, -1, &idata, sizeof idata);
500 .Bd -literal -offset indent
501 if (msgbuf_write(&ibuf-\*(Gtw) \*(Lt= 0 && errno != EAGAIN) {
510 .Bd -literal -offset indent
518 if ((n = imsg_read(ibuf)) == -1 || n == 0) {
523 if ((n = imsg_get(ibuf, &imsg)) == -1) {
528 datalen = imsg.hdr.len - IMSG_HEADER_SIZE;