Update.
[glibc.git] / streams / stropts.h
blobdda28573e976ff266301c98aeb19e555c4815c47
1 /* Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public
15 License along with the GNU C Library; see the file COPYING.LIB. If not,
16 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA. */
19 #ifndef _STROPTS_H
20 #define _STROPTS_H 1
22 #include <features.h>
23 #include <bits/types.h>
25 #ifndef __gid_t_defined
26 typedef __gid_t gid_t;
27 # define __gid_t_defined
28 #endif
30 #ifndef __uid_t_defined
31 typedef __uid_t uid_t;
32 # define __uid_t_defined
33 #endif
35 typedef __t_uscalar_t t_uscalar_t;
37 /* Get system specific contants. */
38 #include <bits/stropts.h>
41 __BEGIN_DECLS
43 /* Test whether FILDES is associated with a STREAM-based file. */
44 extern int isastream (int __fildes) __THROW;
46 /* Receive next message from a STREAMS file. */
47 extern int getmsg (int __fildes, struct strbuf *__ctlptr,
48 struct strbuf *__dataptr, int *__flagsp) __THROW;
50 /* Receive next message from a STREAMS file, with *FLAGSP allowing to
51 control which message. */
52 extern int getpmsg (int __fildes, struct strbuf *__ctlptr,
53 struct strbuf *__dataptr, int *__bandp, int *__flagsp)
54 __THROW;
56 /* Perform the I/O control operation specified by REQUEST on FD.
57 One argument may follow; its presence and type depend on REQUEST.
58 Return value depends on REQUEST. Usually -1 indicates error. */
59 extern int ioctl (int __fd, unsigned long int __request, ...) __THROW;
61 /* Send a message on a STREAM. */
62 extern int putmsg (int __fildes, __const struct strbuf *__ctlptr,
63 __const struct strbuf *__dataptr, int __flags) __THROW;
65 /* Send a message on a STREAM to the BAND. */
66 extern int putpmsg (int __fildes, __const struct strbuf *__ctlptr,
67 __const struct strbuf *__dataptr, int __band, int __flags)
68 __THROW;
70 /* Attach a STREAMS-based file descriptor FILDES to a file PATH in the
71 file system name space. */
72 extern int fattach (int __fildes, __const char *__path) __THROW;
74 /* Detach a name PATH from a STREAMS-based file descriptor. */
75 extern int fdetach (__const char *__path) __THROW;
77 __END_DECLS
79 #endif /* stropts.h */