os/ossrv/genericopenlibs/openenvcore/include/sys/ioctl.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
/*-
sl@0
     2
 * Copyright (c) 1982, 1986, 1990, 1993, 1994
sl@0
     3
 *	The Regents of the University of California.  All rights reserved.
sl@0
     4
 * (c) UNIX System Laboratories, Inc.
sl@0
     5
 * All or some portions of this file are derived from material licensed
sl@0
     6
 * to the University of California by American Telephone and Telegraph
sl@0
     7
 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
sl@0
     8
 * the permission of UNIX System Laboratories, Inc.
sl@0
     9
 *
sl@0
    10
 * Redistribution and use in source and binary forms, with or without
sl@0
    11
 * modification, are permitted provided that the following conditions
sl@0
    12
 * are met:
sl@0
    13
 * 1. Redistributions of source code must retain the above copyright
sl@0
    14
 *    notice, this list of conditions and the following disclaimer.
sl@0
    15
 * 2. Redistributions in binary form must reproduce the above copyright
sl@0
    16
 *    notice, this list of conditions and the following disclaimer in the
sl@0
    17
 *    documentation and/or other materials provided with the distribution.
sl@0
    18
 * 4. Neither the name of the University nor the names of its contributors
sl@0
    19
 *    may be used to endorse or promote products derived from this software
sl@0
    20
 *    without specific prior written permission.
sl@0
    21
 *
sl@0
    22
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
sl@0
    23
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
sl@0
    24
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
sl@0
    25
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
sl@0
    26
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
sl@0
    27
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
sl@0
    28
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
sl@0
    29
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
sl@0
    30
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
sl@0
    31
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
sl@0
    32
 * SUCH DAMAGE.
sl@0
    33
 *
sl@0
    34
 *	@(#)ioctl.h	8.6 (Berkeley) 3/28/94
sl@0
    35
 * $FreeBSD: src/sys/sys/ioctl.h,v 1.14 2005/03/02 21:33:29 joerg Exp $
sl@0
    36
 */
sl@0
    37
sl@0
    38
#ifndef	_SYS_IOCTL_H_
sl@0
    39
#define	_SYS_IOCTL_H_
sl@0
    40
sl@0
    41
#ifdef _KERNEL
sl@0
    42
#ifndef _SYS_CDEFS_H_
sl@0
    43
#error this file needs sys/cdefs.h as a prerequisite
sl@0
    44
#endif
sl@0
    45
#ifdef __CC_SUPPORTS_WARNING
sl@0
    46
#warning "Don't #include ioctl.h in the kernel.  Include xxxio.h instead."
sl@0
    47
#endif
sl@0
    48
#endif /* _KERNEL */
sl@0
    49
sl@0
    50
#include <sys/ttycom.h>
sl@0
    51
sl@0
    52
/*
sl@0
    53
 * Pun for SunOS prior to 3.2.  SunOS 3.2 and later support TIOCGWINSZ
sl@0
    54
 * and TIOCSWINSZ (yes, even 3.2-3.5, the fact that it wasn't documented
sl@0
    55
 * notwithstanding).
sl@0
    56
 */
sl@0
    57
struct ttysize {
sl@0
    58
	unsigned short	ts_lines;
sl@0
    59
	unsigned short	ts_cols;
sl@0
    60
	unsigned short	ts_xxx;
sl@0
    61
	unsigned short	ts_yyy;
sl@0
    62
};
sl@0
    63
#define	TIOCGSIZE	TIOCGWINSZ
sl@0
    64
#define	TIOCSSIZE	TIOCSWINSZ
sl@0
    65
sl@0
    66
#include <sys/ioccom.h>
sl@0
    67
sl@0
    68
#include <sys/filio.h>
sl@0
    69
#include <sys/sockio.h>
sl@0
    70
sl@0
    71
#ifdef __SYMBIAN32__
sl@0
    72
sl@0
    73
/**
sl@0
    74
number of bytes available to be read - cf BSD FIONREAD 
sl@0
    75
*/
sl@0
    76
#define E32IONREAD	_IOR('f', 1,int)	
sl@0
    77
sl@0
    78
/**
sl@0
    79
ioctl-based form of select with infinite timeout - specify a mask of selectable
sl@0
    80
states and receive back the mask of triggering states
sl@0
    81
*/
sl@0
    82
#define E32IOSELECT	_IOWR('f',2,int)	
sl@0
    83
#   define E32SELECT_READ	0x01
sl@0
    84
#   define E32SELECT_WRITE	0x02
sl@0
    85
#   define E32SELECT_EXCEPT	0x04
sl@0
    86
sl@0
    87
/**
sl@0
    88
ioctls for serial port			values may change
sl@0
    89
*/
sl@0
    90
#define COMMIOCTL_SETSIGNALS		1
sl@0
    91
#define	COMMIOCTL_GETSIGNALS		2
sl@0
    92
#define COMMIOCTL_SETCONFIG			3
sl@0
    93
#define	COMMIOCTL_GETCONFIG			4
sl@0
    94
#define	COMMIOCTL_BREAK				5
sl@0
    95
#define	COMMIOCTL_SETREADTIMEOUT	6
sl@0
    96
#define	COMMIOCTL_GETREADTIMEOUT	7
sl@0
    97
#define	COMMIOCTL_SETREADTHRESHOLD	8
sl@0
    98
#define	COMMIOCTL_GETREADTHRESHOLD	9
sl@0
    99
#define	COMMIOCTL_SETBUFFERLENGTH	10
sl@0
   100
#define	COMMIOCTL_GETBUFFERLENGTH	11
sl@0
   101
#define	COMMIOCTL_NOTIFYSUPPORTED	12
sl@0
   102
#define	COMMIOCTL_NOTIFY			0x400d
sl@0
   103
sl@0
   104
#define	REAL_COMMIOCTL_NOTIFY		13		// = COMMIOCTL_NOTIFY-0x4000
sl@0
   105
sl@0
   106
#endif //__SYMBIAN32__
sl@0
   107
sl@0
   108
sl@0
   109
#endif /* !_SYS_IOCTL_H_ */
sl@0
   110
sl@0
   111
/*
sl@0
   112
 * Keep outside _SYS_IOCTL_H_
sl@0
   113
 * Compatibility with old terminal driver
sl@0
   114
 *
sl@0
   115
 * Source level -> #define USE_OLD_TTY
sl@0
   116
 * Kernel level -> options COMPAT_43
sl@0
   117
 */
sl@0
   118
#if defined(USE_OLD_TTY) || defined(COMPAT_43)
sl@0
   119
#include <sys/ioctl_compat.h>
sl@0
   120
#endif