Annotation of sys/compat/svr4/svr4_stropts.h, Revision 1.1
1.1 ! nbrk 1: /* $OpenBSD: svr4_stropts.h,v 1.5 2002/03/14 01:26:51 millert Exp $ */
! 2: /* $NetBSD: svr4_stropts.h,v 1.9 1996/10/28 08:46:38 fvdl Exp $ */
! 3:
! 4: /*
! 5: * Copyright (c) 1994 Christos Zoulas
! 6: * All rights reserved.
! 7: *
! 8: * Redistribution and use in source and binary forms, with or without
! 9: * modification, are permitted provided that the following conditions
! 10: * are met:
! 11: * 1. Redistributions of source code must retain the above copyright
! 12: * notice, this list of conditions and the following disclaimer.
! 13: * 2. Redistributions in binary form must reproduce the above copyright
! 14: * notice, this list of conditions and the following disclaimer in the
! 15: * documentation and/or other materials provided with the distribution.
! 16: * 3. The name of the author may not be used to endorse or promote products
! 17: * derived from this software without specific prior written permission
! 18: *
! 19: * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
! 20: * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
! 21: * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
! 22: * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
! 23: * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
! 24: * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
! 25: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
! 26: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
! 27: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
! 28: * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
! 29: */
! 30:
! 31: #ifndef _SVR4_STROPTS_H_
! 32: #define _SVR4_STROPTS_H_
! 33:
! 34:
! 35: struct svr4_strbuf {
! 36: int maxlen;
! 37: int len;
! 38: char *buf;
! 39: };
! 40:
! 41: #define SVR4_STR ('S' << 8)
! 42: #define SVR4_I_NREAD (SVR4_STR| 1)
! 43: #define SVR4_I_PUSH (SVR4_STR| 2)
! 44: #define SVR4_I_POP (SVR4_STR| 3)
! 45: #define SVR4_I_LOOK (SVR4_STR| 4)
! 46: #define SVR4_I_FLUSH (SVR4_STR| 5)
! 47: #define SVR4_I_SRDOPT (SVR4_STR| 6)
! 48: #define SVR4_I_GRDOPT (SVR4_STR| 7)
! 49: #define SVR4_I_STR (SVR4_STR| 8)
! 50: #define SVR4_I_SETSIG (SVR4_STR| 9)
! 51: #define SVR4_I_GETSIG (SVR4_STR|10)
! 52: #define SVR4_I_FIND (SVR4_STR|11)
! 53: #define SVR4_I_LINK (SVR4_STR|12)
! 54: #define SVR4_I_UNLINK (SVR4_STR|13)
! 55: #define SVR4_I_ERECVFD (SVR4_STR|14)
! 56: #define SVR4_I_PEEK (SVR4_STR|15)
! 57: #define SVR4_I_FDINSERT (SVR4_STR|16)
! 58: #define SVR4_I_SENDFD (SVR4_STR|17)
! 59: #define SVR4_I_RECVFD (SVR4_STR|18)
! 60: #define SVR4_I_SWROPT (SVR4_STR|19)
! 61: #define SVR4_I_GWROPT (SVR4_STR|20)
! 62: #define SVR4_I_LIST (SVR4_STR|21)
! 63: #define SVR4_I_PLINK (SVR4_STR|22)
! 64: #define SVR4_I_PUNLINK (SVR4_STR|23)
! 65: #define SVR4_I_SETEV (SVR4_STR|24)
! 66: #define SVR4_I_GETEV (SVR4_STR|25)
! 67: #define SVR4_I_STREV (SVR4_STR|26)
! 68: #define SVR4_I_UNSTREV (SVR4_STR|27)
! 69: #define SVR4_I_FLUSHBAND (SVR4_STR|28)
! 70: #define SVR4_I_CKBAND (SVR4_STR|29)
! 71: #define SVR4_I_GETBAND (SVR4_STR|30)
! 72: #define SVR4_I_ATMARK (SVR4_STR|31)
! 73: #define SVR4_I_SETCLTIME (SVR4_STR|32)
! 74: #define SVR4_I_GETCLTIME (SVR4_STR|33)
! 75: #define SVR4_I_CANPUT (SVR4_STR|34)
! 76:
! 77: /*
! 78: * The following two ioctls are OS specific and
! 79: * undocumented.
! 80: */
! 81: #define SVR4__I_BIND_RSVD (SVR4_STR|242)
! 82: #define SVR4__I_RELE_RSVD (SVR4_STR|243)
! 83:
! 84: /* Struct passed for SVR4_I_STR */
! 85: struct svr4_strioctl {
! 86: u_long cmd;
! 87: int timeout;
! 88: int len;
! 89: char *buf;
! 90: };
! 91:
! 92:
! 93: /*
! 94: * Our internal state for the stream
! 95: * For now we keep almost nothing... In the future we can keep more
! 96: * streams state.
! 97: */
! 98: struct svr4_strm {
! 99: int s_family; /* socket family */
! 100: int s_cmd; /* last getmsg reply or putmsg request */
! 101: int s_afd; /* last accepted fd; [for fd_insert] */
! 102: };
! 103:
! 104: /*
! 105: * The following structures are determined empirically.
! 106: */
! 107: struct svr4_strmcmd {
! 108: long cmd; /* command ? */
! 109: long len; /* Address len */
! 110: long offs; /* Address offset */
! 111: long pad[61];
! 112: };
! 113:
! 114: struct svr4_infocmd {
! 115: long cmd;
! 116: long tsdu;
! 117: long etsdu;
! 118: long cdata;
! 119: long ddata;
! 120: long addr;
! 121: long opt;
! 122: long tidu;
! 123: long serv;
! 124: long current;
! 125: long provider;
! 126: };
! 127:
! 128: struct svr4_strfdinsert {
! 129: struct svr4_strbuf ctl;
! 130: struct svr4_strbuf data;
! 131: long flags;
! 132: int fd;
! 133: int offset;
! 134: };
! 135:
! 136: struct svr4_netaddr_in {
! 137: u_short family;
! 138: u_short port;
! 139: u_long addr;
! 140: };
! 141:
! 142: struct svr4_netaddr_un {
! 143: u_short family;
! 144: char path[1];
! 145: };
! 146:
! 147: #define SVR4_ADDROF(sc) (void *) (((char *) (sc)) + (sc)->offs)
! 148: #define SVR4_C_ADDROF(sc) (const void *) (((const char *) (sc)) + (sc)->offs)
! 149:
! 150: struct svr4_strm *svr4_stream_get(struct file *fp);
! 151:
! 152: #endif /* !_SVR4_STROPTS */
CVSweb