Back to index

glibc  2.9
stropts.h
Go to the documentation of this file.
00001 /* Copyright (C) 1998, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003 
00004    The GNU C Library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Lesser General Public
00006    License as published by the Free Software Foundation; either
00007    version 2.1 of the License, or (at your option) any later version.
00008 
00009    The GNU C Library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Lesser General Public License for more details.
00013 
00014    You should have received a copy of the GNU Lesser General Public
00015    License along with the GNU C Library; if not, write to the Free
00016    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00017    02111-1307 USA.  */
00018 
00019 #ifndef _STROPTS_H
00020 #define _STROPTS_H   1
00021 
00022 #include <features.h>
00023 #include <bits/types.h>
00024 #include <bits/xtitypes.h>
00025 
00026 #ifndef __gid_t_defined
00027 typedef __gid_t gid_t;
00028 # define __gid_t_defined
00029 #endif
00030 
00031 #ifndef __uid_t_defined
00032 typedef __uid_t uid_t;
00033 # define __uid_t_defined
00034 #endif
00035 
00036 typedef __t_uscalar_t t_uscalar_t;
00037 
00038 /* Get system specific contants.  */
00039 #include <bits/stropts.h>
00040 
00041 
00042 __BEGIN_DECLS
00043 
00044 /* Test whether FILDES is associated with a STREAM-based file.  */
00045 extern int isastream (int __fildes) __THROW;
00046 
00047 /* Receive next message from a STREAMS file.
00048 
00049    This function is a cancellation point and therefore not marked with
00050    __THROW.  */
00051 extern int getmsg (int __fildes, struct strbuf *__restrict __ctlptr,
00052                  struct strbuf *__restrict __dataptr,
00053                  int *__restrict __flagsp);
00054 
00055 /* Receive next message from a STREAMS file, with *FLAGSP allowing to
00056    control which message.
00057 
00058    This function is a cancellation point and therefore not marked with
00059    __THROW.  */
00060 extern int getpmsg (int __fildes, struct strbuf *__restrict __ctlptr,
00061                   struct strbuf *__restrict __dataptr,
00062                   int *__restrict __bandp, int *__restrict __flagsp);
00063 
00064 /* Perform the I/O control operation specified by REQUEST on FD.
00065    One argument may follow; its presence and type depend on REQUEST.
00066    Return value depends on REQUEST.  Usually -1 indicates error.  */
00067 extern int ioctl (int __fd, unsigned long int __request, ...) __THROW;
00068 
00069 /* Send a message on a STREAM.
00070 
00071    This function is a cancellation point and therefore not marked with
00072    __THROW.  */
00073 extern int putmsg (int __fildes, __const struct strbuf *__ctlptr,
00074                  __const struct strbuf *__dataptr, int __flags);
00075 
00076 /* Send a message on a STREAM to the BAND.
00077 
00078    This function is a cancellation point and therefore not marked with
00079    __THROW.  */
00080 extern int putpmsg (int __fildes, __const struct strbuf *__ctlptr,
00081                   __const struct strbuf *__dataptr, int __band, int __flags);
00082 
00083 /* Attach a STREAMS-based file descriptor FILDES to a file PATH in the
00084    file system name space.  */
00085 extern int fattach (int __fildes, __const char *__path) __THROW;
00086 
00087 /* Detach a name PATH from a STREAMS-based file descriptor.  */
00088 extern int fdetach (__const char *__path) __THROW;
00089 
00090 __END_DECLS
00091 
00092 #endif /* stropts.h */