The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/compat/svr4/svr4_stropts.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*      $NetBSD: svr4_stropts.h,v 1.12 1998/10/03 22:03:07 christos Exp $        */
    2 
    3 /*-
    4  * Copyright (c) 1994 The NetBSD Foundation, Inc.
    5  * All rights reserved.
    6  *
    7  * This code is derived from software contributed to The NetBSD Foundation
    8  * by Christos Zoulas.
    9  *
   10  * Redistribution and use in source and binary forms, with or without
   11  * modification, are permitted provided that the following conditions
   12  * are met:
   13  * 1. Redistributions of source code must retain the above copyright
   14  *    notice, this list of conditions and the following disclaimer.
   15  * 2. Redistributions in binary form must reproduce the above copyright
   16  *    notice, this list of conditions and the following disclaimer in the
   17  *    documentation and/or other materials provided with the distribution.
   18  * 3. All advertising materials mentioning features or use of this software
   19  *    must display the following acknowledgement:
   20  *        This product includes software developed by the NetBSD
   21  *        Foundation, Inc. and its contributors.
   22  * 4. Neither the name of The NetBSD Foundation nor the names of its
   23  *    contributors may be used to endorse or promote products derived
   24  *    from this software without specific prior written permission.
   25  *
   26  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
   27  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
   28  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   29  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
   30  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   31  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   32  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   33  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   34  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   35  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   36  * POSSIBILITY OF SUCH DAMAGE.
   37  */
   38 
   39 #ifndef _SVR4_STROPTS_H_
   40 #define _SVR4_STROPTS_H_
   41 
   42 
   43 struct svr4_strbuf {
   44         int      maxlen;
   45         int      len;
   46         char    *buf;
   47 };
   48 
   49 #define SVR4_STR             ('S' << 8)
   50 #define SVR4_I_NREAD         (SVR4_STR| 1)
   51 #define SVR4_I_PUSH          (SVR4_STR| 2)
   52 #define SVR4_I_POP           (SVR4_STR| 3)
   53 #define SVR4_I_LOOK          (SVR4_STR| 4)
   54 #define SVR4_I_FLUSH         (SVR4_STR| 5)
   55 #define SVR4_I_SRDOPT        (SVR4_STR| 6)
   56 #define SVR4_I_GRDOPT        (SVR4_STR| 7)
   57 #define SVR4_I_STR           (SVR4_STR| 8)
   58 #define SVR4_I_SETSIG        (SVR4_STR| 9)
   59 #define SVR4_I_GETSIG        (SVR4_STR|10)
   60 #define SVR4_I_FIND          (SVR4_STR|11)
   61 #define SVR4_I_LINK          (SVR4_STR|12)
   62 #define SVR4_I_UNLINK        (SVR4_STR|13)
   63 #define SVR4_I_ERECVFD       (SVR4_STR|14)
   64 #define SVR4_I_PEEK          (SVR4_STR|15)
   65 #define SVR4_I_FDINSERT      (SVR4_STR|16)
   66 #define SVR4_I_SENDFD        (SVR4_STR|17)
   67 #define SVR4_I_RECVFD        (SVR4_STR|18)
   68 #define SVR4_I_SWROPT        (SVR4_STR|19)
   69 #define SVR4_I_GWROPT        (SVR4_STR|20)
   70 #define SVR4_I_LIST          (SVR4_STR|21)
   71 #define SVR4_I_PLINK         (SVR4_STR|22)
   72 #define SVR4_I_PUNLINK       (SVR4_STR|23)
   73 #define SVR4_I_SETEV         (SVR4_STR|24)
   74 #define SVR4_I_GETEV         (SVR4_STR|25)
   75 #define SVR4_I_STREV         (SVR4_STR|26)
   76 #define SVR4_I_UNSTREV       (SVR4_STR|27)
   77 #define SVR4_I_FLUSHBAND     (SVR4_STR|28)
   78 #define SVR4_I_CKBAND        (SVR4_STR|29)
   79 #define SVR4_I_GETBAND       (SVR4_STR|30)
   80 #define SVR4_I_ATMARK        (SVR4_STR|31)
   81 #define SVR4_I_SETCLTIME     (SVR4_STR|32)
   82 #define SVR4_I_GETCLTIME     (SVR4_STR|33)
   83 #define SVR4_I_CANPUT        (SVR4_STR|34)
   84 
   85 /*
   86  * The following two ioctls are OS specific and
   87  * undocumented.
   88  */
   89 #define SVR4__I_BIND_RSVD    (SVR4_STR|242)
   90 #define SVR4__I_RELE_RSVD    (SVR4_STR|243)
   91 
   92 /*
   93  * Service type definitions
   94  */
   95 #define SVR4_T_COTS           1   /* Connection-orieted */
   96 #define SVR4_T_COTS_ORD       2   /* Local connection-oriented */
   97 #define SVR4_T_CLTS           3   /* Connectionless */
   98 
   99 /* Struct passed for SVR4_I_STR */
  100 struct svr4_strioctl {
  101         u_long   cmd;
  102         int      timeout;
  103         int      len;
  104         char    *buf;
  105 };
  106 
  107 
  108 /*
  109  * Bits for I_{G,S}ETSIG
  110  */
  111 #define SVR4_S_INPUT    0x0001          /* any message on read queue no HIPRI */
  112 #define SVR4_S_HIPRI    0x0002          /* high prio message on read queue */
  113 #define SVR4_S_OUTPUT   0x0004          /* write queue has free space */
  114 #define SVR4_S_MSG      0x0008          /* signal message in read queue head */
  115 #define SVR4_S_ERROR    0x0010          /* error message in read queue head */
  116 #define SVR4_S_HANGUP   0x0020          /* hangup message in read queue head */
  117 #define SVR4_S_RDNORM   0x0040          /* normal message on read queue */
  118 #define SVR4_S_WRNORM   S_OUTPUT        /* write queue has free space */
  119 #define SVR4_S_RDBAND   0x0080          /* out of band message on read queue */
  120 #define SVR4_S_WRBAND   0x0100          /* write queue has free space for oob */
  121 #define SVR4_S_BANDURG  0x0200          /* generate SIGURG instead of SIGPOLL */
  122 #define SVR4_S_ALLMASK  0x03ff          /* all events mask */
  123 
  124 /*
  125  * Our internal state for the stream
  126  * For now we keep almost nothing... In the future we can keep more
  127  * streams state.
  128  */
  129 struct svr4_strm {
  130         int     s_family;       /* socket family */
  131         int     s_cmd;          /* last getmsg reply or putmsg request */
  132         int     s_afd;          /* last accepted fd; [for fd_insert] */
  133         int     s_eventmask;    /* event mask for I_{G,S}ETSIG */
  134 };
  135 
  136 /*
  137  * The following structures are determined empirically.
  138  */
  139 struct svr4_strmcmd {
  140         long    cmd;            /* command ?            */
  141         long    len;            /* Address len          */
  142         long    offs;           /* Address offset       */
  143         long    pad[61];
  144 };
  145 
  146 struct svr4_infocmd {
  147         long    cmd;
  148         long    tsdu;
  149         long    etsdu;
  150         long    cdata;
  151         long    ddata;
  152         long    addr;
  153         long    opt;
  154         long    tidu;
  155         long    serv;
  156         long    current;
  157         long    provider;
  158 };
  159 
  160 struct svr4_strfdinsert {
  161         struct svr4_strbuf      ctl;
  162         struct svr4_strbuf      data;
  163         long                    flags;
  164         int                     fd;
  165         int                     offset;
  166 };
  167 
  168 struct svr4_netaddr_in {
  169         u_short family;
  170         u_short port;
  171         u_long  addr;
  172 };
  173 
  174 struct svr4_netaddr_un {
  175         u_short family;
  176         char    path[1];
  177 };
  178 
  179 #define SVR4_ADDROF(sc) (void *) (((char *) (sc)) + (sc)->offs)
  180 #define SVR4_C_ADDROF(sc) (const void *) (((const char *) (sc)) + (sc)->offs)
  181 
  182 struct svr4_strm *svr4_stream_get __P((struct file *fp));
  183 
  184 #endif /* !_SVR4_STROPTS */

Cache object: 52a3dbfd1e61200eb0597664ff873c41


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.