posix-next API 0.1.0
Out-of-tree Zephyr POSIX module
Loading...
Searching...
No Matches
stropts.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Abhinav Srivastava
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
24#ifndef ZEPHYR_INCLUDE_POSIX_STROPTS_H_
25#define ZEPHYR_INCLUDE_POSIX_STROPTS_H_
26
28#define RS_HIPRI BIT(0)
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
35struct strbuf {
36 int maxlen;
37 int len;
38 char *buf;
39};
40
51int putmsg(int fildes, const struct strbuf *ctlptr, const struct strbuf *dataptr, int flags);
52
60int fdetach(const char *path);
61
70int fattach(int fildes, const char *path);
71
82int getmsg(int fildes, struct strbuf *ctlptr, struct strbuf *dataptr, int *flagsp);
83
95int getpmsg(int fildes, struct strbuf *ctlptr, struct strbuf *dataptr, int *bandp, int *flagsp);
96
104int isastream(int fildes);
105
106
107#ifdef __cplusplus
108}
109#endif
110
111#endif /* ZEPHYR_INCLUDE_POSIX_STROPTS_H_ */
int putmsg(int fildes, const struct strbuf *ctlptr, const struct strbuf *dataptr, int flags)
Send a STREAMS message downstream.
int getmsg(int fildes, struct strbuf *ctlptr, struct strbuf *dataptr, int *flagsp)
Receive the next message from a STREAMS file descriptor.
int getpmsg(int fildes, struct strbuf *ctlptr, struct strbuf *dataptr, int *bandp, int *flagsp)
Receive a priority-banded message from a STREAMS file descriptor.
int fattach(int fildes, const char *path)
Attach a STREAMS file descriptor to a pathname in the filesystem.
int fdetach(const char *path)
Detach a STREAMS-based file descriptor from a mount point.
int isastream(int fildes)
Test whether a file descriptor refers to a STREAMS file.
Buffer descriptor for STREAMS getmsg() / putmsg() control and data parts.
Definition stropts.h:35
int len
Length of data, or -1 to indicate no data/control part.
Definition stropts.h:37
char * buf
Pointer to data buffer.
Definition stropts.h:38
int maxlen
Maximum buffer length.
Definition stropts.h:36