diff options
Diffstat (limited to 'usr/src/lib/libbc/inc/include')
125 files changed, 0 insertions, 13779 deletions
diff --git a/usr/src/lib/libbc/inc/include/a.out.h b/usr/src/lib/libbc/inc/include/a.out.h deleted file mode 100644 index e40a2e4ad0..0000000000 --- a/usr/src/lib/libbc/inc/include/a.out.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1989 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifndef _a_out_h -#define _a_out_h - -#if !defined(_CROSS_TARGET_ARCH) - - /* The usual, native case. Usage: - * #include <a.out.h> - */ - -#include <machine/a.out.h> - -#else /*defined(_CROSS_TARGET_ARCH)*/ - - /* Used when building a cross-tool, with the target system architecture - * determined by the _CROSS_TARGET_ARCH preprocessor variable at compile - * time. Usage: - * #include <a.out.h> - * ...plus compilation with command (e.g. for Sun-4 target architecture): - * cc -DSUN2=2 -DSUN3=3 -DSUN3X=31 -DSUN4=4 \ - * -D_CROSS_TARGET_ARCH=SUN4 ... - * Note: this may go away in a future release. - */ -# if _CROSS_TARGET_ARCH == SUN2 -# include "sun2/a.out.h" -# elif _CROSS_TARGET_ARCH == SUN3 -# include "sun3/a.out.h" -# elif _CROSS_TARGET_ARCH == SUN3X -# include "sun3x/a.out.h" -# elif _CROSS_TARGET_ARCH == SUN4 -# include "sun4/a.out.h" -# elif _CROSS_TARGET_ARCH == VAX -# include "vax/a.out.h" -# endif - -#endif /*defined(_CROSS_TARGET_ARCH)*/ - -/* - * Usage when building a cross-tool with a fixed target system architecture - * (Sun-4 in this example), bypassing this file: - * #include <sun4/a.out.h> - */ - -#endif /*!_a_out_h*/ diff --git a/usr/src/lib/libbc/inc/include/arpa/inet.h b/usr/src/lib/libbc/inc/include/arpa/inet.h deleted file mode 100644 index 98108ba107..0000000000 --- a/usr/src/lib/libbc/inc/include/arpa/inet.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * Copyright (c) 1983 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * External definitions for - * functions in inet(3N) - */ - -#ifndef _arpa_inet_h -#define _arpa_inet_h - -unsigned long inet_addr(); -char *inet_ntoa(); -/* - * With the introduction of CIDR the following - * routines are now considered to be Obsolete - */ -struct in_addr inet_makeaddr(); -unsigned long inet_network(); - -#endif /* !_arpa_inet_h */ diff --git a/usr/src/lib/libbc/inc/include/auevents.h b/usr/src/lib/libbc/inc/include/auevents.h deleted file mode 100644 index c36f016c67..0000000000 --- a/usr/src/lib/libbc/inc/include/auevents.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1987 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" -/* - * Integer, short and long representations of audit event classes - * used by audit mechanism. - * - * audit.h must be included before this include file. AU_* values - * are defined in audit.h. - */ - -#ifndef _auevents_h -#define _auevents_h - -#define AU_ALL AU_DREAD|AU_DWRITE|AU_DACCESS|AU_DCREATE|AU_LOGIN|AU_SREAD|AU_SCTL |AU_MINPRIV|AU_MAJPRIV|AU_ADMIN|AU_ASSIGN - -struct event_cl { - unsigned int event_mask; - char *event_sname; - char *event_lname; -} event_class[] ={ - AU_DREAD, "dr", "data_read", - AU_DWRITE, "dw", "data_write", - AU_DACCESS, "da", "data_access_change", - AU_DCREATE, "dc", "data_create", - AU_LOGIN, "lo", "login_logout", - AU_SREAD, "sr", "spooler_read", - AU_SCTL, "sc", "spooler_control", - AU_MINPRIV, "p0", "minor_privilege", - AU_MAJPRIV, "p1", "major_privilege", - AU_ADMIN, "ad", "administrative", - AU_ASSIGN, "as", "device_assign", - AU_ALL, "all", "all" -}; - -#endif /*!_auevents_h*/ diff --git a/usr/src/lib/libbc/inc/include/ctype.h b/usr/src/lib/libbc/inc/include/ctype.h deleted file mode 100644 index 79bfcdc407..0000000000 --- a/usr/src/lib/libbc/inc/include/ctype.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1989 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - - -#define _U 01 -#define _L 02 -#define _N 04 -#define _S 010 -#define _P 020 -#define _C 040 -#define _X 0100 -#define _B 0200 - -extern char _ctype_[]; - -#define isalpha(c) ((_ctype_+1)[c]&(_U|_L)) -#define isupper(c) ((_ctype_+1)[c]&_U) -#define islower(c) ((_ctype_+1)[c]&_L) -#define isdigit(c) ((_ctype_+1)[c]&_N) -#define isxdigit(c) ((_ctype_+1)[c]&_X) -#define isspace(c) ((_ctype_+1)[c]&_S) -#define ispunct(c) ((_ctype_+1)[c]&_P) -#define isalnum(c) ((_ctype_+1)[c]&(_U|_L|_N)) -#define isprint(c) ((_ctype_+1)[c]&(_P|_U|_L|_N|_B)) -#define isgraph(c) ((_ctype_+1)[c]&(_P|_U|_L|_N)) -#define iscntrl(c) ((_ctype_+1)[c]&_C) -#define isascii(c) ((unsigned)(c)<=0177) -#define toascii(c) ((c)&0177) diff --git a/usr/src/lib/libbc/inc/include/des/des_crypt.h b/usr/src/lib/libbc/inc/include/des/des_crypt.h deleted file mode 100644 index 521da663e1..0000000000 --- a/usr/src/lib/libbc/inc/include/des/des_crypt.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2000 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ - -/* - * Portions of this source code were derived from Berkeley 4.3 BSD - * under license from the Regents of the University of California. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * des_crypt.h, des library routine interface - */ - -#define DES_MAXDATA 8192 /* max bytes encrypted in one call */ -#define DES_DIRMASK (1 << 0) -#define DES_ENCRYPT (0*DES_DIRMASK) /* Encrypt */ -#define DES_DECRYPT (1*DES_DIRMASK) /* Decrypt */ - - -#define DES_DEVMASK (1 << 1) -#define DES_HW (0*DES_DEVMASK) /* Use hardware device */ -#define DES_SW (1*DES_DEVMASK) /* Use software device */ - - -#define DESERR_NONE 0 /* succeeded */ -#define DESERR_NOHWDEVICE 1 /* succeeded, but hw device not available */ -#define DESERR_HWERROR 2 /* failed, hardware/driver error */ -#define DESERR_BADPARAM 3 /* failed, bad parameter to call */ - -#define DES_FAILED(err) \ - ((err) > DESERR_NOHWDEVICE) - -/* - * cbc_crypt() - * ecb_crypt() - * - * Encrypt (or decrypt) len bytes of a buffer buf. - * The length must be a multiple of eight. - * The key should have odd parity in the low bit of each byte. - * ivec is the input vector, and is updated to the new one (cbc only). - * The mode is created by oring together the appropriate parameters. - * DESERR_NOHWDEVICE is returned if DES_HW was specified but - * there was no hardware to do it on (the data will still be - * encrypted though, in software). - */ - - -/* - * Cipher Block Chaining mode - */ -int -cbc_crypt(/* key, buf, len, mode, ivec */); /* - char *key; - char *buf; - unsigned len; - unsigned mode; - char *ivec; -*/ - - -/* - * Electronic Code Book mode - */ -int -ecb_crypt(/* key, buf, len, mode */); /* - char *key; - char *buf; - unsigned len; - unsigned mode; -*/ - - -#ifndef KERNEL -/* - * Set des parity for a key. - * DES parity is odd and in the low bit of each byte - */ -void -des_setparity(/* key */); /* - char *key; -*/ -#endif diff --git a/usr/src/lib/libbc/inc/include/dirent.h b/usr/src/lib/libbc/inc/include/dirent.h deleted file mode 100644 index 03a8891f78..0000000000 --- a/usr/src/lib/libbc/inc/include/dirent.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1989 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Filesystem-independent directory information. - */ - -#ifndef __dirent_h -#define __dirent_h - -#include <sys/types.h> - -#ifndef _POSIX_SOURCE -#define d_ino d_fileno /* compatability */ -#ifndef NULL -#define NULL 0 -#endif -#endif /* !_POSIX_SOURCE */ - -/* - * Definitions for library routines operating on directories. - */ -typedef struct __dirdesc { - int dd_fd; /* file descriptor */ - long dd_loc; /* buf offset of entry from last readddir() */ - long dd_size; /* amount of valid data in buffer */ - long dd_bsize; /* amount of entries read at a time */ - long dd_off; /* Current offset in dir (for telldir) */ - char *dd_buf; /* directory data buffer */ -} DIR; - -extern DIR *opendir(/* char *dirname */); -extern struct dirent *readdir(/* DIR *dirp */); -extern int closedir(/* DIR *dirp */); -#ifndef _POSIX_SOURCE -extern void seekdir(/* DIR *dirp, int loc */); -extern long telldir(/* DIR *dirp */); -#endif /* POSIX_SOURCE */ -extern void rewinddir(/* DIR *dirp */); - -#ifndef lint -#define rewinddir(dirp) seekdir((dirp), (long)0) -#endif - -#include <sys/dirent.h> - -#endif /* !__dirent_h */ diff --git a/usr/src/lib/libbc/inc/include/dlfcn.h b/usr/src/lib/libbc/inc/include/dlfcn.h deleted file mode 100644 index 2ea9524e07..0000000000 --- a/usr/src/lib/libbc/inc/include/dlfcn.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifndef _dlfcn_h -#define _dlfcn_h - -/* - * Copyright (c) 1989 Sun Microsystems, Inc. - */ - -/* - * Interface description for the contents of libdl -- simple programmer's - * interfaces to the dynamic linker. - */ - -/* - * Manifest constants - */ -#define RTLD_LAZY 1 /* deferred binding of procedures */ - -/* - * Function declarations - */ -extern void *dlopen(); /* open and map a shared object */ -extern void *dlsym(); /* obtain address of symbol */ -extern int dlclose(); /* remove a shared object */ -extern char *dlerror(); /* string representing last error */ - -#endif /* !_dlfcn_h */ diff --git a/usr/src/lib/libbc/inc/include/errno.h b/usr/src/lib/libbc/inc/include/errno.h deleted file mode 100644 index 06955eea4e..0000000000 --- a/usr/src/lib/libbc/inc/include/errno.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Error codes - */ - -#ifndef _errno_h -#define _errno_h - -#include <sys/errno.h> -extern int errno; - -#endif /*!_errno_h*/ diff --git a/usr/src/lib/libbc/inc/include/exportent.h b/usr/src/lib/libbc/inc/include/exportent.h deleted file mode 100644 index 907bbe6d41..0000000000 --- a/usr/src/lib/libbc/inc/include/exportent.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Exported file system table, see exportent(3) - * Copyright (C) 1986 by Sun Microsystems, Inc. - */ - -#ifndef _exportent_h -#define _exportent_h - -#define TABFILE "/etc/xtab" /* where the table is kept */ - -/* - * Options keywords - */ -#define ACCESS_OPT "access" /* machines that can mount fs */ -#define ROOT_OPT "root" /* machines with root access of fs */ -#define RO_OPT "ro" /* export read-only */ -#define RW_OPT "rw" /* export read-mostly */ -#define ANON_OPT "anon" /* uid for anonymous requests */ -#define SECURE_OPT "secure" /* require secure NFS for access */ -#define WINDOW_OPT "window" /* expiration window for credential */ - -struct exportent { - char *xent_dirname; /* directory (or file) to export */ - char *xent_options; /* options, as above */ -}; - -extern FILE *setexportent(); -extern void endexportent(); -extern int remexportent(); -extern int addexportent(); -extern char *getexportopt(); -extern struct exportent *getexportent(); - -#endif /*!_exportent_h*/ diff --git a/usr/src/lib/libbc/inc/include/floatingpoint.h b/usr/src/lib/libbc/inc/include/floatingpoint.h deleted file mode 100644 index 251bb3003f..0000000000 --- a/usr/src/lib/libbc/inc/include/floatingpoint.h +++ /dev/null @@ -1,197 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Copyright (c) 1988 by Sun Microsystems, Inc. - */ - -/* - * IEEE floating-point definitions for constants, types, variables, and - * functions implemented in libc.a for: IEEE floating-point arithmetic base - * conversion; IEEE floating-point arithmetic modes; IEEE floating-point - * arithmetic exception handling; certain functions defined in 4.3 BSD and - * System V. - */ - -#ifndef _floatingpoint_h -#define _floatingpoint_h - -#include <sys/ieeefp.h> - -/* Sun TYPES for IEEE floating point. */ - -typedef float single; -typedef unsigned long extended[3]; /* MC68881/i80387 double-extended type. */ -#ifdef __STDC__ -typedef long double quadruple; /* Quadruple-precision type. */ -#else -typedef struct { - unsigned long u[4]; -} quadruple; /* Quadruple-precision type. */ -#endif - -#define N_IEEE_EXCEPTION 5 /* Number of floating-point exceptions. */ - -typedef unsigned fp_exception_field_type; -/* - * A field containing fp_exceptions OR'ed together. - */ - -typedef int sigfpe_code_type; /* Type of SIGFPE code. */ - -typedef void (*sigfpe_handler_type) (); -/* Pointer to exception handler function. */ - -#define SIGFPE_DEFAULT (void (*)())0 /* default exception handling */ -#define SIGFPE_IGNORE (void (*)())1 /* ignore this exception or code */ -#define SIGFPE_ABORT (void (*)())2 /* force abort on exception */ - -/* Sun VARIABLES for IEEE floating point. */ - -extern enum fp_direction_type fp_direction; -/* - * Current rounding direction. Updated by ieee_flags. - */ - -extern enum fp_precision_type fp_precision; -/* - * Current rounding precision. Updated by ieee_flags. - */ - -extern fp_exception_field_type fp_accrued_exceptions; -/* - * Sticky accumulated exceptions, updated by ieee_flags. In hardware - * implementations this variable is not automatically updated as the hardware - * changes and should therefore not be relied on directly. - */ - -/* Sun definitions for base conversion. */ - -#define DECIMAL_STRING_LENGTH 512 -/* Size of buffer in decimal_record. */ - -typedef char decimal_string[DECIMAL_STRING_LENGTH]; -/* Decimal significand. */ - -typedef struct { - enum fp_class_type fpclass; - int sign; - int exponent; - decimal_string ds; /* Significand - each char contains an ascii - * digit, except the string-terminating ascii - * null. */ - int more; /* On conversion from decimal to binary, != 0 - * indicates more non-zero digits following - * ds. */ - int ndigits;/* On fixed_form conversion from binary to - * decimal, contains number of digits - * required for ds. */ -} - decimal_record; - -enum decimal_form { - fixed_form, /* Fortran F format: ndigits specifies number - * of digits after point; if negative, - * specifies rounding to occur to left of - * point. */ - floating_form /* Fortran E format: ndigits specifies number - * of significant digits. */ -}; - -typedef struct { - enum fp_direction_type rd; - /* Rounding direction. */ - enum decimal_form df; /* Format for binary to decimal conversion. */ - int ndigits;/* Number of digits for conversion. */ -} - decimal_mode; - -enum decimal_string_form { /* Valid decimal number string formats. */ - invalid_form, /* Not a valid decimal string format. */ - whitespace_form, /* All white space - valid in Fortran! */ - fixed_int_form, /* <digs> */ - fixed_intdot_form, /* <digs>. */ - fixed_dotfrac_form, /* .<digs> */ - fixed_intdotfrac_form, /* <digs>.<frac> */ - floating_int_form, /* <digs><exp> */ - floating_intdot_form, /* <digs>.<exp> */ - floating_dotfrac_form, /* .<digs><exp> */ - floating_intdotfrac_form, /* <digs>.<digs><exp> */ - inf_form, /* inf */ - infinity_form, /* infinity */ - nan_form, /* nan */ - nanstring_form /* nan(string) */ -}; - -/* The following externs are used in the implementation of sprintf. */ - -extern void double_to_decimal(); -extern void quadruple_to_decimal(); -extern char *econvert(); -extern char *fconvert(); -extern char *gconvert(); -extern char *qeconvert(); -extern char *qfconvert(); -extern char *qgconvert(); - -/* - The following are used for other parts of base conversion. -*/ - -extern sigfpe_handler_type ieee_handlers[N_IEEE_EXCEPTION]; -/* - * Array of pointers to functions to handle SIGFPE's corresponding to IEEE - * fp_exceptions. sigfpe_default means do not generate SIGFPE. An invalid - * address such as sigfpe_abort will cause abort on that SIGFPE. Updated by - * ieee_handler. - */ - -extern sigfpe_handler_type sigfpe(); - -extern void single_to_decimal(); -extern void extended_to_decimal(); - -extern void decimal_to_single(); -extern void decimal_to_double(); -extern void decimal_to_extended(); -extern void decimal_to_quadruple(); - -extern char *seconvert(); -extern char *sfconvert(); -extern char *sgconvert(); - -extern void string_to_decimal(); -extern void file_to_decimal(); -extern void func_to_decimal(); - -/* Definitions from 4.3 BSD math.h 4.6 9/11/85 */ - -extern double atof(); - -/* Definitions from System V */ - -extern int errno; - -extern double strtod(); - -#endif /* !_floatingpoint_h */ diff --git a/usr/src/lib/libbc/inc/include/fstab.h b/usr/src/lib/libbc/inc/include/fstab.h deleted file mode 100644 index 35b415891f..0000000000 --- a/usr/src/lib/libbc/inc/include/fstab.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * File system table, see fstab (5) - * - * Used by dump, mount, umount, swapon, fsck, df, ... - * - * The fs_spec field is the block special name. Programs - * that want to use the character special name must create - * that name by prepending a 'r' after the right most slash. - * Quota files are always named "quotas", so if type is "rq", - * then use concatenation of fs_file and "quotas" to locate - * quota file. - */ - -#ifndef _fstab_h -#define _fstab_h - -#define FSTAB "/etc/fstab" - -#define FSTAB_RW "rw" /* read/write device */ -#define FSTAB_RQ "rq" /* read/write with quotas */ -#define FSTAB_RO "ro" /* read-only device */ -#define FSTAB_SW "sw" /* swap device */ -#define FSTAB_XX "xx" /* ignore totally */ - -struct fstab{ - char *fs_spec; /* block special device name */ - char *fs_file; /* file system path prefix */ - char *fs_type; /* FSTAB_* */ - int fs_freq; /* dump frequency, in days */ - int fs_passno; /* pass number on parallel dump */ -}; - -struct fstab *getfsent(); -struct fstab *getfsspec(); -struct fstab *getfsfile(); -struct fstab *getfstype(); -int setfsent(); -int endfsent(); - -#endif /*!_fstab_h*/ diff --git a/usr/src/lib/libbc/inc/include/ftw.h b/usr/src/lib/libbc/inc/include/ftw.h deleted file mode 100644 index 68b43db4e1..0000000000 --- a/usr/src/lib/libbc/inc/include/ftw.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Codes for the third argument to the user-supplied function - * which is passed as the second argument to ftw - */ - -#ifndef _ftw_h -#define _ftw_h - -#define FTW_F 0 /* file */ -#define FTW_D 1 /* directory */ -#define FTW_DNR 2 /* directory without read permission */ -#define FTW_NS 3 /* unknown type, stat failed */ - -#endif /*!_ftw_h*/ diff --git a/usr/src/lib/libbc/inc/include/grp.h b/usr/src/lib/libbc/inc/include/grp.h deleted file mode 100644 index 930ba2cc63..0000000000 --- a/usr/src/lib/libbc/inc/include/grp.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifndef __grp_h -#define __grp_h - -#include <sys/types.h> - -struct group { /* see getgrent(3) */ - char *gr_name; - char *gr_passwd; - int gr_gid; - char **gr_mem; -}; - -#ifndef _POSIX_SOURCE -struct group *getgrent(); -#endif - -struct group *getgrgid(/* gid_t gid */); -struct group *getgrnam(/* char *name */); - -#endif /* !__grp_h */ diff --git a/usr/src/lib/libbc/inc/include/grpadj.h b/usr/src/lib/libbc/inc/include/grpadj.h deleted file mode 100644 index df0c523f5d..0000000000 --- a/usr/src/lib/libbc/inc/include/grpadj.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1987 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifndef _grpadj_h -#define _grpadj_h - -struct group_adjunct { /* see getgraent(3) */ - char *gra_name; - char *gra_passwd; -}; - -struct group_adjunct *getgraent(), *getgragid(), *getgranam(); - -#endif /*!_grpadj_h*/ diff --git a/usr/src/lib/libbc/inc/include/langinfo.h b/usr/src/lib/libbc/inc/include/langinfo.h deleted file mode 100644 index af915fa5bc..0000000000 --- a/usr/src/lib/libbc/inc/include/langinfo.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * language infomation constants. - */ - -#define D_T_FMT 0 /* string for formatting data and time */ -#define DAY_1 1 /* Name of the first day of the week */ -#define DAY_2 2 -#define DAY_3 3 -#define DAY_4 4 -#define DAY_5 5 -#define DAY_6 6 -#define DAY_7 7 - -#define ABDAY_1 8 /* Abbreviated name of the first day of the week */ -#define ABDAY_2 9 -#define ABDAY_3 10 -#define ABDAY_4 11 -#define ABDAY_5 12 -#define ABDAY_6 13 -#define ABDAY_7 14 - -#define MON_1 15 /* Name of the first month */ -#define MON_2 16 -#define MON_3 17 -#define MON_4 18 -#define MON_5 19 -#define MON_6 20 -#define MON_7 21 -#define MON_8 22 -#define MON_9 23 -#define MON_10 24 -#define MON_11 25 -#define MON_12 26 - -#define ABMON_1 27 /* Abbreviated name of the first month */ -#define ABMON_2 28 -#define ABMON_3 29 -#define ABMON_4 30 -#define ABMON_5 31 -#define ABMON_6 32 -#define ABMON_7 33 -#define ABMON_8 34 -#define ABMON_9 35 -#define ABMON_10 36 -#define ABMON_11 37 -#define ABMON_12 38 - -#define RADIXCHAR 39 /* Radix character */ -#define THOUSEP 40 /* Separator for thousands */ -#define YESSTR 41 /* Affirmative response for yes/no queries */ -#define NOSTR 42 /* Negative response for yes/no queries */ -#define CRNCYSTR 43 /* Currency symbol */ diff --git a/usr/src/lib/libbc/inc/include/limits.h b/usr/src/lib/libbc/inc/include/limits.h deleted file mode 100644 index 33a4b8833d..0000000000 --- a/usr/src/lib/libbc/inc/include/limits.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1989 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" -/* from S5R2 1.1 */ - -#ifndef __sys_limits_h -#define __sys_limits_h - -#define CHAR_BIT 0x8 -#define SCHAR_MIN -0x80 -#define SCHAR_MAX 0x7F -#define UCHAR_MAX 0xFF -#define CHAR_MIN -0x80 -#define CHAR_MAX 0x7F -#define SHRT_MIN -0x8000 -#define SHRT_MAX 0x7FFF -#define USHRT_MAX 0xFFFF -#define INT_MIN -0x80000000 -#define INT_MAX 0x7FFFFFFF -#define UINT_MAX 0xFFFFFFFF -#define LONG_MIN -0x80000000 -#define LONG_MAX 0x7FFFFFFF -#define ULONG_MAX 0xFFFFFFFF -#define MB_LEN_MAX 4 - -/* - * All POSIX systems must support the following values - * A system may support less restrictive values - */ -#define _POSIX_ARG_MAX 4096 -#define _POSIX_CHILD_MAX 6 -#define _POSIX_LINK_MAX 8 -#define _POSIX_MAX_CANON 255 -#define _POSIX_MAX_INPUT 255 -#define _POSIX_NAME_MAX 14 -#define _POSIX_NGROUPS_MAX 0 -#define _POSIX_OPEN_MAX 16 -#define _POSIX_PATH_MAX 255 -#define _POSIX_PIPE_BUF 512 - -#define NGROUPS_MAX 16 /* Must match <sys/param.h> NGROUPS */ -#endif /* !__sys_limits_h */ diff --git a/usr/src/lib/libbc/inc/include/link.h b/usr/src/lib/libbc/inc/include/link.h deleted file mode 100644 index b8e7cf217a..0000000000 --- a/usr/src/lib/libbc/inc/include/link.h +++ /dev/null @@ -1,178 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Copyright (c) 1987 by Sun Microsystems, Inc. - */ - -/* - * Link editor public definitions. - */ - -#ifndef _link_h -#define _link_h - -/* - * Structure describing logical name and requirements on an object - * which is to be loaded dynamically. - */ -struct old_link_object { - char *lo_name; /* name of object */ - int lo_library : 1, /* searched for by library rules */ - lo_unused : 31; - short lo_major; /* major version number */ - short lo_minor; /* minor version number */ -}; - -struct link_object { - long lo_name; /* name (often relative) */ - int lo_library : 1, /* searched for by library rules */ - lo_unused : 31; - short lo_major; /* major version number */ - short lo_minor; /* minor version number */ - long lo_next; /* next one (often relative) */ -}; - -/* - * Structure describing name and placement of dynamically loaded - * objects in a process' address space. - */ -struct link_map { - caddr_t lm_addr; /* address at which object mapped */ - char *lm_name; /* full name of loaded object */ - struct link_map *lm_next; /* next object in map */ - struct link_object *lm_lop; /* link object that got us here */ - caddr_t lm_lob; /* base address for said link object */ - int lm_rwt : 1; /* text is read/write */ - struct link_dynamic *lm_ld; /* dynamic structure */ - caddr_t lm_lpd; /* loader private data */ -}; - -/* - * Version 1 of dynamic linking information. With the exception of - * ld_loaded (determined at execution time) and ld_stab_hash (a special - * case of relocation handled at execution time), the values in this - * structure reflect offsets from the containing link_dynamic structure. - */ -struct link_dynamic_1 { - struct link_map *ld_loaded; /* list of loaded objects */ - long ld_need; /* list of needed objects */ - long ld_rules; /* search rules for library objects */ - long ld_got; /* global offset table */ - long ld_plt; /* procedure linkage table */ - long ld_rel; /* relocation table */ - long ld_hash; /* symbol hash table */ - long ld_stab; /* symbol table itself */ - long (*ld_stab_hash)(); /* "pointer" to symbol hash function */ - long ld_buckets; /* number of hash buckets */ - long ld_symbols; /* symbol strings */ - long ld_symb_size; /* size of symbol strings */ - long ld_text; /* size of text area */ -}; - -struct link_dynamic_2 { - struct link_map *ld_loaded; /* list of loaded objects */ - long ld_need; /* list of needed objects */ - long ld_rules; /* search rules for library objects */ - long ld_got; /* global offset table */ - long ld_plt; /* procedure linkage table */ - long ld_rel; /* relocation table */ - long ld_hash; /* symbol hash table */ - long ld_stab; /* symbol table itself */ - long (*ld_stab_hash)(); /* "pointer" to symbol hash function */ - long ld_buckets; /* number of hash buckets */ - long ld_symbols; /* symbol strings */ - long ld_symb_size; /* size of symbol strings */ - long ld_text; /* size of text area */ - long ld_plt_sz; /* size of procedure linkage table */ -}; - -/* - * Structure pointing to run time allocated common symbols and - * its string. - */ -struct rtc_symb { - struct nlist *rtc_sp; /* symbol for common */ - struct rtc_symb *rtc_next; /* next common */ -}; - -/* - * Debugger interface structure. - */ -struct ld_debug { - int ldd_version; /* version # of interface */ - int ldd_in_debugger; /* a debugger is running us */ - int ldd_sym_loaded; /* we loaded some symbols */ - char *ldd_bp_addr; /* place for ld-generated bpt */ - int ldd_bp_inst; /* instruction which was there */ - struct rtc_symb *ldd_cp; /* commons we built */ -}; - -/* - * Structure associated with each object which may be or which requires - * execution-time link editing. Used by the run-time linkage editor to - * identify needed objects and symbol definitions and references. - */ -struct old_link_dynamic { - int ld_version; /* version # of this structure */ - union { - struct link_dynamic_1 ld_1; - } ld_un; - - int in_debugging; - int sym_loaded; - char *bp_addr; - int bp_inst; - struct rtc_symb *cp; /* pointer to an array of runtime */ - /* allocated common symbols. */ -}; - -struct link_dynamic { - int ld_version; /* version # of this structure */ - struct ld_debug *ldd; - union { - struct link_dynamic_1 *ld_1; - struct link_dynamic_2 *ld_2; - } ld_un; -}; - -#define v2 ld_un.ld_2 -#define v1 ld_un.ld_1 - -/* - * get size of relocations - */ -#define GETGOTSZ(x) (x->ld_version < 2 ? ((struct old_link_dynamic *) x)->v1.ld_plt - ((struct old_link_dynamic *) x)->v1.ld_got : (x)->v2->ld_plt - (x)->v2->ld_got) - -#define GETPLTSZ(x) (x->ld_version < 2 ? ((struct old_link_dynamic *) x)->v1.ld_rel - ((struct old_link_dynamic *) x)->v1.ld_plt : (x)->v2->ld_rel - (x)->v2->ld_plt) - -#define GETRELSZ(x) (x->ld_version < 2 ? ((struct old_link_dynamic *) x)->v1.ld_hash - ((struct old_link_dynamic *) x)->v1.ld_rel : (x)->v2->ld_hash - (x)->v2->ld_rel) - -#define GETHASHSZ(x) (x->ld_version < 2 ? ((struct old_link_dynamic *) x)->v1.ld_stab - ((struct old_link_dynamic *) x)->v1.ld_hash : (x)->v2->ld_stab - (x)->v2->ld_hash) - -#define GETSTABSZ(x) (x->ld_version < 2 ? ((struct old_link_dynamic *) x)->v1.ld_symbols - ((struct old_link_dynamic *) x)->v1.ld_stab : (x)->v2->ld_symbols - (x)->v2->ld_stab) - -#undef v2 -#undef v1 - -#endif /*!_link_h*/ diff --git a/usr/src/lib/libbc/inc/include/locale.h b/usr/src/lib/libbc/inc/include/locale.h deleted file mode 100644 index 1018fb3700..0000000000 --- a/usr/src/lib/libbc/inc/include/locale.h +++ /dev/null @@ -1,158 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1988 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef __locale_h -#define __locale_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Locale indices. - */ - -#ifndef NULL -#define NULL 0 -#endif - -#define LC_ALL 0 -#define LC_CTYPE 1 -#define LC_NUMERIC 2 -#define LC_TIME 3 -#define LC_MONETARY 4 -#ifndef _POSIX_SOURCE -#define LANGINFO 5 -#endif -#define LC_COLLATE 6 -#define LC_MESSAGES 7 - -#ifndef _POSIX_SOURCE -#define MAXLOCALE 8 - -#define ON 1 -#define OFF 0 -/* The maximum number of characters in the locale name */ - -#define MAXLOCALENAME 14 - -/* The maximum number of substitute mappings in LC_COLLATE table */ - -#define MAXSUBS 64 - -/* Max width of domain name */ - -#define MAXDOMAIN 255 - -/* Max width of format string for message domains */ - -#define MAXFMTS 32 - -/* Max width of the message string */ - -#define MAXMSGSTR 255 - -/* The directory where category components are kept */ - -#define LOCALE_DIR "/usr/share/lib/locale/" - -/* The directory that is private to an individual workstation user */ - -#define PRIVATE_LOCALE_DIR "/etc/locale/" - -/* The name of the file that contains default locale */ - -#define DEFAULT_LOC ".default" - - -/* size of "ctype" */ - -#define CTYPE_SIZE 514 -#endif /* _POSIX_SOURCE */ - -extern char * setlocale(/* int category, const char *locale */); -extern struct lconv * localeconv(/* void */); -#ifndef _POSIX_SOURCE -extern struct dtconv * localdtconv(); -#endif - -/* - * Numeric and monetary conversion information. - */ -struct lconv { - char *decimal_point; /* decimal point character */ - char *thousands_sep; /* thousands separator character */ - char *grouping; /* grouping of digits */ - char *int_curr_symbol; /* international currency symbol */ - char *currency_symbol; /* local currency symbol */ - char *mon_decimal_point; /* monetary decimal point character */ - char *mon_thousands_sep; /* monetary thousands separator */ - char *mon_grouping; /* monetary grouping of digits */ - char *positive_sign; /* monetary credit symbol */ - char *negative_sign; /* monetary debit symbol */ - char int_frac_digits; /* intl monetary number of fractional digits */ - char frac_digits; /* monetary number of fractional digits */ - char p_cs_precedes; /* true if currency symbol precedes credit */ - char p_sep_by_space; /* true if space separates c.s. from credit */ - char n_cs_precedes; /* true if currency symbol precedes debit */ - char n_sep_by_space; /* true if space separates c.s. from debit */ - char p_sign_posn; /* position of sign for credit */ - char n_sign_posn; /* position of sign for debit */ -}; - -#ifndef _POSIX_SOURCE -/* - * Date and time conversion information. - */ -struct dtconv { - char *abbrev_month_names[12]; /* abbreviated month names */ - char *month_names[12]; /* full month names */ - char *abbrev_weekday_names[7]; /* abbreviated weekday names */ - char *weekday_names[7]; /* full weekday names */ - char *time_format; /* time format */ - char *sdate_format; /* short date format */ - char *dtime_format; /* date/time format */ - char *am_string; /* AM string */ - char *pm_string; /* PM string */ - char *ldate_format; /* long date format */ -}; - -/* - * Langinfo - */ -struct langinfo { - char *yesstr; /* yes string */ - char *nostr; /* nostr */ -}; - -/* - * NLS nl_init - */ -#define valid(ptr) (ptr != (char *) NULL) -#define nl_init(lang) ((valid(lang) && *lang) ? \ - (valid(setlocale (LC_ALL, lang) ) ? 0 : -1) \ - : -1) -#endif /* _POSIX_SOURCE */ - -#endif /* !__locale_h */ diff --git a/usr/src/lib/libbc/inc/include/malloc.h b/usr/src/lib/libbc/inc/include/malloc.h deleted file mode 100644 index b3c2214bbc..0000000000 --- a/usr/src/lib/libbc/inc/include/malloc.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1989 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifndef __malloc_h -#define __malloc_h - -/* - * Constants defining mallopt operations - */ -#define M_MXFAST 1 /* set size of 'small blocks' */ -#define M_NLBLKS 2 /* set num of small blocks in holding block */ -#define M_GRAIN 3 /* set rounding factor for small blocks */ -#define M_KEEP 4 /* (nop) retain contents of freed blocks */ - -/* - * malloc information structure - */ -struct mallinfo { - int arena; /* total space in arena */ - int ordblks; /* number of ordinary blocks */ - int smblks; /* number of small blocks */ - int hblks; /* number of holding blocks */ - int hblkhd; /* space in holding block headers */ - int usmblks; /* space in small blocks in use */ - int fsmblks; /* space in free small blocks */ - int uordblks; /* space in ordinary blocks in use */ - int fordblks; /* space in free ordinary blocks */ - int keepcost; /* cost of enabling keep option */ - - int mxfast; /* max size of small blocks */ - int nlblks; /* number of small blocks in a holding block */ - int grain; /* small block rounding factor */ - int uordbytes; /* space (including overhead) allocated in ord. blks */ - int allocated; /* number of ordinary blocks allocated */ - int treeoverhead; /* bytes used in maintaining the free tree */ -}; - -typedef char * malloc_t; - -extern malloc_t calloc(/* size_t nmemb, size_t size */); -extern int free(/* malloc_t ptr */); -extern malloc_t malloc(/* size_t size */); -extern malloc_t realloc(/* malloc_t ptr, size_t size */); -extern int mallopt(); -extern struct mallinfo mallinfo(); - -#endif /* !__malloc_h */ diff --git a/usr/src/lib/libbc/inc/include/math.h b/usr/src/lib/libbc/inc/include/math.h deleted file mode 100644 index 0f864b1b7a..0000000000 --- a/usr/src/lib/libbc/inc/include/math.h +++ /dev/null @@ -1,357 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright (c) 1988 by Sun Microsystems, Inc. - */ - -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - - -/* - * Math library definitions for all the public functions implemented in libm.a. - */ - -#ifndef __math_h -#define __math_h - -/* - * Posix (actually ansi C) section - */ -#define HUGE_VAL (__infinity()) /* Produces IEEE Infinity. */ - - -extern double __infinity(); -extern double acos(/* double x */); -extern double asin(/* double x */); -extern double atan(/* double x */); -extern double atan2(/* double y, double x */); -extern double ceil(/* double x */); -extern double cos(/* double x */); -extern double cosh(/* double x */); -extern double exp(/* double x */); -extern double fabs(/* double x */); -extern double floor(/* double x */); -extern double fmod(/* double x, double y */); -extern double frexp(/* double value, int *exp */); -extern double ldexp(/* double value, int exp */); -extern double log(/* double x */); -extern double log10(/* double x */); -extern double modf(/* double value, double *iptr */); -extern double pow(/* double x, double y */); -extern double sin(/* double x */); -extern double sinh(/* double x */); -extern double sqrt(/* double x */); -extern double tan(/* double x */); -extern double tanh(/* double x */); - -#ifndef _POSIX_SOURCE /* the rest of the file is !POSIX */ -#include <floatingpoint.h> /* Contains definitions for types and - * functions implemented in libc.a. - */ -extern double acosh(); -extern double asinh(); -extern double atanh(); -extern double cbrt(); -extern double copysign(); -extern double erf(); -extern double erfc(); -extern double expm1(); -extern int finite(); -extern double hypot(); -extern double j0(); -extern double j1(); -extern double jn(); -extern double lgamma(); -extern double log1p(); -extern double rint(); -extern double y0(); -extern double y1(); -extern double yn(); - -/* - * Sun definitions. - */ - -/* - * Implemented precisions for trigonometric argument reduction. - */ -enum fp_pi_type { - fp_pi_infinite = 0, /* Infinite-precision approximation to pi. */ - fp_pi_66 = 1, /* 66-bit approximation to pi. */ - fp_pi_53 = 2 /* 53-bit approximation to pi. */ -}; - -/* - * Pi precision to use for trigonometric argument reduction. - */ -extern enum fp_pi_type fp_pi; - -/* - * Functions callable from C, intended to support IEEE arithmetic. - */ -extern enum fp_class_type fp_class(); -extern int ieee_flags(); -extern int ieee_handler(); -extern void ieee_retrospective(); -extern int ilogb(); -extern double infinity(); -extern int irint(); -extern int isinf(); -extern int isnan(); -extern int isnormal(); -extern int issubnormal(); -extern int iszero(); -extern double logb(); -extern double max_normal(); -extern double max_subnormal(); -extern double min_normal(); -extern double min_subnormal(); -extern double nextafter(); -extern void nonstandard_arithmetic(); -extern double quiet_nan(); -extern double remainder(); -extern double scalb(); -extern double scalbn(); -extern double signaling_nan(); -extern int signbit(); -extern double significand(); -extern void standard_arithmetic(); - -/* - * Other functions for C programmers. - */ -extern double acospi(); -extern double aint(); -extern double anint(); -extern double annuity(); -extern double asinpi(); -extern double atan2pi(); -extern double atanpi(); -extern double compound(); -extern double cospi(); -extern double exp10(); -extern double exp2(); -extern double log2(); -extern int nint(); -extern void sincos(); -extern void sincospi(); -extern double sinpi(); -extern double tanpi(); -extern int matherr(); - - -/* - * Single-precision functions callable from Fortran, Pascal, Modula-2, etc, - * take float* arguments instead of double and - * return FLOATFUNCTIONTYPE results instead of double. - * RETURNFLOAT is used to return a float function value without conversion - * to double. - * ASSIGNFLOAT is used to get the float value out of a FLOATFUNCTIONTYPE - * result. - * We don't want you to have to think about -fsingle2. - * - * Some internal library functions pass float parameters as 32-bit values, - * disguised as FLOATPARAMETER. FLOATPARAMETERVALUE(x) extracts the - * float value from the FLOATPARAMETER. - */ - -/* mc68000 returns float results in d0, same as int */ - -#ifdef mc68000 -#define FLOATFUNCTIONTYPE int -#define RETURNFLOAT(x) return (*(int *)(&(x))) -#define ASSIGNFLOAT(x,y) *(int *)(&x) = y -#endif - -/* sparc returns float results in %f0, same as top half of double */ - -#ifdef sparc -#define FLOATFUNCTIONTYPE double -#define RETURNFLOAT(x) { union {double _d; float _f } _kluge; _kluge._f = (x); return _kluge._d; } -#define ASSIGNFLOAT(x,y) { union {double _d; float _f } _kluge; _kluge._d = (y); x = _kluge._f; } -#endif - -/* i386 returns float results on stack as extendeds, same as double */ - -#ifdef i386 -#define FLOATFUNCTIONTYPE float -#define RETURNFLOAT(x) return (x) -#define ASSIGNFLOAT(x,y) x = y -#endif - -/* So far everybody passes float parameters as 32 bits on stack, same as int. */ - -#define FLOATPARAMETER int -#define FLOATPARAMETERVALUE(x) (*(float *)(&(x))) - -extern int ir_finite_(); -extern enum fp_class_type ir_fp_class_(); -extern int ir_ilogb_(); -extern int ir_irint_(); -extern int ir_isinf_(); -extern int ir_isnan_(); -extern int ir_isnormal_(); -extern int ir_issubnormal_(); -extern int ir_iszero_(); -extern int ir_nint_(); -extern int ir_signbit_(); -extern void r_sincos_(); -extern void r_sincospi_(); -extern FLOATFUNCTIONTYPE r_acos_(); -extern FLOATFUNCTIONTYPE r_acosh_(); -extern FLOATFUNCTIONTYPE r_acospi_(); -extern FLOATFUNCTIONTYPE r_aint_(); -extern FLOATFUNCTIONTYPE r_anint_(); -extern FLOATFUNCTIONTYPE r_annuity_(); -extern FLOATFUNCTIONTYPE r_asin_(); -extern FLOATFUNCTIONTYPE r_asinh_(); -extern FLOATFUNCTIONTYPE r_asinpi_(); -extern FLOATFUNCTIONTYPE r_atan2_(); -extern FLOATFUNCTIONTYPE r_atan2pi_(); -extern FLOATFUNCTIONTYPE r_atan_(); -extern FLOATFUNCTIONTYPE r_atanh_(); -extern FLOATFUNCTIONTYPE r_atanpi_(); -extern FLOATFUNCTIONTYPE r_cbrt_(); -extern FLOATFUNCTIONTYPE r_ceil_(); -extern FLOATFUNCTIONTYPE r_compound_(); -extern FLOATFUNCTIONTYPE r_copysign_(); -extern FLOATFUNCTIONTYPE r_cos_(); -extern FLOATFUNCTIONTYPE r_cosh_(); -extern FLOATFUNCTIONTYPE r_cospi_(); -extern FLOATFUNCTIONTYPE r_erf_(); -extern FLOATFUNCTIONTYPE r_erfc_(); -extern FLOATFUNCTIONTYPE r_exp10_(); -extern FLOATFUNCTIONTYPE r_exp2_(); -extern FLOATFUNCTIONTYPE r_exp_(); -extern FLOATFUNCTIONTYPE r_expm1_(); -extern FLOATFUNCTIONTYPE r_fabs_(); -extern FLOATFUNCTIONTYPE r_floor_(); -extern FLOATFUNCTIONTYPE r_fmod_(); -extern FLOATFUNCTIONTYPE r_hypot_(); -extern FLOATFUNCTIONTYPE r_infinity_(); -extern FLOATFUNCTIONTYPE r_j0_(); -extern FLOATFUNCTIONTYPE r_j1_(); -extern FLOATFUNCTIONTYPE r_jn_(); -extern FLOATFUNCTIONTYPE r_lgamma_(); -extern FLOATFUNCTIONTYPE r_log10_(); -extern FLOATFUNCTIONTYPE r_log1p_(); -extern FLOATFUNCTIONTYPE r_log2_(); -extern FLOATFUNCTIONTYPE r_log_(); -extern FLOATFUNCTIONTYPE r_logb_(); -extern FLOATFUNCTIONTYPE r_max_normal_(); -extern FLOATFUNCTIONTYPE r_max_subnormal_(); -extern FLOATFUNCTIONTYPE r_min_normal_(); -extern FLOATFUNCTIONTYPE r_min_subnormal_(); -extern FLOATFUNCTIONTYPE r_nextafter_(); -extern FLOATFUNCTIONTYPE r_pow_(); -extern FLOATFUNCTIONTYPE r_quiet_nan_(); -extern FLOATFUNCTIONTYPE r_remainder_(); -extern FLOATFUNCTIONTYPE r_rint_(); -extern FLOATFUNCTIONTYPE r_scalb_(); -extern FLOATFUNCTIONTYPE r_scalbn_(); -extern FLOATFUNCTIONTYPE r_signaling_nan_(); -extern FLOATFUNCTIONTYPE r_significand_(); -extern FLOATFUNCTIONTYPE r_sin_(); -extern FLOATFUNCTIONTYPE r_sinh_(); -extern FLOATFUNCTIONTYPE r_sinpi_(); -extern FLOATFUNCTIONTYPE r_sqrt_(); -extern FLOATFUNCTIONTYPE r_tan_(); -extern FLOATFUNCTIONTYPE r_tanh_(); -extern FLOATFUNCTIONTYPE r_tanpi_(); -extern FLOATFUNCTIONTYPE r_y0_(); -extern FLOATFUNCTIONTYPE r_y1_(); -extern FLOATFUNCTIONTYPE r_yn_(); - -/* Constants, variables, and functions from System V */ - -#define _ABS(x) ((x) < 0 ? -(x) : (x)) - -#define HUGE (infinity()) /* For historical compatibility. */ - -#define DOMAIN 1 -#define SING 2 -#define OVERFLOW 3 -#define UNDERFLOW 4 -#define TLOSS 5 -#define PLOSS 6 - -struct exception { - int type; - char *name; - double arg1; - double arg2; - double retval; -}; - -/* - * First three have to be defined exactly as in values.h including spacing! - */ -#define M_LN2 0.69314718055994530942 -#define M_PI 3.14159265358979323846 -#define M_SQRT2 1.41421356237309504880 - -#define M_E 2.7182818284590452354 -#define M_LOG2E 1.4426950408889634074 -#define M_LOG10E 0.43429448190325182765 -#define M_LN10 2.30258509299404568402 -#define M_PI_2 1.57079632679489661923 -#define M_PI_4 0.78539816339744830962 -#define M_1_PI 0.31830988618379067154 -#define M_2_PI 0.63661977236758134308 -#define M_2_SQRTPI 1.12837916709551257390 -#define M_SQRT1_2 0.70710678118654752440 -#define _REDUCE(TYPE, X, XN, C1, C2) { \ - double x1 = (double)(TYPE)X, x2 = X - x1; \ - X = x1 - (XN) * (C1); X += x2; X -= (XN) * (C2); } -#define _POLY1(x, c) ((c)[0] * (x) + (c)[1]) -#define _POLY2(x, c) (_POLY1((x), (c)) * (x) + (c)[2]) -#define _POLY3(x, c) (_POLY2((x), (c)) * (x) + (c)[3]) -#define _POLY4(x, c) (_POLY3((x), (c)) * (x) + (c)[4]) -#define _POLY5(x, c) (_POLY4((x), (c)) * (x) + (c)[5]) -#define _POLY6(x, c) (_POLY5((x), (c)) * (x) + (c)[6]) -#define _POLY7(x, c) (_POLY6((x), (c)) * (x) + (c)[7]) -#define _POLY8(x, c) (_POLY7((x), (c)) * (x) + (c)[8]) -#define _POLY9(x, c) (_POLY8((x), (c)) * (x) + (c)[9]) - -extern int signgam; -/* - * Deprecated functions for compatibility with past. - * Changes planned for future. - */ - -extern double cabs(); /* Use double hypot(x,y) - * Traditional cabs usage is confused - - * is its argument two doubles or one struct? - */ -extern double drem(); /* Use double remainder(x,y) - * drem will disappear in a future release. - */ -extern double gamma(); /* Use double lgamma(x) - * to compute log of gamma function. - * Name gamma is reserved for true gamma function - * to appear in a future release. - */ -#endif /* !_POSIX_SOURCE */ -#endif /* !__math_h */ diff --git a/usr/src/lib/libbc/inc/include/memory.h b/usr/src/lib/libbc/inc/include/memory.h deleted file mode 100644 index afb89b874e..0000000000 --- a/usr/src/lib/libbc/inc/include/memory.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifndef _memory_h -#define _memory_h - -extern char - *memccpy(), - *memchr(), - *memcpy(), - *memset(); -extern int memcmp(); - -#endif /*!_memory_h*/ diff --git a/usr/src/lib/libbc/inc/include/mntent.h b/usr/src/lib/libbc/inc/include/mntent.h deleted file mode 100644 index 9658fd158e..0000000000 --- a/usr/src/lib/libbc/inc/include/mntent.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1989 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * File system table, see mntent (5) - * - * Used by dump, mount, umount, swapon, fsck, df, ... - * - * Quota files are always named "quotas", so if type is "rq", - * then use concatenation of mnt_dir and "quotas" to locate - * quota file. - */ - -#ifndef _mntent_h -#define _mntent_h - -#define MNTTAB "/etc/fstab" -#define MOUNTED "/etc/mtab" - -#define MNTMAXSTR 128 - -#define MNTTYPE_42 "4.2" /* 4.2 file system */ -#define MNTTYPE_NFS "nfs" /* network file system */ -#define MNTTYPE_PC "pc" /* IBM PC (MSDOS) file system */ -#define MNTTYPE_SWAP "swap" /* swap file system */ -#define MNTTYPE_IGNORE "ignore"/* No type specified, ignore this entry */ -#define MNTTYPE_LO "lo" /* Loop back File system */ - -/* mount options */ -#define MNTOPT_RO "ro" /* read only */ -#define MNTOPT_RW "rw" /* read/write */ -#define MNTOPT_GRPID "grpid" /* SysV-compatible group-id on create */ -#define MNTOPT_REMOUNT "remount"/* change options on previous mount */ -#define MNTOPT_NOAUTO "noauto"/* hide entry from mount -a */ -#define MNTOPT_NOSUB "nosub" /* disallow mounts beneath this one */ - -/* 4.2 specific options */ -#define MNTOPT_QUOTA "quota" /* quotas */ -#define MNTOPT_NOQUOTA "noquota"/* no quotas */ - -/* NFS specific options */ -#define MNTOPT_SOFT "soft" /* soft mount */ -#define MNTOPT_HARD "hard" /* hard mount (default) */ -#define MNTOPT_NOSUID "nosuid"/* no set uid allowed */ -#define MNTOPT_INTR "intr" /* allow interrupts on hard mount */ -#define MNTOPT_SECURE "secure"/* use secure RPC for NFS */ -#define MNTOPT_NOAC "noac" /* don't cache file attributes */ -#define MNTOPT_NOCTO "nocto" /* no "close to open" attr consistency */ -#define MNTOPT_PORT "port" /* server IP port number */ -#define MNTOPT_RETRANS "retrans" /* set number of request retries */ -#define MNTOPT_RSIZE "rsize" /* set read size (bytes) */ -#define MNTOPT_WSIZE "wsize" /* set write size (bytes) */ -#define MNTOPT_TIMEO "timeo" /* set initial timeout (1/10 sec) */ -#define MNTOPT_ACTIMEO "actimeo" /* attr cache timeout (sec) */ -#define MNTOPT_ACREGMIN "acregmin" /* min ac timeout for reg files (sec) */ -#define MNTOPT_ACREGMAX "acregmax" /* max ac timeout for reg files (sec) */ -#define MNTOPT_ACDIRMIN "acdirmin" /* min ac timeout for dirs (sec) */ -#define MNTOPT_ACDIRMAX "acdirmax" /* max ac timeout for dirs (sec) */ -#define MNTOPT_POSIX "posix" /* ask for static pathconf values from mountd */ - -/* Information about the mount entry */ -#define MNTINFO_DEV "dev" /* device number of the mounted file system */ - -struct mntent { - char *mnt_fsname; /* name of mounted file system */ - char *mnt_dir; /* file system path prefix */ - char *mnt_type; /* MNTTYPE_* */ - char *mnt_opts; /* MNTOPT* */ - int mnt_freq; /* dump frequency, in days */ - int mnt_passno; /* pass number on parallel fsck */ -}; - -struct mntent *getmntent(); -char *hasmntopt(); -FILE *setmntent(); -int endmntent(); - -#endif /*!_mntent_h*/ diff --git a/usr/src/lib/libbc/inc/include/ndbm.h b/usr/src/lib/libbc/inc/include/ndbm.h deleted file mode 100644 index 8ef72a39a9..0000000000 --- a/usr/src/lib/libbc/inc/include/ndbm.h +++ /dev/null @@ -1,69 +0,0 @@ -#pragma ident "%Z%%M% %I% %E% SMI" -/* - * Copyright (c) 1983 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - * - */ - -/* - * Hashed key data base library. - */ - -#ifndef _ndbm_h -#define _ndbm_h - -#define PBLKSIZ 1024 -#define DBLKSIZ 4096 - -typedef struct { - int dbm_dirf; /* open directory file */ - int dbm_pagf; /* open page file */ - int dbm_flags; /* flags, see below */ - long dbm_maxbno; /* last ``bit'' in dir file */ - long dbm_bitno; /* current bit number */ - long dbm_hmask; /* hash mask */ - long dbm_blkptr; /* current block for dbm_nextkey */ - int dbm_keyptr; /* current key for dbm_nextkey */ - long dbm_blkno; /* current page to read/write */ - long dbm_pagbno; /* current page in pagbuf */ - char dbm_pagbuf[PBLKSIZ]; /* page file block buffer */ - long dbm_dirbno; /* current block in dirbuf */ - char dbm_dirbuf[DBLKSIZ]; /* directory file block buffer */ -} DBM; - -#define _DBM_RDONLY 0x1 /* data base open read-only */ -#define _DBM_IOERR 0x2 /* data base I/O error */ - -#define dbm_rdonly(db) ((db)->dbm_flags & _DBM_RDONLY) - -#define dbm_error(db) ((db)->dbm_flags & _DBM_IOERR) - /* use this one at your own risk! */ -#define dbm_clearerr(db) ((db)->dbm_flags &= ~_DBM_IOERR) - -/* for flock(2) and fstat(2) */ -#define dbm_dirfno(db) ((db)->dbm_dirf) -#define dbm_pagfno(db) ((db)->dbm_pagf) - -typedef struct { - char *dptr; - int dsize; -} datum; - -/* - * flags to dbm_store() - */ -#define DBM_INSERT 0 -#define DBM_REPLACE 1 - -DBM *dbm_open(); -void dbm_close(); -datum dbm_fetch(); -datum dbm_firstkey(); -datum dbm_nextkey(); -datum dbm_do_nextkey(); -long dbm_forder(); -int dbm_delete(); -int dbm_store(); - -#endif /*!_ndbm_h*/ diff --git a/usr/src/lib/libbc/inc/include/net/if.h b/usr/src/lib/libbc/inc/include/net/if.h deleted file mode 100644 index 513fa0d2bf..0000000000 --- a/usr/src/lib/libbc/inc/include/net/if.h +++ /dev/null @@ -1,265 +0,0 @@ -/* - * Copyright 2010 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * Copyright (c) 1982, 1986 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#ifndef _net_if_h -#define _net_if_h - -/* - * Structures defining a network interface, providing a packet - * transport mechanism (ala level 0 of the PUP protocols). - * - * Each interface accepts output datagrams of a specified maximum - * length, and provides higher level routines with input datagrams - * received from its medium. - * - * Output occurs when the routine if_output is called, with three parameters: - * (*ifp->if_output)(ifp, m, dst) - * Here m is the mbuf chain to be sent and dst is the destination address. - * The output routine encapsulates the supplied datagram if necessary, - * and then transmits it on its medium. - * - * On input, each interface unwraps the data received by it, and either - * places it on the input queue of a internetwork datagram routine - * and posts the associated software interrupt, or passes the datagram to a raw - * packet input routine. - * - * Routines exist for locating interfaces by their addresses - * or for locating a interface on a certain network, as well as more general - * routing and gateway routines maintaining information used to locate - * interfaces. These routines live in the files if.c and route.c - */ - -/* - * Structure defining a queue for a network interface. - * - * (Would like to call this struct ``if'', but C isn't PL/1.) - */ -struct ifnet { - char *if_name; /* name, e.g. ``en'' or ``lo'' */ - short if_unit; /* sub-unit for lower level driver */ - short if_mtu; /* maximum transmission unit */ - short if_flags; /* up/down, broadcast, etc. */ - short if_timer; /* time 'til if_watchdog called */ - u_short if_promisc; /* net # of requests for promisc mode */ - int if_metric; /* routing metric (external only) */ - struct ifaddr *if_addrlist; /* linked list of addresses per if */ - struct ifqueue { - struct mbuf *ifq_head; - struct mbuf *ifq_tail; - int ifq_len; - int ifq_maxlen; - int ifq_drops; - } if_snd; /* output queue */ -/* procedure handles */ - int (*if_init)(); /* init routine */ - int (*if_output)(); /* output routine */ - int (*if_ioctl)(); /* ioctl routine */ - int (*if_reset)(); /* bus reset routine */ - int (*if_watchdog)(); /* timer routine */ -/* generic interface statistics */ - int if_ipackets; /* packets received on interface */ - int if_ierrors; /* input errors on interface */ - int if_opackets; /* packets sent on interface */ - int if_oerrors; /* output errors on interface */ - int if_collisions; /* collisions on csma interfaces */ -/* end statistics */ - struct ifnet *if_next; - struct ifnet *if_upper; /* next layer up */ - struct ifnet *if_lower; /* next layer down */ - int (*if_input)(); /* input routine */ - int (*if_ctlin)(); /* control input routine */ - int (*if_ctlout)(); /* control output routine */ -#ifdef sun - struct map *if_memmap; /* rmap for interface specific memory */ -#endif -}; - -#define IFF_UP 0x1 /* interface is up */ -#define IFF_BROADCAST 0x2 /* broadcast address valid */ -#define IFF_DEBUG 0x4 /* turn on debugging */ -#define IFF_LOOPBACK 0x8 /* is a loopback net */ -#define IFF_POINTOPOINT 0x10 /* interface is point-to-point link */ -#define IFF_NOTRAILERS 0x20 /* avoid use of trailers */ -#define IFF_RUNNING 0x40 /* resources allocated */ -#define IFF_NOARP 0x80 /* no address resolution protocol */ -#define IFF_PROMISC 0x100 /* receive all packets */ -#define IFF_ALLMULTI 0x200 /* receive all multicast packets */ -#define IFF_PRIVATE 0x8000 /* do not advertise */ - -/* flags set internally only: */ -#define IFF_CANTCHANGE \ - (IFF_BROADCAST | IFF_POINTOPOINT | IFF_RUNNING | IFF_PROMISC) - -/* - * Output queues (ifp->if_snd) and internetwork datagram level (pup level 1) - * input routines have queues of messages stored on ifqueue structures - * (defined above). Entries are added to and deleted from these structures - * by these macros, which should be called with ipl raised to splimp(). - */ -#define IF_QFULL(ifq) ((ifq)->ifq_len >= (ifq)->ifq_maxlen) -#define IF_DROP(ifq) ((ifq)->ifq_drops++) -#define IF_ENQUEUE(ifq, m) { \ - (m)->m_act = 0; \ - if ((ifq)->ifq_tail == 0) \ - (ifq)->ifq_head = m; \ - else \ - (ifq)->ifq_tail->m_act = m; \ - (ifq)->ifq_tail = m; \ - (ifq)->ifq_len++; \ -} -#define IF_PREPEND(ifq, m) { \ - (m)->m_act = (ifq)->ifq_head; \ - if ((ifq)->ifq_tail == 0) \ - (ifq)->ifq_tail = (m); \ - (ifq)->ifq_head = (m); \ - (ifq)->ifq_len++; \ -} -/* - * Packets destined for level-1 protocol input routines - * have a pointer to the receiving interface prepended to the data. - * IF_DEQUEUEIF extracts and returns this pointer when dequeueing the packet. - * IF_ADJ should be used otherwise to adjust for its presence. - */ -#define IF_ADJ(m) { \ - (m)->m_off += sizeof (struct ifnet *); \ - (m)->m_len -= sizeof (struct ifnet *); \ - if ((m)->m_len == 0) { \ - struct mbuf *n; \ - MFREE((m), n); \ - (m) = n; \ - } \ -} -#define IF_DEQUEUEIF(ifq, m, ifp) { \ - (m) = (ifq)->ifq_head; \ - if (m) { \ - if (((ifq)->ifq_head = (m)->m_act) == 0) \ - (ifq)->ifq_tail = 0; \ - (m)->m_act = 0; \ - (ifq)->ifq_len--; \ - (ifp) = *(mtod((m), struct ifnet **)); \ - IF_ADJ(m); \ - } \ -} -#define IF_DEQUEUE(ifq, m) { \ - (m) = (ifq)->ifq_head; \ - if (m) { \ - if (((ifq)->ifq_head = (m)->m_act) == 0) \ - (ifq)->ifq_tail = 0; \ - (m)->m_act = 0; \ - (ifq)->ifq_len--; \ - } \ -} - -#define IFQ_MAXLEN 50 -#define IFNET_SLOWHZ 1 /* granularity is 1 second */ - -/* - * The ifaddr structure contains information about one address - * of an interface. They are maintained by the different address families, - * are allocated and attached when an address is set, and are linked - * together so all addresses for an interface can be located. - */ -struct ifaddr { - struct sockaddr ifa_addr; /* address of interface */ - union { - struct sockaddr ifu_broadaddr; - struct sockaddr ifu_dstaddr; - } ifa_ifu; -#ifndef ifa_broadaddr -#define ifa_broadaddr ifa_ifu.ifu_broadaddr /* broadcast address */ -#endif -#ifndef ifa_dstaddr -#define ifa_dstaddr ifa_ifu.ifu_dstaddr /* other end of p-to-p link */ -#endif - struct ifnet *ifa_ifp; /* back-pointer to interface */ - struct ifaddr *ifa_next; /* next address for interface */ -}; - -/* - * Interface request structure used for socket - * ioctl's. All interface ioctl's must have parameter - * definitions which begin with ifr_name. The - * remainder may be interface specific. - */ -struct ifreq { -#define IFNAMSIZ 16 - char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */ - union { - struct sockaddr ifru_addr; - struct sockaddr ifru_dstaddr; - char ifru_oname[IFNAMSIZ]; /* other if name */ - struct sockaddr ifru_broadaddr; - short ifru_flags; - int ifru_metric; - char ifru_data[1]; /* interface dependent data */ - - /* Struct for FDDI ioctl's */ - struct ifr_dnld_reqs { - caddr_t v_addr; - caddr_t m_addr; - caddr_t ex_addr; - u_int size; - } ifru_dnld_req; - - /* Struct for FDDI stats */ - struct ifr_fddi_stats { - u_int stat_size; - caddr_t fddi_stats; - } ifru_fddi_stat; - - struct ifr_netmapents { - u_int map_ent_size, /* size of netmap structure */ - entry_number; /* index into netmap list */ - caddr_t fddi_map_ent; /* pointer to user structure */ - } ifru_netmapent; - - /* Field for generic ioctl for fddi */ - - struct ifr_fddi_gen_struct { - int ifru_fddi_gioctl; /* field for gen ioctl */ - caddr_t ifru_fddi_gaddr; /* Generic ptr to a field */ - } ifru_fddi_gstruct; - - } ifr_ifru; - -#define ifr_addr ifr_ifru.ifru_addr /* address */ -#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-to-p link */ -#define ifr_oname ifr_ifru.ifru_oname /* other if name */ -#define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */ -#define ifr_flags ifr_ifru.ifru_flags /* flags */ -#define ifr_metric ifr_ifru.ifru_metric /* metric */ -#define ifr_data ifr_ifru.ifru_data /* for use by interface */ - -/* FDDI specific */ -#define ifr_dnld_req ifr_ifru.ifru_dnld_req -#define ifr_fddi_stat ifr_ifru.ifru_fddi_stat -#define ifr_fddi_netmap ifr_ifru.ifru_netmapent /* FDDI network map entries */ -#define ifr_fddi_gstruct ifr_ifru.ifru_fddi_gstruct - -}; - -/* - * Structure used in SIOCGIFCONF request. - * Used to retrieve interface configuration - * for machine (useful for programs which - * must know all networks accessible). - */ -struct ifconf { - int ifc_len; /* size of associated buffer */ - union { - caddr_t ifcu_buf; - struct ifreq *ifcu_req; - } ifc_ifcu; -#define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */ -#define ifc_req ifc_ifcu.ifcu_req /* array of structures returned */ -}; - -#endif /* !_net_if_h */ diff --git a/usr/src/lib/libbc/inc/include/net/if_arp.h b/usr/src/lib/libbc/inc/include/net/if_arp.h deleted file mode 100644 index 2e7fe108ce..0000000000 --- a/usr/src/lib/libbc/inc/include/net/if_arp.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright 1997-2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * Copyright (c) 1986 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ -/* - * This libbc private version of if_arp.h is being created as an - * exact copy of <net/if_arp.h> prior to the addition of the - * "struct xarpreq" in the standard <net/if_arp.h>. The libbc code - * does not understand the structure elements in "struct xarpreq". - */ - - -#ifndef _net_if_arp_h -#define _net_if_arp_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Address Resolution Protocol. - * - * See RFC 826 for protocol description. ARP packets are variable - * in size; the arphdr structure defines the fixed-length portion. - * Protocol type values are the same as those for 10 Mb/s Ethernet. - * It is followed by the variable-sized fields ar_sha, arp_spa, - * arp_tha and arp_tpa in that order, according to the lengths - * specified. Field names used correspond to RFC 826. - */ -struct arphdr { - ushort_t ar_hrd; /* format of hardware address */ -#define ARPHRD_ETHER 1 /* ethernet hardware address */ - ushort_t ar_pro; /* format of protocol address */ - uchar_t ar_hln; /* length of hardware address */ - uchar_t ar_pln; /* length of protocol address */ - ushort_t ar_op; /* one of: */ -#define ARPOP_REQUEST 1 /* request to resolve address */ -#define ARPOP_REPLY 2 /* response to previous request */ -#define REVARP_REQUEST 3 /* Reverse ARP request */ -#define REVARP_REPLY 4 /* Reverse ARP reply */ - /* - * The remaining fields are variable in size, - * according to the sizes above, and are defined - * as appropriate for specific hardware/protocol - * combinations. (E.g., see <netinet/if_ether.h>.) - */ -#ifdef notdef - uchar_t ar_sha[]; /* sender hardware address */ - uchar_t ar_spa[]; /* sender protocol address */ - uchar_t ar_tha[]; /* target hardware address */ - uchar_t ar_tpa[]; /* target protocol address */ -#endif /* notdef */ -}; - -/* - * ARP ioctl request - */ -struct arpreq { - struct sockaddr arp_pa; /* protocol address */ - struct sockaddr arp_ha; /* hardware address */ - int arp_flags; /* flags */ -}; -/* arp_flags and at_flags field values */ -#define ATF_INUSE 0x01 /* entry in use */ -#define ATF_COM 0x02 /* completed entry (enaddr valid) */ -#define ATF_PERM 0x04 /* permanent entry */ -#define ATF_PUBL 0x08 /* publish entry (respond for other host) */ -#define ATF_USETRAILERS 0x10 /* has requested trailers */ - -/* - * This data structure is used by kernel protocol modules to register - * their interest in a particular packet type with the Ethernet drivers. - * For example, other kinds of ARP would use this, XNS, ApleTalk, etc. - */ -struct ether_family { - int ef_family; /* address family */ - ushort_t ef_ethertype; /* ethernet type field */ - struct ifqueue *(*ef_infunc)(); /* input function */ - int (*ef_outfunc)(); /* output function */ - int (*ef_netisr)(); /* soft interrupt function */ - struct ether_family *ef_next; /* link to next on list */ -}; - -#ifdef __cplusplus -} -#endif - -#endif /* _net_if_arp_h */ diff --git a/usr/src/lib/libbc/inc/include/netdb.h b/usr/src/lib/libbc/inc/include/netdb.h deleted file mode 100644 index 3d9a6bbe71..0000000000 --- a/usr/src/lib/libbc/inc/include/netdb.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 1980,1983,1988 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that this notice is preserved and that due credit is given - * to the University of California at Berkeley. The name of the University - * may not be used to endorse or promote products derived from this - * software without specific prior written permission. This software - * is provided ``as is'' without express or implied warranty. - */ - -/* - * Structures returned by network data base library. - * All addresses are supplied in host order, and - * returned in network order (suitable for use in system calls). - */ - -#ifndef _netdb_h -#define _netdb_h - -/* from UCB 5.9 4/5/88 */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#define _PATH_HEQUIV "/etc/hosts.equiv" -#define _PATH_HOSTS "/etc/hosts" -#define _PATH_NETWORKS "/etc/networks" -#define _PATH_PROTOCOLS "/etc/protocols" -#define _PATH_SERVICES "/etc/services" - -struct hostent { - char *h_name; /* official name of host */ - char **h_aliases; /* alias list */ - int h_addrtype; /* host address type */ - int h_length; /* length of address */ - char **h_addr_list; /* list of addresses from name server */ -#define h_addr h_addr_list[0] /* address, for backward compatiblity */ -}; - -/* - * Assumption here is that a network number - * fits in 32 bits -- probably a poor one. - */ -struct netent { - char *n_name; /* official name of net */ - char **n_aliases; /* alias list */ - int n_addrtype; /* net address type */ - unsigned long n_net; /* network # */ -}; - -struct servent { - char *s_name; /* official service name */ - char **s_aliases; /* alias list */ - int s_port; /* port # */ - char *s_proto; /* protocol to use */ -}; - -struct protoent { - char *p_name; /* official protocol name */ - char **p_aliases; /* alias list */ - int p_proto; /* protocol # */ -}; - -struct rpcent { - char *r_name; /* name of server for this rpc program */ - char **r_aliases; /* alias list */ - int r_number; /* rpc program number */ -}; - -struct hostent *gethostbyname(), *gethostbyaddr(), *gethostent(); -struct netent *getnetbyname(), *getnetbyaddr(), *getnetent(); -struct servent *getservbyname(), *getservbyport(), *getservent(); -struct protoent *getprotobyname(), *getprotobynumber(), *getprotoent(); -struct rpcent *getrpcbyname(), *getrpcbynumber(), *getrpcent(); - -/* - * Error return codes from gethostbyname() and gethostbyaddr() - * (when using the resolver) - */ - -extern int h_errno; - -#define HOST_NOT_FOUND 1 /* Authoritive Answer Host not found */ -#define TRY_AGAIN 2 /* Non-Authoritive Host not found, or SERVERFAIL */ -#define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */ -#define NO_DATA 4 /* Valid name, no data record of requested type */ -#define NO_ADDRESS NO_DATA /* no address, look for MX record */ - -#define MAXALIASES 35 -#define MAXADDRS 35 - -#endif /*!_netdb_h*/ diff --git a/usr/src/lib/libbc/inc/include/netinet/if_ether.h b/usr/src/lib/libbc/inc/include/netinet/if_ether.h deleted file mode 100644 index be9681358a..0000000000 --- a/usr/src/lib/libbc/inc/include/netinet/if_ether.h +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (c) 1982, 1986 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that this notice is preserved and that due credit is given - * to the University of California at Berkeley. The name of the University - * may not be used to endorse or promote products derived from this - * software without specific prior written permission. This software - * is provided ``as is'' without express or implied warranty. - */ - -#ifndef _netinet_if_ether_h -#define _netinet_if_ether_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * The following include is for compatibility with SunOS 3.x and - * 4.3bsd. Newly written programs should include it separately. - */ -#include <net/if_arp.h> - -/* - * Ethernet address - 6 octets - */ -struct ether_addr { - u_char ether_addr_octet[6]; -}; - -/* - * Structure of a 10Mb/s Ethernet header. - */ -struct ether_header { - struct ether_addr ether_dhost; - struct ether_addr ether_shost; - u_short ether_type; -}; - -#define ETHERTYPE_PUP 0x0200 /* PUP protocol */ -#define ETHERTYPE_IP 0x0800 /* IP protocol */ -#define ETHERTYPE_ARP 0x0806 /* Addr. resolution protocol */ -#define ETHERTYPE_REVARP 0x8035 /* Reverse ARP */ - -/* - * The ETHERTYPE_NTRAILER packet types starting at ETHERTYPE_TRAIL have - * (type-ETHERTYPE_TRAIL)*512 bytes of data followed - * by an ETHER type (as given above) and then the (variable-length) header. - */ -#define ETHERTYPE_TRAIL 0x1000 /* Trailer packet */ -#define ETHERTYPE_NTRAILER 16 - -#define ETHERMTU 1500 -#define ETHERMIN (60-14) - -/* - * Ethernet Address Resolution Protocol. - * - * See RFC 826 for protocol description. Structure below is adapted - * to resolving internet addresses. Field names used correspond to - * RFC 826. - */ -struct ether_arp { - struct arphdr ea_hdr; /* fixed-size header */ - struct ether_addr arp_sha; /* sender hardware address */ - u_char arp_spa[4]; /* sender protocol address */ - struct ether_addr arp_tha; /* target hardware address */ - u_char arp_tpa[4]; /* target protocol address */ -}; -#define arp_hrd ea_hdr.ar_hrd -#define arp_pro ea_hdr.ar_pro -#define arp_hln ea_hdr.ar_hln -#define arp_pln ea_hdr.ar_pln -#define arp_op ea_hdr.ar_op - -/* - * multicast address structure - * - * Keep a reference count for each multicast address so - * addresses loaded into chip are unique. - */ -struct mcaddr { - struct ether_addr mc_enaddr; /* multicast address */ - u_short mc_count; /* reference count */ -}; -#define MCADDRMAX 64 /* multicast addr table length */ -#define MCCOUNTMAX 4096 /* multicast addr max reference count */ - -/* - * Structure shared between the ethernet driver modules and - * the address resolution code. For example, each ec_softc or il_softc - * begins with this structure. - * - * The structure contains a pointer to an array of multicast addresses. - * This pointer is NULL until the first successful SIOCADDMULTI ioctl - * is issued for the interface. - */ -struct arpcom { - struct ifnet ac_if; /* network-visible interface */ - struct ether_addr ac_enaddr; /* ethernet hardware address */ - struct in_addr ac_ipaddr; /* copy of ip address- XXX */ - struct mcaddr *ac_mcaddr; /* table of multicast addrs */ - u_short ac_nmcaddr; /* count of M/C addrs in use */ - struct in_addr ac_lastip; /* cache of last ARP lookup */ - struct ether_addr ac_lastarp; /* result of the last ARP */ -}; - -/* - * Internet to ethernet address resolution table. - */ -struct arptab { - struct in_addr at_iaddr; /* internet address */ - union { - struct ether_addr atu_enaddr; /* ethernet address */ - long atu_tvsec; /* timestamp if incomplete */ - } at_union; - u_char at_timer; /* minutes since last reference */ - u_char at_flags; /* flags */ - struct mbuf *at_hold; /* last packet until resolved/timeout */ -}; - -# define at_enaddr at_union.atu_enaddr -# define at_tvsec at_union.atu_tvsec - -/* - * Compare two Ethernet addresses - assumes that the two given - * pointers can be referenced as shorts. On architectures - * where this is not the case, use bcmp instead. Note that like - * bcmp, we return zero if they are the SAME. - */ -#define ether_cmp(a,b) ( ((short *)b)[2] != ((short *)a)[2] || \ - ((short *)b)[1] != ((short *)a)[1] || ((short *)b)[0] != ((short *)a)[0] ) - -/* - * Copy Ethernet addresses from a to b - assumes that the two given - * pointers can be referenced as shorts. On architectures - * where this is not the case, use bcopy instead. - */ -#define ether_copy(a,b) { ((short *)b)[0]=((short *)a)[0]; \ - ((short *)b)[1]=((short *)a)[1]; ((short *)b)[2]=((short *)a)[2]; } - -/* - * Copy IP addresses from a to b - assumes that the two given - * pointers can be referenced as shorts. On architectures - * where this is not the case, use bcopy instead. - */ -#define ip_copy(a,b) { ((short *)b)[0]=((short *)a)[0]; \ - ((short *)b)[1]=((short *)a)[1]; } - -#endif /* !_netinet_if_ether_h */ diff --git a/usr/src/lib/libbc/inc/include/netinet/in.h b/usr/src/lib/libbc/inc/include/netinet/in.h deleted file mode 100644 index 7db2b4f096..0000000000 --- a/usr/src/lib/libbc/inc/include/netinet/in.h +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * Copyright (c) 1982, 1986 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms are permitted - * provided that this notice is preserved and that due credit is given - * to the University of California at Berkeley. The name of the University - * may not be used to endorse or promote products derived from this - * software without specific prior written permission. This software - * is provided ``as is'' without express or implied warranty. - */ - -/* - * Constants and structures defined by the internet system, - * Per RFC 790, September 1981. - */ - -#ifndef _netinet_in_h -#define _netinet_in_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Protocols - */ -#define IPPROTO_IP 0 /* dummy for IP */ -#define IPPROTO_ICMP 1 /* control message protocol */ -#define IPPROTO_IGMP 2 /* group control protocol */ -#define IPPROTO_GGP 3 /* gateway^2 (deprecated) */ -#define IPPROTO_TCP 6 /* tcp */ -#define IPPROTO_EGP 8 /* exterior gateway protocol */ -#define IPPROTO_PUP 12 /* pup */ -#define IPPROTO_UDP 17 /* user datagram protocol */ -#define IPPROTO_IDP 22 /* xns idp */ -#define IPPROTO_HELLO 63 /* "hello" routing protocol */ -#define IPPROTO_ND 77 /* UNOFFICIAL net disk proto */ - -#define IPPROTO_RAW 255 /* raw IP packet */ -#define IPPROTO_MAX 256 - -/* - * Port/socket numbers: network standard functions - */ -#define IPPORT_ECHO 7 -#define IPPORT_DISCARD 9 -#define IPPORT_SYSTAT 11 -#define IPPORT_DAYTIME 13 -#define IPPORT_NETSTAT 15 -#define IPPORT_FTP 21 -#define IPPORT_TELNET 23 -#define IPPORT_SMTP 25 -#define IPPORT_TIMESERVER 37 -#define IPPORT_NAMESERVER 42 -#define IPPORT_WHOIS 43 -#define IPPORT_MTP 57 - -/* - * Port/socket numbers: host specific functions - */ -#define IPPORT_TFTP 69 -#define IPPORT_RJE 77 -#define IPPORT_FINGER 79 -#define IPPORT_TTYLINK 87 -#define IPPORT_SUPDUP 95 - -/* - * UNIX TCP sockets - */ -#define IPPORT_EXECSERVER 512 -#define IPPORT_LOGINSERVER 513 -#define IPPORT_CMDSERVER 514 -#define IPPORT_EFSSERVER 520 - -/* - * UNIX UDP sockets - */ -#define IPPORT_BIFFUDP 512 -#define IPPORT_WHOSERVER 513 -#define IPPORT_ROUTESERVER 520 /* 520+1 also used */ - -/* - * Ports < IPPORT_RESERVED are reserved for - * privileged processes (e.g. root). - * Ports > IPPORT_USERRESERVED are reserved - * for servers, not necessarily privileged. - */ -#define IPPORT_RESERVED 1024 -#define IPPORT_USERRESERVED 5000 - -/* - * Link numbers - */ -#define IMPLINK_IP 155 -#define IMPLINK_LOWEXPER 156 -#define IMPLINK_HIGHEXPER 158 - -/* - * Internet address - * This definition contains obsolete fields for compatibility - * with SunOS 3.x and 4.2bsd. The presence of subnets renders - * divisions into fixed fields misleading at best. New code - * should use only the s_addr field. - */ -struct in_addr { - union { - struct { u_char s_b1,s_b2,s_b3,s_b4; } S_un_b; - struct { u_short s_w1,s_w2; } S_un_w; - u_long S_addr; - } S_un; -#define s_addr S_un.S_addr /* should be used for all code */ -#define s_host S_un.S_un_b.s_b2 /* OBSOLETE: host on imp */ -#define s_net S_un.S_un_b.s_b1 /* OBSOLETE: network */ -#define s_imp S_un.S_un_w.s_w2 /* OBSOLETE: imp */ -#define s_impno S_un.S_un_b.s_b4 /* OBSOLETE: imp # */ -#define s_lh S_un.S_un_b.s_b3 /* OBSOLETE: logical host */ -}; - -/* - * Definitions of bits in internet address integers. - * On subnets, the decomposition of addresses to host and net parts - * is done according to subnet mask, not the masks here. - * - * Note that with the introduction of CIDR, IN_CLASSA, IN_CLASSB, - * IN_CLASSC, IN_CLASSD and IN_CLASSE macros have become "de-facto obsolete". - * IN_MULTICAST macro should be used to test if a address is a - * multicast address. - */ -#define IN_CLASSA(i) (((long)(i) & 0x80000000) == 0) -#define IN_CLASSA_NET 0xff000000 -#define IN_CLASSA_NSHIFT 24 -#define IN_CLASSA_HOST 0x00ffffff -#define IN_CLASSA_MAX 128 - -#define IN_CLASSB(i) (((long)(i) & 0xc0000000) == 0x80000000) -#define IN_CLASSB_NET 0xffff0000 -#define IN_CLASSB_NSHIFT 16 -#define IN_CLASSB_HOST 0x0000ffff -#define IN_CLASSB_MAX 65536 - -#define IN_CLASSC(i) (((long)(i) & 0xe0000000) == 0xc0000000) -#define IN_CLASSC_NET 0xffffff00 -#define IN_CLASSC_NSHIFT 8 -#define IN_CLASSC_HOST 0x000000ff - -#define IN_CLASSD(i) (((long)(i) & 0xf0000000) == 0xe0000000) -#define IN_MULTICAST(i) IN_CLASSD(i) - -#define IN_CLASSE(i) (((long)(i) & 0xf0000000) == 0xf0000000) - -#define IN_CLASSE_NET 0xffffffff - -/* - * We have removed CLASS E checks from the kernel - * But we preserve these defines for userland in order - * to avoid compile breakage of some 3rd party piece of software - */ -#ifndef KERNEL -#define IN_EXPERIMENTAL(i) (((long)(i) & 0xe0000000) == 0xe0000000) -#define IN_BADCLASS(i) (((long)(i) & 0xf0000000) == 0xf0000000) -#endif - -#define INADDR_ANY (u_long)0x00000000 -#define INADDR_LOOPBACK (u_long)0x7F000001 -#define INADDR_BROADCAST (u_long)0xffffffff /* must be masked */ - -#define IN_LOOPBACKNET 127 /* official! */ - -/* - * Define a macro to stuff the loopback address into an Internet address - */ -#define IN_SET_LOOPBACK_ADDR(a) {(a)->sin_addr.s_addr = htonl(INADDR_LOOPBACK); \ - (a)->sin_family = AF_INET;} - -/* - * Socket address, internet style. - */ -struct sockaddr_in { - short sin_family; - u_short sin_port; - struct in_addr sin_addr; - char sin_zero[8]; -}; - -/* - * Options for use with [gs]etsockopt at the IP level. - */ -#define IP_OPTIONS 1 /* set/get IP per-packet options */ - -#if !defined(vax) && !defined(ntohl) && !defined(lint) && !defined(i386) -/* - * Macros for number representation conversion. - */ -#define ntohl(x) (x) -#define ntohs(x) (x) -#define htonl(x) (x) -#define htons(x) (x) -#endif - -#if !defined(ntohl) && (defined(vax) || defined(lint) || defined(i386)) -u_short ntohs(), htons(); -u_long ntohl(), htonl(); -#endif - -#ifdef KERNEL -extern struct domain inetdomain; -extern struct protosw inetsw[]; -struct in_addr in_makeaddr(); -u_long in_netof(), in_lnaof(); -#endif - -#endif /* !_netinet_in_h */ diff --git a/usr/src/lib/libbc/inc/include/nettli/tcp_tli.h b/usr/src/lib/libbc/inc/include/nettli/tcp_tli.h deleted file mode 100644 index cae1ac1d13..0000000000 --- a/usr/src/lib/libbc/inc/include/nettli/tcp_tli.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright (c) 1988,2001 by Sun Microsystems, Inc. - * All rights reserved. - */ - -#ifndef _TCP_TLI_ -#define _TCP_TLI_ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * TLI automaton state definitions. - * - * They are expressed as bit masks to facilitate testing whether the - * current automaton state is contained in a given set of states. - */ -#define TL_UNINIT 0x0000 /* uninitialized */ -#define TL_UNBND 0x0002 /* unbound */ -#define TL_IDLE 0x0004 /* no connection established */ -/* - * outgoing connection pending for active user - */ -#define TL_OUTCON 0x0008 -/* - * incoming connection pending for passive user - */ -#define TL_INCON 0x0010 -#define TL_DATAXFER 0x0020 /* data transfer */ -/* - * outgoing orderly release (waiting for orderly release indication) - */ -#define TL_OUTREL 0x0040 -/* - * incoming orderly release (waiting to send orderly release request) - */ -#define TL_INREL 0x0080 -/* - * pseudo-state indicating disallowed transition (may end up unnecessary) - */ -#define TL_ERROR 0x0100 - -/* - * Max buffer size for each uio operation in tcptli_Ercv() - */ -#define TT_BUFSIZE 2048 - -/* - * Send and Recv size for socket operations - */ -#define TT_SENDSIZE 24 * 1024 -#define TT_RECVSIZE 24 * 1024 - -/* - * Max number of uio vectors for sosend and soreceive - */ -#define TT_MAXUIO 10 - -/* - * Flag to indicate that only part of the data buffer got sent - */ -#define TT_INCOMPLETESEND 201 - -/* - * Protocol options (socket options) supported by T_OPTMGMT_REQ - */ -struct tt_soopt { - int tts_reuseaddr; /* reuse a bound address */ - int tts_keepalive; /* keep connection alive */ - int tts_sendsize; /* socket send size */ - int tts_recvsize; /* socket recv size */ -}; - -#define TTS_BUFSIZE 4096 /* default socket send/recv size */ -#define TTS_DFLT_REUSEADDR 1 -#define TTS_DFLT_KEEPALIVE 1 - -#ifdef __cplusplus -} -#endif - -#endif /* _TCP_TLI_ */ diff --git a/usr/src/lib/libbc/inc/include/nettli/tcp_tlivar.h b/usr/src/lib/libbc/inc/include/nettli/tcp_tlivar.h deleted file mode 100644 index 456cf9cdac..0000000000 --- a/usr/src/lib/libbc/inc/include/nettli/tcp_tlivar.h +++ /dev/null @@ -1,140 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ - -/* - * Copyright 1988 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _TCP_TLIVAR_ -#define _TCP_TLIVAR_ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Data structure definitions for the streams interface - * to the socket-based TCP implementation. - */ - -/* - * Socket Information block contains the special socket wakeup - * hooks. When a block of tt_sockinfo is allocated, the wupalt.wup_arg - * points to the beginning of tt_sockinfo. - */ - -struct tt_sockinfo { - struct wupalt ts_sowakeup; /* special sock wakeup hook */ - u_long ts_seqnum; /* connection sequence number */ - long ts_flags; /* see below */ - struct tt_softc *ts_ttp; /* back ptr to dev-instance handle */ -}; -/* - * No connection assoicated with this socket - */ -#define TT_TS_NOTUSED 0x00 -/* - * This socket is connected or pending connection - */ -#define TT_TS_INUSE 0x01 - -/* - * Per-device instance state information. - * - * To aid in handling resource starvation situations, we pre-allocate two - * messages for reporting errors. Tt_merror is used as a last resort, when - * attempts to allocate a normal error reply fail. It's allocated in the - * open routine and freed in the close routine. The routines that produce - * response messages try to keep tt_errack pre-allocated, but don't insist - * that it always be valid. This strategy attempts to minimize the - * probability of having to fall back on the drastic measure of using the - * M_ERROR message. - */ -struct tt_softc { - /* The tt_unit & tt_unitnext fields aren't yet used. */ - struct tt_softc *tt_next; /* link to next device instance */ - u_short tt_unit; /* instance number */ - u_short tt_unitnext; /* next unit # to be used on open */ - - queue_t *tt_rq; /* cross-link to read queue */ - struct socket *tt_so; /* socket for this device instance */ - mblk_t *tt_merror; /* pre-allocated M_ERROR message */ - mblk_t *tt_errack; /* pre-allocated T_error_ack message */ - u_int tt_state; /* current state of the tli automaton */ - long tt_seqnext; /* next sequence number to assign */ - u_long tt_flags; /* see below */ - u_long tt_event; /* service event inidication */ - struct proc *tt_auxprocp; /* Aux proc handle */ - struct in_addr tt_laddr; /* saved local address */ - u_short tt_lport; /* saved local port number */ -}; - -/* - * Flag (tt_flags) bits private to the driver. - */ -#define TT_OPEN 0x01 /* device instance is currently open */ -#define TT_ERROR 0x02 /* in error state -- unusable */ -#define TT_CLOSE 0x04 /* this device instance is closed */ -#define TT_TIMER 0x08 /* scheduled wakeup timer is already set */ -/* - * Event (tt_event) bits private to the driver. - */ -#define TTE_EVENT 0x01 /* aux proc service wanted indication */ -#define TTE_ONQUEUE 0x02 /* set if this ttp has wakeup-event pending */ - -/* - * Internet style address for TLI - */ -struct taddr_in { - short sin_family; - u_short sin_port; - struct in_addr sin_addr; -}; - -/* - * For use with direct-read only - * when: - * - TI is in the correct state - * - there are data to be read - * - socket is in state to receive - * - socket buffer not locked (we are running this - * at interrupt level !) - * - the auxproc is not running - */ -#define TT_DIRECT_READ(ttp, so) { \ - extern int tcptli_auxproc_running; \ - if (((ttp)->tt_state & TL_DATAXFER) && \ - ((so)->so_rcv.sb_cc != 0) && \ - (!((so)->so_state & SS_CANTRCVMORE)) && \ - (!((so)->so_rcv.sb_flags & SB_LOCK)) && \ - (!tcptli_auxproc_running)) \ - if (tcptli_Ercv((ttp))) \ - return; \ -} - -#ifdef TLIDEBUG -extern tcptli_debug; -#define TCPTLI_PRINTF if (tcptli_debug) printf -#else -#define TCPTLI_PRINTF -#endif /* TLIDEBUG */ - -#endif /* _TCP_TLIVAR_ */ diff --git a/usr/src/lib/libbc/inc/include/nettli/tihdr.h b/usr/src/lib/libbc/inc/include/nettli/tihdr.h deleted file mode 100644 index 424298dd80..0000000000 --- a/usr/src/lib/libbc/inc/include/nettli/tihdr.h +++ /dev/null @@ -1,386 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* from S5R3 sys/tihdr.h 10.2" */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ - - -/* #ident "@(#)kern-port:sys/tihdr.h 10.2" */ - -/* - * The following is all the information - * needed by the Transport Service Interface. - */ - -#ifndef _nettli_tihdr_h -#define _nettli_tihdr_h - -/* - * The following are the definitions of the Transport - * Service Interface primitives. - */ - -/* - * Primitives that are initiated by the transport user. - */ -#define T_CONN_REQ 0 /* connection request */ -#define T_CONN_RES 1 /* connection response */ -#define T_DISCON_REQ 2 /* disconnect request */ -#define T_DATA_REQ 3 /* data request */ -#define T_EXDATA_REQ 4 /* expedited data request */ -#define T_INFO_REQ 5 /* information request */ -#define T_BIND_REQ 6 /* bind request */ -#define T_UNBIND_REQ 7 /* unbind request */ -#define T_UNITDATA_REQ 8 /* unitdata request */ -#define T_OPTMGMT_REQ 9 /* manage options req */ -#define T_ORDREL_REQ 10 /* orderly release req */ - -/* - * Primitives that are initiated by the transport provider. - */ - -#define T_CONN_IND 11 /* connection indication */ -#define T_CONN_CON 12 /* connection confirmation */ -#define T_DISCON_IND 13 /* disconnect indication */ -#define T_DATA_IND 14 /* data indication */ -#define T_EXDATA_IND 15 /* expeditied data indication */ -#define T_INFO_ACK 16 /* information acknowledgment */ -#define T_BIND_ACK 17 /* bind acknowledment */ -#define T_ERROR_ACK 18 /* error acknowledgment */ -#define T_OK_ACK 19 /* ok acknowledgment */ -#define T_UNITDATA_IND 20 /* unitdata indication */ -#define T_UDERROR_IND 21 /* unitdata error indication */ -#define T_OPTMGMT_ACK 22 /* manage options ack */ -#define T_ORDREL_IND 23 /* orderly release ind */ - -/* - * The following are the events that drive the state machine - */ -/* Initialization events */ -#define TE_BIND_REQ 0 /* bind request */ -#define TE_UNBIND_REQ 1 /* unbind request */ -#define TE_OPTMGMT_REQ 2 /* manage options req */ -#define TE_BIND_ACK 3 /* bind acknowledment */ -#define TE_OPTMGMT_ACK 4 /* manage options ack */ -#define TE_ERROR_ACK 5 /* error acknowledgment */ -#define TE_OK_ACK1 6 /* ok ack seqcnt == 0 */ -#define TE_OK_ACK2 7 /* ok ack seqcnt == 1, q == resq */ -#define TE_OK_ACK3 8 /* ok ack seqcnt == 1, q != resq */ -#define TE_OK_ACK4 9 /* ok ack seqcnt > 1 */ - -/* Connection oriented events */ -#define TE_CONN_REQ 10 /* connection request */ -#define TE_CONN_RES 11 /* connection response */ -#define TE_DISCON_REQ 12 /* disconnect request */ -#define TE_DATA_REQ 13 /* data request */ -#define TE_EXDATA_REQ 14 /* expedited data request */ -#define TE_ORDREL_REQ 15 /* orderly release req */ -#define TE_CONN_IND 16 /* connection indication */ -#define TE_CONN_CON 17 /* connection confirmation */ -#define TE_DATA_IND 18 /* data indication */ -#define TE_EXDATA_IND 19 /* expedited data indication */ -#define TE_ORDREL_IND 20 /* orderly release ind */ -#define TE_DISCON_IND1 21 /* disconnect indication seq == 0 */ -#define TE_DISCON_IND2 22 /* disconnect indication seq == 1 */ -#define TE_DISCON_IND3 23 /* disconnect indication seq > 1 */ -#define TE_PASS_CONN 24 /* pass connection */ - -/* Unit data events */ -#define TE_UNITDATA_REQ 25 /* unitdata request */ -#define TE_UNITDATA_IND 26 /* unitdata indication */ -#define TE_UDERROR_IND 27 /* unitdata error indication */ - -#define TE_NOEVENTS 28 -/* - * The following are the possible states of the Transport - * Service Interface - */ - -#define TS_UNBND 0 /* unbound */ -#define TS_WACK_BREQ 1 /* waiting ack of BIND_REQ */ -#define TS_WACK_UREQ 2 /* waiting ack of UNBIND_REQ */ -#define TS_IDLE 3 /* idle */ -#define TS_WACK_OPTREQ 4 /* wait ack options request */ -#define TS_WACK_CREQ 5 /* waiting ack of CONN_REQ */ -#define TS_WCON_CREQ 6 /* waiting confirm of CONN_REQ */ -#define TS_WRES_CIND 7 /* waiting response of CONN_IND */ -#define TS_WACK_CRES 8 /* waiting ack of CONN_RES */ -#define TS_DATA_XFER 9 /* data transfer */ -#define TS_WIND_ORDREL 10 /* releasing rd but not wr */ -#define TS_WREQ_ORDREL 11 /* wait to release wr but not rd*/ -#define TS_WACK_DREQ6 12 /* waiting ack of DISCON_REQ */ -#define TS_WACK_DREQ7 13 /* waiting ack of DISCON_REQ */ -#define TS_WACK_DREQ9 14 /* waiting ack of DISCON_REQ */ -#define TS_WACK_DREQ10 15 /* waiting ack of DISCON_REQ */ -#define TS_WACK_DREQ11 16 /* waiting ack of DISCON_REQ */ - -#define TS_NOSTATES 17 - - -/* - * The following structure definitions define the format of the - * stream message block of the above primitives. - * (everything is declared long to ensure proper alignment - * across different machines) - */ - -/* connection request */ - -struct T_conn_req { - long PRIM_type; /* always T_CONN_REQ */ - long DEST_length; /* dest addr length */ - long DEST_offset; /* dest addr offset */ - long OPT_length; /* options length */ - long OPT_offset; /* options offset */ -}; - -/* connect response */ - -struct T_conn_res { - long PRIM_type; /* always T_CONN_RES */ - void *QUEUE_ptr; /* responding queue ptr */ - long OPT_length; /* options length */ - long OPT_offset; /* options offset */ - long SEQ_number; /* sequence number */ -}; - -/* disconnect request */ - -struct T_discon_req { - long PRIM_type; /* always T_DISCON_REQ */ - long SEQ_number; /* sequnce number */ -}; - -/* data request */ - -struct T_data_req { - long PRIM_type; /* always T_DATA_REQ */ - long MORE_flag; /* more data */ -}; - -/* expedited data request */ - -struct T_exdata_req { - long PRIM_type; /* always T_EXDATA_REQ */ - long MORE_flag; /* more data */ -}; - -/* information request */ - -struct T_info_req { - long PRIM_type; /* always T_INFO_REQ */ -}; - -/* bind request */ - -struct T_bind_req { - long PRIM_type; /* always T_BIND_REQ */ - long ADDR_length; /* addr length */ - long ADDR_offset; /* addr offset */ - unsigned long CONIND_number; /*connect indications requested */ -}; - -/* unbind request */ - -struct T_unbind_req { - long PRIM_type; /* always T_UNBIND_REQ */ -}; - -/* unitdata request */ - -struct T_unitdata_req { - long PRIM_type; /* always T_UNITDATA_REQ */ - long DEST_length; /* dest addr length */ - long DEST_offset; /* dest addr offset */ - long OPT_length; /* options length */ - long OPT_offset; /* options offset */ -}; - -/* manage options request */ - -struct T_optmgmt_req { - long PRIM_type; /* always T_OPTMGMT_REQ */ - long OPT_length; /* options length */ - long OPT_offset; /* options offset */ - long MGMT_flags; /* options flags */ -}; - -/* orderly release request */ - -struct T_ordrel_req { - long PRIM_type; /* always T_ORDREL_REQ */ -}; - -/* connect indication */ - -struct T_conn_ind { - long PRIM_type; /* always T_CONN_IND */ - long SRC_length; /* src addr length */ - long SRC_offset; /* src addr offset */ - long OPT_length; /* option length */ - long OPT_offset; /* option offset */ - long SEQ_number; /* sequnce number */ -}; - -/* connect confirmation */ - -struct T_conn_con { - long PRIM_type; /* always T_CONN_CON */ - long RES_length; /* responding addr length */ - long RES_offset; /* responding addr offset */ - long OPT_length; /* option length */ - long OPT_offset; /* option offset */ -}; - -/* disconnect indication */ - -struct T_discon_ind { - long PRIM_type; /* always T_DISCON_IND */ - long DISCON_reason; /* disconnect reason */ - long SEQ_number; /* sequnce number */ -}; - -/* data indication */ - -struct T_data_ind { - long PRIM_type; /* always T_DATA_IND */ - long MORE_flag; /* more data */ -}; - -/* expedited data indication */ - -struct T_exdata_ind { - long PRIM_type; /* always T_EXDATA_IND */ - long MORE_type; /* more data */ -}; - -/* information acknowledgment */ - -struct T_info_ack { - long PRIM_type; /* always T_INFO_ACK */ - long TSDU_size; /* max TSDU size */ - long ETSDU_size; /* max ETSDU size */ - long CDATA_size; /* max connect data size */ - long DDATA_size; /* max discon data size */ - long ADDR_size; /* address size */ - long OPT_size; /* options size */ - long TIDU_size; /* max TIDU size */ - long SERV_type; /* provider service type */ - long CURRENT_state; /* current state */ -}; - -/* bind acknowledgment */ - -struct T_bind_ack { - long PRIM_type; /* always T_BIND_ACK */ - long ADDR_length; /* addr length */ - long ADDR_offset; /* addr offset */ - unsigned long CONIND_number; /* connect ind to be queued */ -}; - -/* error acknowledgment */ - -struct T_error_ack { - long PRIM_type; /* always T_ERROR_ACK */ - long ERROR_prim; /* primitive in error */ - long TLI_error; /* TLI error code */ - long UNIX_error; /* UNIX error code */ -}; - -/* ok acknowledgment */ - -struct T_ok_ack { - long PRIM_type; /* always T_OK_ACK */ - long CORRECT_prim; /* correct primitive */ -}; - -/* unitdata indication */ - -struct T_unitdata_ind { - long PRIM_type; /* always T_UNITDATA_IND */ - long SRC_length; /* source addr length */ - long SRC_offset; /* source addr offset */ - long OPT_length; /* options length */ - long OPT_offset; /* options offset */ -}; - -/* unitdata error indication */ - -struct T_uderror_ind { - long PRIM_type; /* always T_UDERROR_IND */ - long DEST_length; /* dest addr length */ - long DEST_offset; /* dest addr offset */ - long OPT_length; /* options length */ - long OPT_offset; /* options offset */ - long ERROR_type; /* error type */ -}; - -/* manage options ack */ - -struct T_optmgmt_ack { - long PRIM_type; /* always T_OPTMGMT_ACK */ - long OPT_length; /* options length */ - long OPT_offset; /* options offset */ - long MGMT_flags; /* managment flags */ -}; - -/* orderly release indication */ - -struct T_ordrel_ind { - long PRIM_type; /* always T_ORDREL_IND */ -}; - -/* - * The following is a union of the primitives - */ -union T_primitives { - long type; /* primitive type */ - struct T_conn_req conn_req; /* connect request */ - struct T_conn_res conn_res; /* connect response */ - struct T_discon_req discon_req; /* disconnect request */ - struct T_data_req data_req; /* data request */ - struct T_exdata_req exdata_req; /* expedited data req */ - struct T_info_req info_req; /* information req */ - struct T_bind_req bind_req; /* bind request */ - struct T_unbind_req unbind_req; /* unbind request */ - struct T_unitdata_req unitdata_req; /* unitdata requset */ - struct T_optmgmt_req optmgmt_req; /* manage opt req */ - struct T_ordrel_req ordrel_req; /* orderly rel req */ - struct T_conn_ind conn_ind; /* connect indication */ - struct T_conn_con conn_con; /* connect corfirm */ - struct T_discon_ind discon_ind; /* discon indication */ - struct T_data_ind data_ind; /* data indication */ - struct T_exdata_ind exdata_ind; /* expedited data ind */ - struct T_info_ack info_ack; /* info ack */ - struct T_bind_ack bind_ack; /* bind ack */ - struct T_error_ack error_ack; /* error ack */ - struct T_ok_ack ok_ack; /* ok ack */ - struct T_unitdata_ind unitdata_ind; /* unitdata ind */ - struct T_uderror_ind uderror_ind; /* unitdata error ind */ - struct T_optmgmt_ack optmgmt_ack; /* manage opt ack */ - struct T_ordrel_ind ordrel_ind; /* orderly rel ind */ -}; - -#endif /*!_nettli_tihdr_h*/ diff --git a/usr/src/lib/libbc/inc/include/nettli/timod.h b/usr/src/lib/libbc/inc/include/nettli/timod.h deleted file mode 100644 index f5c5663df0..0000000000 --- a/usr/src/lib/libbc/inc/include/nettli/timod.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* from S5R3 sys/timod.h 10.3.1.1" */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ - - -/* #ident "@(#)kern-port:sys/timod.h 10.3.1.1" */ - -#ifndef _nettli_timod_h -#define _nettli_timod_h - -/* internal flags */ -#define USED 0x01 /* data structure in use */ -#define FATAL 0x02 /* fatal error M_ERROR occurred */ -#define WAITIOCACK 0x04 /* waiting for info for ioctl act */ -#define MORE 0x08 /* more data */ - - - -/* timod ioctls */ -#define TIMOD ('T'<<8) -#define TI_GETINFO (TIMOD|100) -#define TI_OPTMGMT (TIMOD|101) -#define TI_BIND (TIMOD|102) -#define TI_UNBIND (TIMOD|103) - - -/* TI interface user level structure - one per open file */ - -struct _ti_user { - ushort ti_flags; /* flags */ - int ti_rcvsize; /* rcv buffer size */ - char *ti_rcvbuf; /* rcv buffer */ - int ti_ctlsize; /* ctl buffer size */ - char *ti_ctlbuf; /* ctl buffer */ - char *ti_lookdbuf; /* look data buffer */ - char *ti_lookcbuf; /* look ctl buffer */ - int ti_lookdsize; /* look data buf size */ - int ti_lookcsize; /* look ctl buf size */ - int ti_maxpsz; /* TIDU size */ - long ti_servtype; /* service type */ - int ti_lookflg; /* buffered look flag */ -}; - - -/* This should be replaced */ -#define OPENFILES getdtablesize() - -#endif /*!_nettli_timod_h*/ diff --git a/usr/src/lib/libbc/inc/include/nettli/tiuser.h b/usr/src/lib/libbc/inc/include/nettli/tiuser.h deleted file mode 100644 index 71b9c89132..0000000000 --- a/usr/src/lib/libbc/inc/include/nettli/tiuser.h +++ /dev/null @@ -1,217 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* from S5R3 sys/tiuser.h 10.2.1.1" */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ - - -/* #ident "@(#)kern-port:sys/tiuser.h 10.2.1.1" */ - -#ifndef _nettli_tiuser_h -#define _nettli_tiuser_h - -/* - * The following are the error codes needed by both the kernel - * level transport providers and the user level library. - */ -#define TBADADDR 1 /* incorrect addr format */ -#define TBADOPT 2 /* incorrect option format */ -#define TACCES 3 /* incorrect permissions */ -#define TBADF 4 /* illegal transport fd */ -#define TNOADDR 5 /* couldn't allocate addr */ -#define TOUTSTATE 6 /* out of state */ -#define TBADSEQ 7 /* bad call sequnce number */ -#define TSYSERR 8 /* system error */ -#define TLOOK 9 /* event requires attention */ -#define TBADDATA 10 /* illegal amount of data */ -#define TBUFOVFLW 11 /* buffer not large enough */ -#define TFLOW 12 /* flow control */ -#define TNODATA 13 /* no data */ -#define TNODIS 14 /* discon_ind not found on q */ -#define TNOUDERR 15 /* unitdata error not found */ -#define TBADFLAG 16 /* bad flags */ -#define TNOREL 17 /* no ord rel found on q */ -#define TNOTSUPPORT 18 /* primitive not supported */ -#define TSTATECHNG 19 /* state is in process of changing */ - -/* - * The following are the events returned by t_look - */ -#define T_LISTEN 0x0001 /* connection indication received */ -#define T_CONNECT 0x0002 /* connect confirmation received */ -#define T_DATA 0x0004 /* normal data received */ -#define T_EXDATA 0x0008 /* expedited data received */ -#define T_DISCONNECT 0x0010 /* disconnect received */ -#define T_ERROR 0x0020 /* fatal error occurred */ -#define T_UDERR 0x0040 /* data gram error indication */ -#define T_ORDREL 0x0080 /* orderly release indication */ -#define T_EVENTS 0x00ff /* event mask */ - -/* - * The following are the flag definitions needed by the - * user level library routines. - */ - -#define T_MORE 0x001 /* more data */ -#define T_EXPEDITED 0x002 /* expedited data */ -#define T_NEGOTIATE 0x004 /* set opts */ -#define T_CHECK 0x008 /* check opts */ -#define T_DEFAULT 0x010 /* get default opts */ -#define T_SUCCESS 0x020 /* successful */ -#define T_FAILURE 0x040 /* failure */ - -/* - * protocol specific service limits - */ - -struct t_info { - long addr; /* size of protocol address */ - long options; /* size of protocol options */ - long tsdu; /* size of max transport service data unit */ - long etsdu; /* size of max expedited tsdu */ - long connect; /* max data for connection primitives */ - long discon; /* max data for disconnect primitives */ - long servtype; /* provider service type */ -}; - -/* - * Service type defines - */ -#define T_COTS 01 /* connection oriented transport service */ -#define T_COTS_ORD 02 /* connection oriented w/ orderly release */ -#define T_CLTS 03 /* connectionless transport service */ - -/* - * netbuf structure - */ - -struct netbuf { - unsigned int maxlen; - unsigned int len; - char *buf; -}; - -/* - * t_bind - format of the addres and options arguments of bind - */ - -struct t_bind { - struct netbuf addr; - unsigned qlen; -}; - -/* - * options management - */ -struct t_optmgmt { - struct netbuf opt; - long flags; -}; - -/* - * disconnect structure - */ -struct t_discon { - struct netbuf udata; /* user data */ - int reason; /* reason code */ - int sequence; /* sequence number */ -}; - -/* - * call structure - */ -struct t_call { - struct netbuf addr; /* address */ - struct netbuf opt; /* options */ - struct netbuf udata; /* user data */ - int sequence; /* sequence number */ -}; - -/* - * data gram structure - */ -struct t_unitdata { - struct netbuf addr; /* address */ - struct netbuf opt; /* options */ - struct netbuf udata; /* user data */ -}; - -/* - * unitdata error - */ -struct t_uderr { - struct netbuf addr; /* address */ - struct netbuf opt; /* options */ - long error; /* error code */ -}; - -/* - * The following are structure types used when dynamically - * allocating the above structures via t_structalloc(). - */ -#define T_BIND 1 /* struct t_bind */ -#define T_OPTMGMT 2 /* struct t_optmgmt */ -#define T_CALL 3 /* struct t_call */ -#define T_DIS 4 /* struct t_discon */ -#define T_UNITDATA 5 /* struct t_unitdata */ -#define T_UDERROR 6 /* struct t_uderr */ -#define T_INFO 7 /* struct t_info */ - -/* - * The following bits specify which fields of the above - * structures should be allocated by t_structalloc(). - */ -#define T_ADDR 0x01 /* address */ -#define T_OPT 0x02 /* options */ -#define T_UDATA 0x04 /* user data */ -#define T_ALL 0x07 /* all the above */ - - -/* - * the following are the states for the user - */ - -#define T_UNINIT 0 /* uninitialized */ -#define T_UNBND 1 /* unbound */ -#define T_IDLE 2 /* idle */ -#define T_OUTCON 3 /* outgoing connection pending */ -#define T_INCON 4 /* incoming connection pending */ -#define T_DATAXFER 5 /* data transfer */ -#define T_OUTREL 6 /* outgoing release pending */ -#define T_INREL 7 /* incoming release pending */ - -#define T_NOSTATES 8 - - - -#define ROUNDUP(X) ((X + 0x03)&~0x03) - -/* - * Macro for converting signal number to a mask suitable for - * sigblock(). - */ -#define sigmask(m) (1 << ((m)-1)) - -#endif /*!_nettli_tiuser_h*/ diff --git a/usr/src/lib/libbc/inc/include/pwd.h b/usr/src/lib/libbc/inc/include/pwd.h deleted file mode 100644 index 701d19d64c..0000000000 --- a/usr/src/lib/libbc/inc/include/pwd.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1989 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifndef __pwd_h -#define __pwd_h - -#include <sys/types.h> - -struct passwd { - char *pw_name; - char *pw_passwd; - int pw_uid; - int pw_gid; - char *pw_age; - char *pw_comment; - char *pw_gecos; - char *pw_dir; - char *pw_shell; -}; - - -#ifndef _POSIX_SOURCE -extern struct passwd *getpwent(); - -struct comment { - char *c_dept; - char *c_name; - char *c_acct; - char *c_bin; -}; - -#endif - -struct passwd *getpwuid(/* uid_t uid */); -struct passwd *getpwnam(/* char *name */); - -#endif /* !__pwd_h */ diff --git a/usr/src/lib/libbc/inc/include/pwdadj.h b/usr/src/lib/libbc/inc/include/pwdadj.h deleted file mode 100644 index 62d3542222..0000000000 --- a/usr/src/lib/libbc/inc/include/pwdadj.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1988 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifndef _pwdadj_h -#define _pwdadj_h - -struct passwd_adjunct { /* see getpwaent(3) */ - char *pwa_name; - char *pwa_passwd; - blabel_t pwa_minimum; - blabel_t pwa_maximum; - blabel_t pwa_def; - audit_state_t pwa_au_always; - audit_state_t pwa_au_never; - int pwa_version; - char *pwa_age; -}; - -struct passwd_adjunct *getpwaent(), *getpwauid(), *getpwanam(); - -#define PWA_VALID 0 -#define PWA_INVALID -1 -#define PWA_UNKNOWN -2 - -#endif /*!_pwdadj_h*/ diff --git a/usr/src/lib/libbc/inc/include/rpc/auth.h b/usr/src/lib/libbc/inc/include/rpc/auth.h deleted file mode 100644 index 8209121493..0000000000 --- a/usr/src/lib/libbc/inc/include/rpc/auth.h +++ /dev/null @@ -1,169 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * auth.h, Authentication interface. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - * - * The data structures are completely opaque to the client. The client - * is required to pass a AUTH * to routines that create rpc - * "sessions". - */ - - -#ifndef _rpc_auth_h -#define _rpc_auth_h - -#define MAX_AUTH_BYTES 400 -#define MAXNETNAMELEN 255 /* maximum length of network user's name */ - -/* - * Status returned from authentication check - */ -enum auth_stat { - AUTH_OK=0, - /* - * failed at remote end - */ - AUTH_BADCRED=1, /* bogus credentials (seal broken) */ - AUTH_REJECTEDCRED=2, /* client should begin new session */ - AUTH_BADVERF=3, /* bogus verifier (seal broken) */ - AUTH_REJECTEDVERF=4, /* verifier expired or was replayed */ - AUTH_TOOWEAK=5, /* rejected due to security reasons */ - /* - * failed locally - */ - AUTH_INVALIDRESP=6, /* bogus response verifier */ - AUTH_FAILED=7 /* some unknown reason */ -}; - -#if (mc68000 || sparc || vax || i386) -typedef u_long u_int32; /* 32-bit unsigned integers */ -#endif - -union des_block { - struct { - u_int32 high; - u_int32 low; - } key; - char c[8]; -}; -typedef union des_block des_block; -extern bool_t xdr_des_block(); - -/* - * Authentication info. Opaque to client. - */ -struct opaque_auth { - enum_t oa_flavor; /* flavor of auth */ - caddr_t oa_base; /* address of more auth stuff */ - u_int oa_length; /* not to exceed MAX_AUTH_BYTES */ -}; - - -/* - * Auth handle, interface to client side authenticators. - */ -typedef struct { - struct opaque_auth ah_cred; - struct opaque_auth ah_verf; - union des_block ah_key; - struct auth_ops { - void (*ah_nextverf)(); - int (*ah_marshal)(); /* nextverf & serialize */ - int (*ah_validate)(); /* validate varifier */ - int (*ah_refresh)(); /* refresh credentials */ - void (*ah_destroy)(); /* destroy this structure */ - } *ah_ops; - caddr_t ah_private; -} AUTH; - - -/* - * Authentication ops. - * The ops and the auth handle provide the interface to the authenticators. - * - * AUTH *auth; - * XDR *xdrs; - * struct opaque_auth verf; - */ -#define AUTH_NEXTVERF(auth) \ - ((*((auth)->ah_ops->ah_nextverf))(auth)) -#define auth_nextverf(auth) \ - ((*((auth)->ah_ops->ah_nextverf))(auth)) - -#define AUTH_MARSHALL(auth, xdrs) \ - ((*((auth)->ah_ops->ah_marshal))(auth, xdrs)) -#define auth_marshall(auth, xdrs) \ - ((*((auth)->ah_ops->ah_marshal))(auth, xdrs)) - -#define AUTH_VALIDATE(auth, verfp) \ - ((*((auth)->ah_ops->ah_validate))((auth), verfp)) -#define auth_validate(auth, verfp) \ - ((*((auth)->ah_ops->ah_validate))((auth), verfp)) - -#define AUTH_REFRESH(auth) \ - ((*((auth)->ah_ops->ah_refresh))(auth)) -#define auth_refresh(auth) \ - ((*((auth)->ah_ops->ah_refresh))(auth)) - -#define AUTH_DESTROY(auth) \ - ((*((auth)->ah_ops->ah_destroy))(auth)) -#define auth_destroy(auth) \ - ((*((auth)->ah_ops->ah_destroy))(auth)) - - -extern struct opaque_auth _null_auth; - - -/* - * These are the various implementations of client side authenticators. - */ - -/* - * Unix style authentication - * AUTH *authunix_create(machname, uid, gid, len, aup_gids) - * char *machname; - * int uid; - * int gid; - * int len; - * int *aup_gids; - */ -#ifdef KERNEL -extern AUTH *authkern_create(); /* takes no parameters */ -#else -extern AUTH *authsys_create(const char *, const uid_t, const gid_t, - const int, const gid_t *); -extern AUTH *authsys_create_default(void); /* takes no parameters */ -extern AUTH *authnone_create(); /* takes no parameters */ -#endif -extern AUTH *authdes_create(); - -#define AUTH_NONE 0 /* no authentication */ -#define AUTH_NULL 0 /* backward compatibility */ -#define AUTH_UNIX 1 /* unix style (uid, gids) */ -#define AUTH_SHORT 2 /* short hand unix style */ -#define AUTH_DES 3 /* des style (encrypted timestamps) */ - -#endif /* !_rpc_auth_h */ diff --git a/usr/src/lib/libbc/inc/include/rpc/auth_des.h b/usr/src/lib/libbc/inc/include/rpc/auth_des.h deleted file mode 100644 index a580e7328a..0000000000 --- a/usr/src/lib/libbc/inc/include/rpc/auth_des.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * %M%, Protocol for DES style authentication for RPC - * - * Copyright (C) 1986, Sun Microsystems, Inc. - */ - -#ifndef _rpc_auth_des_h -#define _rpc_auth_des_h - -/* - * There are two kinds of "names": fullnames and nicknames - */ -enum authdes_namekind { - ADN_FULLNAME, - ADN_NICKNAME -}; - -/* - * A fullname contains the network name of the client, - * a conversation key and the window - */ -struct authdes_fullname { - char *name; /* network name of client, up to MAXNETNAMELEN */ - des_block key; /* conversation key */ - u_long window; /* associated window */ -}; - - -/* - * A credential - */ -struct authdes_cred { - enum authdes_namekind adc_namekind; - struct authdes_fullname adc_fullname; - u_long adc_nickname; -}; - - - -/* - * A des authentication verifier - */ -struct authdes_verf { - union { - struct timeval adv_ctime; /* clear time */ - des_block adv_xtime; /* crypt time */ - } adv_time_u; - u_long adv_int_u; -}; - -/* - * des authentication verifier: client variety - * - * adv_timestamp is the current time. - * adv_winverf is the credential window + 1. - * Both are encrypted using the conversation key. - */ -#define adv_timestamp adv_time_u.adv_ctime -#define adv_xtimestamp adv_time_u.adv_xtime -#define adv_winverf adv_int_u - -/* - * des authentication verifier: server variety - * - * adv_timeverf is the client's timestamp + client's window - * adv_nickname is the server's nickname for the client. - * adv_timeverf is encrypted using the conversation key. - */ -#define adv_timeverf adv_time_u.adv_ctime -#define adv_xtimeverf adv_time_u.adv_xtime -#define adv_nickname adv_int_u - -#endif /*!_rpc_auth_des_h*/ diff --git a/usr/src/lib/libbc/inc/include/rpc/auth_unix.h b/usr/src/lib/libbc/inc/include/rpc/auth_unix.h deleted file mode 100644 index e42e6ef936..0000000000 --- a/usr/src/lib/libbc/inc/include/rpc/auth_unix.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * auth_unix.h, Protocol for UNIX style authentication parameters for RPC - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -#ifndef _rpc_auth_unix_h -#define _rpc_auth_unix_h - -/* - * The system is very weak. The client uses no encryption for it - * credentials and only sends null verifiers. The server sends backs - * null verifiers or optionally a verifier that suggests a new short hand - * for the credentials. - */ - -/* The machine name is part of a credential; it may not exceed 255 bytes */ -#define MAX_MACHINE_NAME 255 - -/* gids compose part of a credential; there may not be more than 16 of them */ -#define NGRPS 16 - -/* - * Unix style credentials. - */ -struct authunix_parms { - u_long aup_time; - char *aup_machname; - u_int aup_uid; - u_int aup_gid; - u_int aup_len; - u_int *aup_gids; -}; - -extern bool_t xdr_authunix_parms(); - -/* - * If a response verifier has flavor AUTH_SHORT, - * then the body of the response verifier encapsulates the following structure; - * again it is serialized in the obvious fashion. - */ -struct short_hand_verf { - struct opaque_auth new_cred; -}; - -#endif /*!_rpc_auth_unix_h*/ diff --git a/usr/src/lib/libbc/inc/include/rpc/clnt.h b/usr/src/lib/libbc/inc/include/rpc/clnt.h deleted file mode 100644 index bfd9dc8f7c..0000000000 --- a/usr/src/lib/libbc/inc/include/rpc/clnt.h +++ /dev/null @@ -1,383 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * clnt.h - Client side remote procedure call interface. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -#ifndef _rpc_clnt_h -#define _rpc_clnt_h - -/* - * Rpc calls return an enum clnt_stat. This should be looked at more, - * since each implementation is required to live with this (implementation - * independent) list of errors. - */ -enum clnt_stat { - RPC_SUCCESS=0, /* call succeeded */ - /* - * local errors - */ - RPC_CANTENCODEARGS=1, /* can't encode arguments */ - RPC_CANTDECODERES=2, /* can't decode results */ - RPC_CANTSEND=3, /* failure in sending call */ - RPC_CANTRECV=4, /* failure in receiving result */ - RPC_TIMEDOUT=5, /* call timed out */ - RPC_INTR=18, /* call interrupted */ - /* - * remote errors - */ - RPC_VERSMISMATCH=6, /* rpc versions not compatible */ - RPC_AUTHERROR=7, /* authentication error */ - RPC_PROGUNAVAIL=8, /* program not available */ - RPC_PROGVERSMISMATCH=9, /* program version mismatched */ - RPC_PROCUNAVAIL=10, /* procedure unavailable */ - RPC_CANTDECODEARGS=11, /* decode arguments error */ - RPC_SYSTEMERROR=12, /* generic "other problem" */ - - /* - * callrpc & clnt_create errors - */ - RPC_UNKNOWNHOST=13, /* unknown host name */ - RPC_UNKNOWNPROTO=17, /* unkown protocol */ - - /* - * _ create errors - */ - RPC_PMAPFAILURE=14, /* the pmapper failed in its call */ - RPC_PROGNOTREGISTERED=15, /* remote program is not registered */ - /* - * unspecified error - */ - RPC_FAILED=16 -}; - - -/* - * Error info. - */ -struct rpc_err { - enum clnt_stat re_status; - union { - int RE_errno; /* realated system error */ - enum auth_stat RE_why; /* why the auth error occurred */ - struct { - u_long low; /* lowest verion supported */ - u_long high; /* highest verion supported */ - } RE_vers; - struct { /* maybe meaningful if RPC_FAILED */ - long s1; - long s2; - } RE_lb; /* life boot & debugging only */ - } ru; -#define re_errno ru.RE_errno -#define re_why ru.RE_why -#define re_vers ru.RE_vers -#define re_lb ru.RE_lb -}; - - -/* - * Client rpc handle. - * Created by individual implementations, see e.g. rpc_udp.c. - * Client is responsible for initializing auth, see e.g. auth_none.c. - */ -typedef struct { - AUTH *cl_auth; /* authenticator */ - struct clnt_ops { - enum clnt_stat (*cl_call)(); /* call remote procedure */ - void (*cl_abort)(); /* abort a call */ - void (*cl_geterr)(); /* get specific error code */ - bool_t (*cl_freeres)(); /* frees results */ - void (*cl_destroy)(); /* destroy this structure */ - bool_t (*cl_control)(); /* the ioctl() of rpc */ - } *cl_ops; - caddr_t cl_private; /* private stuff */ -} CLIENT; - - -/* - * client side rpc interface ops - * - * Parameter types are: - * - */ - -/* - * enum clnt_stat - * CLNT_CALL(rh, proc, xargs, argsp, xres, resp, timeout) - * CLIENT *rh; - * u_long proc; - * xdrproc_t xargs; - * caddr_t argsp; - * xdrproc_t xres; - * caddr_t resp; - * struct timeval timeout; - */ -#define CLNT_CALL(rh, proc, xargs, argsp, xres, resp, secs) \ - ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, argsp, xres, resp, secs)) -#define clnt_call(rh, proc, xargs, argsp, xres, resp, secs) \ - ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, argsp, xres, resp, secs)) - -/* - * void - * CLNT_ABORT(rh); - * CLIENT *rh; - */ -#define CLNT_ABORT(rh) ((*(rh)->cl_ops->cl_abort)(rh)) -#define clnt_abort(rh) ((*(rh)->cl_ops->cl_abort)(rh)) - -/* - * struct rpc_err - * CLNT_GETERR(rh); - * CLIENT *rh; - */ -#define CLNT_GETERR(rh, errp) ((*(rh)->cl_ops->cl_geterr)(rh, errp)) -#define clnt_geterr(rh, errp) ((*(rh)->cl_ops->cl_geterr)(rh, errp)) - - -/* - * bool_t - * CLNT_FREERES(rh, xres, resp); - * CLIENT *rh; - * xdrproc_t xres; - * caddr_t resp; - */ -#define CLNT_FREERES(rh, xres, resp) ((*(rh)->cl_ops->cl_freeres)\ - (rh, xres, resp)) -#define clnt_freeres(rh, xres, resp) ((*(rh)->cl_ops->cl_freeres)\ - (rh, xres, resp)) - -/* - * bool_t - * CLNT_CONTROL(cl, request, info) - * CLIENT *cl; - * u_int request; - * char *info; - */ -#define CLNT_CONTROL(cl, rq, in) ((*(cl)->cl_ops->cl_control)(cl, rq, in)) -#define clnt_control(cl, rq, in) ((*(cl)->cl_ops->cl_control)(cl, rq, in)) - -/* - * control operations that apply to both udp and tcp transports - */ -#define CLSET_TIMEOUT 1 /* set timeout (timeval) */ -#define CLGET_TIMEOUT 2 /* get timeout (timeval) */ -#define CLGET_SERVER_ADDR 3 /* get server's address (sockaddr) */ -#define CLGET_FD 6 /* get connections file descriptor */ -#define CLSET_FD_CLOSE 8 /* close fd while clnt_destroy */ -#define CLSET_FD_NCLOSE 9 /* Do not close fd while clnt_destroy */ -/* - * udp only control operations - */ -#define CLSET_RETRY_TIMEOUT 4 /* set retry timeout (timeval) */ -#define CLGET_RETRY_TIMEOUT 5 /* get retry timeout (timeval) */ - -/* - * void - * CLNT_DESTROY(rh); - * CLIENT *rh; - */ -#define CLNT_DESTROY(rh) ((*(rh)->cl_ops->cl_destroy)(rh)) -#define clnt_destroy(rh) ((*(rh)->cl_ops->cl_destroy)(rh)) - - -/* - * RPCTEST is a test program which is accessable on every rpc - * transport/port. It is used for testing, performance evaluation, - * and network administration. - */ - -#define RPCTEST_PROGRAM ((u_long)1) -#define RPCTEST_VERSION ((u_long)1) -#define RPCTEST_NULL_PROC ((u_long)2) -#define RPCTEST_NULL_BATCH_PROC ((u_long)3) - -/* - * By convention, procedure 0 takes null arguments and returns them - */ - -#define NULLPROC ((u_long)0) - -/* - * Below are the client handle creation routines for the various - * implementations of client side rpc. They can return NULL if a - * creation failure occurs. - */ - -#ifndef KERNEL -/* - * Memory based rpc (for speed check and testing) - * CLIENT * - * clntraw_create(prog, vers) - * u_long prog; - * u_long vers; - */ -extern CLIENT *clntraw_create(); - - -/* - * Generic client creation routine. Supported protocols are "udp" and "tcp" - */ -extern CLIENT * -clnt_create(/*host, prog, vers, prot*/); /* - char *host; -- hostname - u_long prog; -- program number - u_long vers; -- version number - char *prot; -- protocol -*/ - -/* - * Generic client creation routine. Supported protocols are "udp" and "tcp" - */ -extern CLIENT * -clnt_create_vers(/*host, prog, vers_out, vers_low, vers_high, prot*/); -/* - char *host; -- hostname - u_long prog; -- program number - u_long *vers_out; -- servers best version number - u_long vers_low; -- low version number - u_long vers_high; -- high version number - char *prot; -- protocol -*/ - - - -/* - * TCP based rpc - * CLIENT * - * clnttcp_create(raddr, prog, vers, sockp, sendsz, recvsz) - * struct sockaddr_in *raddr; - * u_long prog; - * u_long version; - * register int *sockp; - * u_int sendsz; - * u_int recvsz; - */ -extern CLIENT *clnttcp_create(); - -/* - * UDP based rpc. - * CLIENT * - * clntudp_create(raddr, program, version, wait, sockp) - * struct sockaddr_in *raddr; - * u_long program; - * u_long version; - * struct timeval wait; - * int *sockp; - * - * Same as above, but you specify max packet sizes. - * CLIENT * - * clntudp_bufcreate(raddr, program, version, wait, sockp, sendsz, recvsz) - * struct sockaddr_in *raddr; - * u_long program; - * u_long version; - * struct timeval wait; - * int *sockp; - * u_int sendsz; - * u_int recvsz; - */ -extern CLIENT *clntudp_create(); -extern CLIENT *clntudp_bufcreate(); - -/* - * Print why creation failed - */ -void clnt_pcreateerror(/* char *msg */); /* stderr */ -char *clnt_spcreateerror(/* char *msg */); /* string */ - -/* - * Like clnt_perror(), but is more verbose in its output - */ -void clnt_perrno(/* enum clnt_stat num */); /* stderr */ - -/* - * Print an English error message, given the client error code - */ -void clnt_perror(/* CLIENT *clnt, char *msg */); /* stderr */ -char *clnt_sperror(/* CLIENT *clnt, char *msg */); /* string */ - -/* - * If a creation fails, the following allows the user to figure out why. - */ -struct rpc_createerr { - enum clnt_stat cf_stat; - struct rpc_err cf_error; /* useful when cf_stat == RPC_PMAPFAILURE */ -}; - -extern struct rpc_createerr rpc_createerr; - - -#endif /* !KERNEL */ - -/* - * Copy error message to buffer. - */ -char *clnt_sperrno(/* enum clnt_stat num */); /* string */ - - -#ifdef KERNEL -/* - * Kernel udp based rpc - * CLIENT * - * clntkudp_create(addr, pgm, vers) - * struct sockaddr_in *addr; - * u_long pgm; - * u_long vers; - */ -extern CLIENT *clntkudp_create(); -#endif - -/* - * Timers used for the pseudo-transport protocol when using datagrams - */ -struct rpc_timers { - u_short rt_srtt; /* smoothed round-trip time */ - u_short rt_deviate; /* estimated deviation */ - u_long rt_rtxcur; /* current (backed-off) rto */ -}; - -/* - * Feedback values used for possible congestion and rate control - */ -#define FEEDBACK_REXMIT1 1 /* first retransmit */ -#define FEEDBACK_OK 2 /* no retransmits */ - -#define UDPMSGSIZE 8800 /* rpc imposed limit on udp msg size */ -#define RPCSMALLMSGSIZE 400 /* a more reasonable packet size */ - -#ifdef KERNEL -/* - * Alloc_xid presents an interface which kernel RPC clients - * should use to allocate their XIDs. Its implementation - * may change over time (for example, to allow sharing of - * XIDs between the kernel and user-level applications, so - * all XID allocation should be done by calling alloc_xid(). - */ -extern u_long clntxid; -#define alloc_xid() (clntxid++) -#endif - -#endif /*!_rpc_clnt_h*/ diff --git a/usr/src/lib/libbc/inc/include/rpc/key_prot.h b/usr/src/lib/libbc/inc/include/rpc/key_prot.h deleted file mode 100644 index 4c9c320649..0000000000 --- a/usr/src/lib/libbc/inc/include/rpc/key_prot.h +++ /dev/null @@ -1,113 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1988 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Compiled from key_prot.x using rpcgen. - * DO NOT EDIT THIS FILE! - * This is NOT source code! - */ - -#ifndef _rpc_key_prot_h -#define _rpc_key_prot_h - -#define KEY_PROG 100029 -#define KEY_VERS 1 -#define KEY_SET 1 -#define KEY_ENCRYPT 2 -#define KEY_DECRYPT 3 -#define KEY_GEN 4 -#define KEY_GETCRED 5 - -#define PROOT 3 -#define HEXMODULUS "d4a0ba0250b6fd2ec626e7efd637df76c716e22d0944b88b" -#define HEXKEYBYTES 48 -#define KEYSIZE 192 -#define KEYBYTES 24 -#define KEYCHECKSUMSIZE 16 - -enum keystatus { - KEY_SUCCESS = 0, - KEY_NOSECRET = 1, - KEY_UNKNOWN = 2, - KEY_SYSTEMERR = 3, -}; -typedef enum keystatus keystatus; -bool_t xdr_keystatus(); - -#ifndef KERNEL - -typedef char keybuf[HEXKEYBYTES]; -bool_t xdr_keybuf(); - -#endif - -typedef char *netnamestr; -bool_t xdr_netnamestr(); - - -struct cryptkeyarg { - netnamestr remotename; - des_block deskey; -}; -typedef struct cryptkeyarg cryptkeyarg; -bool_t xdr_cryptkeyarg(); - - -struct cryptkeyres { - keystatus status; - union { - des_block deskey; - } cryptkeyres_u; -}; -typedef struct cryptkeyres cryptkeyres; -bool_t xdr_cryptkeyres(); - -#define MAXGIDS 16 - -struct unixcred { - u_int uid; - u_int gid; - struct { - u_int gids_len; - u_int *gids_val; - } gids; -}; -typedef struct unixcred unixcred; -bool_t xdr_unixcred(); - - -struct getcredres { - keystatus status; - union { - unixcred cred; - } getcredres_u; -}; -typedef struct getcredres getcredres; -bool_t xdr_getcredres(); - -#endif /*!_rpc_key_prot_h*/ diff --git a/usr/src/lib/libbc/inc/include/rpc/pmap_clnt.h b/usr/src/lib/libbc/inc/include/rpc/pmap_clnt.h deleted file mode 100644 index 885026ea83..0000000000 --- a/usr/src/lib/libbc/inc/include/rpc/pmap_clnt.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * pmap_clnt.h - * Supplies C routines to get to portmap services. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -/* - * Usage: - * success = pmap_set(program, version, protocol, port); - * success = pmap_unset(program, version); - * port = pmap_getport(address, program, version, protocol); - * head = pmap_getmaps(address); - * clnt_stat = pmap_rmtcall(address, program, version, procedure, - * xdrargs, argsp, xdrres, resp, tout, port_ptr) - * (works for udp only.) - * clnt_stat = clnt_broadcast(program, version, procedure, - * xdrargs, argsp, xdrres, resp, eachresult) - * (like pmap_rmtcall, except the call is broadcasted to all - * locally connected nets. For each valid response received, - * the procedure eachresult is called. Its form is: - * done = eachresult(resp, raddr) - * bool_t done; - * caddr_t resp; - * struct sockaddr_in raddr; - * where resp points to the results of the call and raddr is the - * address if the responder to the broadcast. - */ - -#ifndef _rpc_pmap_clnt_h -#define _rpc_pmap_clnt_h - -extern bool_t pmap_set(); -extern bool_t pmap_unset(); -extern struct pmaplist *pmap_getmaps(); -enum clnt_stat pmap_rmtcall(); -enum clnt_stat clnt_broadcast(); -extern u_short pmap_getport(); - -#endif /*!_rpc_pmap_clnt_h*/ diff --git a/usr/src/lib/libbc/inc/include/rpc/pmap_prot.h b/usr/src/lib/libbc/inc/include/rpc/pmap_prot.h deleted file mode 100644 index e40fbf15af..0000000000 --- a/usr/src/lib/libbc/inc/include/rpc/pmap_prot.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * pmap_prot.h - * Protocol for the local binder service, or pmap. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - * - * The following procedures are supported by the protocol: - * - * PMAPPROC_NULL() returns () - * takes nothing, returns nothing - * - * PMAPPROC_SET(struct pmap) returns (bool_t) - * TRUE is success, FALSE is failure. Registers the tuple - * [prog, vers, prot, port]. - * - * PMAPPROC_UNSET(struct pmap) returns (bool_t) - * TRUE is success, FALSE is failure. Un-registers pair - * [prog, vers]. prot and port are ignored. - * - * PMAPPROC_GETPORT(struct pmap) returns (long unsigned). - * 0 is failure. Otherwise returns the port number where the pair - * [prog, vers] is registered. It may lie! - * - * PMAPPROC_DUMP() RETURNS (struct pmaplist *) - * - * PMAPPROC_CALLIT(unsigned, unsigned, unsigned, string<>) - * RETURNS (port, string<>); - * usage: encapsulatedresults = - * PMAPPROC_CALLIT(prog, vers, proc, encapsulatedargs); - * Calls the procedure on the local machine. If it is not registered, - * this procedure is quite; ie it does not return error information!!! - * This procedure only is supported on rpc/udp and calls via - * rpc/udp. This routine only passes null authentication parameters. - * This file has no interface to xdr routines for PMAPPROC_CALLIT. - * - * The service supports remote procedure calls on udp/ip or tcp/ip socket 111. - */ - -#ifndef _rpc_pmap_prot_h -#define _rpc_pmap_prot_h - -#define PMAPPORT ((u_short)111) -#define PMAPPROG ((u_long)100000) -#define PMAPVERS ((u_long)2) -#define PMAPVERS_PROTO ((u_long)2) -#define PMAPVERS_ORIG ((u_long)1) -#define PMAPPROC_NULL ((u_long)0) -#define PMAPPROC_SET ((u_long)1) -#define PMAPPROC_UNSET ((u_long)2) -#define PMAPPROC_GETPORT ((u_long)3) -#define PMAPPROC_DUMP ((u_long)4) -#define PMAPPROC_CALLIT ((u_long)5) - -struct pmap { - long unsigned pm_prog; - long unsigned pm_vers; - long unsigned pm_prot; - long unsigned pm_port; -}; - -extern bool_t xdr_pmap(); - -struct pmaplist { - struct pmap pml_map; - struct pmaplist *pml_next; -}; - -#ifndef KERNEL -extern bool_t xdr_pmaplist(); -#endif /*!KERNEL*/ - -#endif /*!_rpc_pmap_prot_h*/ diff --git a/usr/src/lib/libbc/inc/include/rpc/pmap_rmt.h b/usr/src/lib/libbc/inc/include/rpc/pmap_rmt.h deleted file mode 100644 index 16a242def6..0000000000 --- a/usr/src/lib/libbc/inc/include/rpc/pmap_rmt.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Structures and XDR routines for parameters to and replies from - * the portmapper remote-call-service. - * - * Copyright (C) 1986, Sun Microsystems, Inc. - */ - -#ifndef _rpc_pmap_rmt_h -#define _rpc_pmap_rmt_h - -struct rmtcallargs { - u_long prog, vers, proc, arglen; - caddr_t args_ptr; - xdrproc_t xdr_args; -}; - -bool_t xdr_rmtcall_args(); - -struct rmtcallres { - u_long *port_ptr; - u_long resultslen; - caddr_t results_ptr; - xdrproc_t xdr_results; -}; - -bool_t xdr_rmtcallres(); - -#endif /*!_rpc_pmap_rmt_h*/ diff --git a/usr/src/lib/libbc/inc/include/rpc/raw.h b/usr/src/lib/libbc/inc/include/rpc/raw.h deleted file mode 100644 index 0314fa4a84..0000000000 --- a/usr/src/lib/libbc/inc/include/rpc/raw.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * raw.h - * - * Raw interface - * The common memory area over which they will communicate - * - * Copyright (C) 1989, Sun Microsystems, Inc. - */ - -#ifndef _RPC_RAW_H -#define _RPC_RAW_H - -char *_rpcrawcombuf; -#endif /* !_RPC_RAW_H */ diff --git a/usr/src/lib/libbc/inc/include/rpc/rpc.h b/usr/src/lib/libbc/inc/include/rpc/rpc.h deleted file mode 100644 index 38f301616f..0000000000 --- a/usr/src/lib/libbc/inc/include/rpc/rpc.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * rpc.h, Just includes the billions of rpc header files necessary to - * do remote procedure calling. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -#ifndef _rpc_rpc_h -#define _rpc_rpc_h - -#include <rpc/types.h> /* some typedefs */ -#include <netinet/in.h> - -/* external data representation interfaces */ -#include <rpc/xdr.h> /* generic (de)serializer */ - -/* Client side only authentication */ -#include <rpc/auth.h> /* generic authenticator (client side) */ - -/* Client side (mostly) remote procedure call */ -#include <rpc/clnt.h> /* generic rpc stuff */ - -/* semi-private protocol headers */ -#include <rpc/rpc_msg.h> /* protocol for rpc messages */ -#include <rpc/auth_unix.h> /* protocol for unix style cred */ -#include <rpc/auth_des.h> /* protocol for des style cred */ - -/* Server side only remote procedure callee */ -#include <rpc/svc.h> /* service manager and multiplexer */ -#include <rpc/svc_auth.h> /* service side authenticator */ - -#endif /*!_rpc_rpc_h*/ diff --git a/usr/src/lib/libbc/inc/include/rpc/rpc_msg.h b/usr/src/lib/libbc/inc/include/rpc/rpc_msg.h deleted file mode 100644 index 650df38893..0000000000 --- a/usr/src/lib/libbc/inc/include/rpc/rpc_msg.h +++ /dev/null @@ -1,183 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * rpc message definition - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -#ifndef _rpc_rpc_msg_h -#define _rpc_rpc_msg_h - -#define RPC_MSG_VERSION ((u_long) 2) -#define RPC_SERVICE_PORT ((u_short) 2048) - -/* - * Bottom up definition of an rpc message. - * NOTE: call and reply use the same overall stuct but - * different parts of unions within it. - */ - -enum msg_type { - CALL=0, - REPLY=1 -}; - -enum reply_stat { - MSG_ACCEPTED=0, - MSG_DENIED=1 -}; - -enum accept_stat { - SUCCESS=0, - PROG_UNAVAIL=1, - PROG_MISMATCH=2, - PROC_UNAVAIL=3, - GARBAGE_ARGS=4, - SYSTEM_ERR=5 -}; - -enum reject_stat { - RPC_MISMATCH=0, - AUTH_ERROR=1 -}; - -/* - * Reply part of an rpc exchange - */ - -/* - * Reply to an rpc request that was accepted by the server. - * Note: there could be an error even though the request was - * accepted. - */ -struct accepted_reply { - struct opaque_auth ar_verf; - enum accept_stat ar_stat; - union { - struct { - u_long low; - u_long high; - } AR_versions; - struct { - caddr_t where; - xdrproc_t proc; - } AR_results; - /* and many other null cases */ - } ru; -#define ar_results ru.AR_results -#define ar_vers ru.AR_versions -}; - -/* - * Reply to an rpc request that was rejected by the server. - */ -struct rejected_reply { - enum reject_stat rj_stat; - union { - struct { - u_long low; - u_long high; - } RJ_versions; - enum auth_stat RJ_why; /* why authentication did not work */ - } ru; -#define rj_vers ru.RJ_versions -#define rj_why ru.RJ_why -}; - -/* - * Body of a reply to an rpc request. - */ -struct reply_body { - enum reply_stat rp_stat; - union { - struct accepted_reply RP_ar; - struct rejected_reply RP_dr; - } ru; -#define rp_acpt ru.RP_ar -#define rp_rjct ru.RP_dr -}; - -/* - * Body of an rpc request call. - */ -struct call_body { - u_long cb_rpcvers; /* must be equal to two */ - u_long cb_prog; - u_long cb_vers; - u_long cb_proc; - struct opaque_auth cb_cred; - struct opaque_auth cb_verf; /* protocol specific - provided by client */ -}; - -/* - * The rpc message - */ -struct rpc_msg { - u_long rm_xid; - enum msg_type rm_direction; - union { - struct call_body RM_cmb; - struct reply_body RM_rmb; - } ru; -#define rm_call ru.RM_cmb -#define rm_reply ru.RM_rmb -}; -#define acpted_rply ru.RM_rmb.ru.RP_ar -#define rjcted_rply ru.RM_rmb.ru.RP_dr - - -/* - * XDR routine to handle a rpc message. - * xdr_callmsg(xdrs, cmsg) - * XDR *xdrs; - * struct rpc_msg *cmsg; - */ -extern bool_t xdr_callmsg(); - -/* - * XDR routine to pre-serialize the static part of a rpc message. - * xdr_callhdr(xdrs, cmsg) - * XDR *xdrs; - * struct rpc_msg *cmsg; - */ -extern bool_t xdr_callhdr(); - -/* - * XDR routine to handle a rpc reply. - * xdr_replymsg(xdrs, rmsg) - * XDR *xdrs; - * struct rpc_msg *rmsg; - */ -extern bool_t xdr_replymsg(); - -/* - * Fills in the error part of a reply message. - * _seterr_reply(msg, error) - * struct rpc_msg *msg; - * struct rpc_err *error; - */ -extern void _seterr_reply(); - -#endif /*!_rpc_rpc_msg_h*/ diff --git a/usr/src/lib/libbc/inc/include/rpc/svc.h b/usr/src/lib/libbc/inc/include/rpc/svc.h deleted file mode 100644 index 757681f388..0000000000 --- a/usr/src/lib/libbc/inc/include/rpc/svc.h +++ /dev/null @@ -1,284 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1984 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _rpc_svc_h -#define _rpc_svc_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * svc.h, Server-side remote procedure call interface. - */ - -/* - * This interface must manage two items concerning remote procedure calling: - * - * 1) An arbitrary number of transport connections upon which rpc requests - * are received. The two most notable transports are TCP and UDP; they are - * created and registered by routines in svc_tcp.c and svc_udp.c, respectively; - * they in turn call xprt_register and xprt_unregister. - * - * 2) An arbitrary number of locally registered services. Services are - * described by the following four data: program number, version number, - * "service dispatch" function, a transport handle, and a boolean that - * indicates whether or not the exported program should be registered with a - * local binder service; if true the program's number and version and the - * port number from the transport handle are registered with the binder. - * These data are registered with the rpc svc system via svc_register. - * - * A service's dispatch function is called whenever an rpc request comes in - * on a transport. The request's program and version numbers must match - * those of the registered service. The dispatch function is passed two - * parameters, struct svc_req * and SVCXPRT *, defined below. - */ - -enum xprt_stat { - XPRT_DIED, - XPRT_MOREREQS, - XPRT_IDLE -}; - -/* - * Server side transport handle - */ -typedef struct { - int xp_sock; - u_short xp_port; /* associated port number */ - struct xp_ops { - bool_t (*xp_recv)(); /* receive incomming requests */ - enum xprt_stat (*xp_stat)(); /* get transport status */ - bool_t (*xp_getargs)(); /* get arguments */ - bool_t (*xp_reply)(); /* send reply */ - bool_t (*xp_freeargs)(); /* free mem allocated for args */ - void (*xp_destroy)(); /* destroy this struct */ - } *xp_ops; - int xp_addrlen; /* length of remote address */ - struct sockaddr_in xp_raddr; /* remote address */ - struct opaque_auth xp_verf; /* raw response verifier */ - caddr_t xp_p1; /* private: for use by svc ops */ - caddr_t xp_p2; /* private: for use by svc ops */ - caddr_t xp_p3; /* private: for use by svc lib */ -} SVCXPRT; - -/* - * Approved way of getting address of caller - */ -#define svc_getcaller(x) (&(x)->xp_raddr) - -/* - * Operations defined on an SVCXPRT handle - * - * SVCXPRT *xprt; - * struct rpc_msg *msg; - * xdrproc_t xargs; - * caddr_t argsp; - */ -#define SVC_RECV(xprt, msg) \ - (*(xprt)->xp_ops->xp_recv)((xprt), (msg)) -#define svc_recv(xprt, msg) \ - (*(xprt)->xp_ops->xp_recv)((xprt), (msg)) - -#define SVC_STAT(xprt) \ - (*(xprt)->xp_ops->xp_stat)(xprt) -#define svc_stat(xprt) \ - (*(xprt)->xp_ops->xp_stat)(xprt) - -#define SVC_GETARGS(xprt, xargs, argsp) \ - (*(xprt)->xp_ops->xp_getargs)((xprt), (xargs), (argsp)) -#define svc_getargs(xprt, xargs, argsp) \ - (*(xprt)->xp_ops->xp_getargs)((xprt), (xargs), (argsp)) - -#define SVC_REPLY(xprt, msg) \ - (*(xprt)->xp_ops->xp_reply) ((xprt), (msg)) -#define svc_reply(xprt, msg) \ - (*(xprt)->xp_ops->xp_reply) ((xprt), (msg)) - -#define SVC_FREEARGS(xprt, xargs, argsp) \ - (*(xprt)->xp_ops->xp_freeargs)((xprt), (xargs), (argsp)) -#define svc_freeargs(xprt, xargs, argsp) \ - (*(xprt)->xp_ops->xp_freeargs)((xprt), (xargs), (argsp)) - -#define SVC_DESTROY(xprt) \ - (*(xprt)->xp_ops->xp_destroy)(xprt) -#define svc_destroy(xprt) \ - (*(xprt)->xp_ops->xp_destroy)(xprt) - - -/* - * Service request - */ -struct svc_req { - u_long rq_prog; /* service program number */ - u_long rq_vers; /* service protocol version */ - u_long rq_proc; /* the desired procedure */ - struct opaque_auth rq_cred; /* raw creds from the wire */ - caddr_t rq_clntcred; /* read only cooked cred */ - SVCXPRT *rq_xprt; /* associated transport */ -}; - - -/* - * Service registration - * - * svc_register(xprt, prog, vers, dispatch, protocol) - * SVCXPRT *xprt; - * u_long prog; - * u_long vers; - * void (*dispatch)(); - * int protocol; like TCP or UDP, zero means do not register - */ -extern bool_t svc_register(); - -/* - * Service un-registration - * - * svc_unregister(prog, vers) - * u_long prog; - * u_long vers; - */ -extern void svc_unregister(); - -/* - * Transport registration. - * - * xprt_register(xprt) - * SVCXPRT *xprt; - */ -extern void xprt_register(); - -/* - * Transport un-register - * - * xprt_unregister(xprt) - * SVCXPRT *xprt; - */ -extern void xprt_unregister(); - - - - -/* - * When the service routine is called, it must first check to see if it - * knows about the procedure; if not, it should call svcerr_noproc - * and return. If so, it should deserialize its arguments via - * SVC_GETARGS (defined above). If the deserialization does not work, - * svcerr_decode should be called followed by a return. Successful - * decoding of the arguments should be followed the execution of the - * procedure's code and a call to svc_sendreply. - * - * Also, if the service refuses to execute the procedure due to too- - * weak authentication parameters, svcerr_weakauth should be called. - * Note: do not confuse access-control failure with weak authentication! - * - * NB: In pure implementations of rpc, the caller always waits for a reply - * msg. This message is sent when svc_sendreply is called. - * Therefore pure service implementations should always call - * svc_sendreply even if the function logically returns void; use - * xdr.h - xdr_void for the xdr routine. HOWEVER, tcp based rpc allows - * for the abuse of pure rpc via batched calling or pipelining. In the - * case of a batched call, svc_sendreply should NOT be called since - * this would send a return message, which is what batching tries to avoid. - * It is the service/protocol writer's responsibility to know which calls are - * batched and which are not. Warning: responding to batch calls may - * deadlock the caller and server processes! - */ - -extern bool_t svc_sendreply(); -extern void svcerr_decode(); -extern void svcerr_weakauth(); -extern void svcerr_noproc(); -extern void svcerr_progvers(); -extern void svcerr_auth(); -extern void svcerr_noprog(); -extern void svcerr_systemerr(); - -/* - * Lowest level dispatching -OR- who owns this process anyway. - * Somebody has to wait for incoming requests and then call the correct - * service routine. The routine svc_run does infinite waiting; i.e., - * svc_run never returns. - * Since another (co-existant) package may wish to selectively wait for - * incoming calls or other events outside of the rpc architecture, the - * routine svc_getreq is provided. It must be passed readfds, the - * "in-place" results of a select system call (see select, section 2). - */ - -/* - * Global keeper of rpc service descriptors in use - * dynamic; must be inspected before each call to select - */ -extern fd_set svc_fdset; -#define svc_fds svc_fdset.fds_bits[0] /* compatibility */ - -/* - * a small program implemented by the svc_rpc implementation itself; - * also see clnt.h for protocol numbers. - */ -extern void rpctest_service(); - -extern void svc_getreq(); -extern void svc_getreqset(); /* takes fdset instead of int */ -extern void svc_run(); /* never returns */ - -/* - * Socket to use on svcxxx_create call to get default socket - */ -#define RPC_ANYSOCK -1 - -/* - * These are the existing service side transport implementations - */ - -/* - * Memory based rpc for testing and timing. - */ -extern SVCXPRT *svcraw_create(); - -/* - * Udp based rpc. - */ -extern SVCXPRT *svcudp_create(); -extern SVCXPRT *svcudp_bufcreate(); - -/* - * Tcp based rpc. - */ -extern SVCXPRT *svctcp_create(); - -/* - * Like svtcp_create(), except the routine takes any *open* UNIX file - * descriptor as its first input. - */ -SVCXPRT *svcfd_create(); -#else - -/* - * Kernel udp based rpc. - */ -extern SVCXPRT *svckudp_create(); - - -#endif /* !_rpc_svc_h */ diff --git a/usr/src/lib/libbc/inc/include/rpc/svc_auth.h b/usr/src/lib/libbc/inc/include/rpc/svc_auth.h deleted file mode 100644 index af1d99cd33..0000000000 --- a/usr/src/lib/libbc/inc/include/rpc/svc_auth.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -/* - * Service side of rpc authentication. - */ - -#ifndef _rpc_svc_auth_h -#define _rpc_svc_auth_h - -extern enum auth_stat _authenticate(); - -#endif /*!_rpc_svc_auth_h*/ diff --git a/usr/src/lib/libbc/inc/include/rpc/types.h b/usr/src/lib/libbc/inc/include/rpc/types.h deleted file mode 100644 index 2eb5fc2e00..0000000000 --- a/usr/src/lib/libbc/inc/include/rpc/types.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1989 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Rpc additions to <sys/types.h> - */ - -#ifndef __rpc_types_h -#define __rpc_types_h - -#define bool_t int -#define enum_t int -#define __dontcare__ -1 - -#ifndef FALSE -# define FALSE (0) -#endif - -#ifndef TRUE -# define TRUE (1) -#endif - -#ifndef NULL -# define NULL 0 -#endif - -#ifndef KERNEL -#include <malloc.h> -#define mem_alloc(bsize) malloc(bsize) -#define mem_free(ptr, bsize) free(ptr) -#else -extern char *kmem_alloc(); -#define mem_alloc(bsize) kmem_alloc((u_int)bsize) -#define mem_free(ptr, bsize) kmem_free((caddr_t)(ptr), (u_int)(bsize)) -#endif - -#include <sys/types.h> -#include <sys/time.h> - -#endif /* !__rpc_types_h */ diff --git a/usr/src/lib/libbc/inc/include/rpc/xdr.h b/usr/src/lib/libbc/inc/include/rpc/xdr.h deleted file mode 100644 index b64bcb2c59..0000000000 --- a/usr/src/lib/libbc/inc/include/rpc/xdr.h +++ /dev/null @@ -1,265 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1984 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _rpc_xdr_h -#define _rpc_xdr_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * xdr.h, External Data Representation Serialization Routines. - */ - -#include <rpc/types.h> -/* - * XDR provides a conventional way for converting between C data - * types and an external bit-string representation. Library supplied - * routines provide for the conversion on built-in C data types. These - * routines and utility routines defined here are used to help implement - * a type encode/decode routine for each user-defined type. - * - * Each data type provides a single procedure which takes two arguments: - * - * bool_t - * xdrproc(xdrs, argresp) - * XDR *xdrs; - * <type> *argresp; - * - * xdrs is an instance of a XDR handle, to which or from which the data - * type is to be converted. argresp is a pointer to the structure to be - * converted. The XDR handle contains an operation field which indicates - * which of the operations (ENCODE, DECODE * or FREE) is to be performed. - * - * XDR_DECODE may allocate space if the pointer argresp is null. This - * data can be freed with the XDR_FREE operation. - * - * We write only one procedure per data type to make it easy - * to keep the encode and decode procedures for a data type consistent. - * In many cases the same code performs all operations on a user defined type, - * because all the hard work is done in the component type routines. - * decode as a series of calls on the nested data types. - */ - -/* - * Xdr operations. XDR_ENCODE causes the type to be encoded into the - * stream. XDR_DECODE causes the type to be extracted from the stream. - * XDR_FREE can be used to release the space allocated by an XDR_DECODE - * request. - */ -enum xdr_op { - XDR_ENCODE=0, - XDR_DECODE=1, - XDR_FREE=2 -}; - -/* - * This is the number of bytes per unit of external data. - */ -#define BYTES_PER_XDR_UNIT (4) -#define RNDUP(x) ((((x) + BYTES_PER_XDR_UNIT - 1) / BYTES_PER_XDR_UNIT) \ - * BYTES_PER_XDR_UNIT) - -/* - * A xdrproc_t exists for each data type which is to be encoded or decoded. - * - * The second argument to the xdrproc_t is a pointer to an opaque pointer. - * The opaque pointer generally points to a structure of the data type - * to be decoded. If this pointer is 0, then the type routines should - * allocate dynamic storage of the appropriate size and return it. - * bool_t (*xdrproc_t)(XDR *, caddr_t *); - */ -typedef bool_t (*xdrproc_t)(); - -/* - * The XDR handle. - * Contains operation which is being applied to the stream, - * an operations vector for the paticular implementation (e.g. see xdr_mem.c), - * and two private fields for the use of the particular impelementation. - */ -typedef struct { - enum xdr_op x_op; /* operation; fast additional param */ - struct xdr_ops { - bool_t (*x_getlong)(); /* get a long from underlying stream */ - bool_t (*x_putlong)(); /* put a long to " */ - bool_t (*x_getbytes)(); /* get some bytes from " */ - bool_t (*x_putbytes)(); /* put some bytes to " */ - u_int (*x_getpostn)(); /* returns bytes off from beginning */ - bool_t (*x_setpostn)(); /* lets you reposition the stream */ - long * (*x_inline)(); /* buf quick ptr to buffered data */ - void (*x_destroy)(); /* free privates of this xdr_stream */ - } *x_ops; - caddr_t x_public; /* users' data */ - caddr_t x_private; /* pointer to private data */ - caddr_t x_base; /* private used for position info */ - int x_handy; /* extra private word */ -} XDR; - -/* - * Operations defined on a XDR handle - * - * XDR *xdrs; - * long *longp; - * caddr_t addr; - * u_int len; - * u_int pos; - */ -#define XDR_GETLONG(xdrs, longp) \ - (*(xdrs)->x_ops->x_getlong)(xdrs, longp) -#define xdr_getlong(xdrs, longp) \ - (*(xdrs)->x_ops->x_getlong)(xdrs, longp) - -#define XDR_PUTLONG(xdrs, longp) \ - (*(xdrs)->x_ops->x_putlong)(xdrs, longp) -#define xdr_putlong(xdrs, longp) \ - (*(xdrs)->x_ops->x_putlong)(xdrs, longp) - -#define XDR_GETBYTES(xdrs, addr, len) \ - (*(xdrs)->x_ops->x_getbytes)(xdrs, addr, len) -#define xdr_getbytes(xdrs, addr, len) \ - (*(xdrs)->x_ops->x_getbytes)(xdrs, addr, len) - -#define XDR_PUTBYTES(xdrs, addr, len) \ - (*(xdrs)->x_ops->x_putbytes)(xdrs, addr, len) -#define xdr_putbytes(xdrs, addr, len) \ - (*(xdrs)->x_ops->x_putbytes)(xdrs, addr, len) - -#define XDR_GETPOS(xdrs) \ - (*(xdrs)->x_ops->x_getpostn)(xdrs) -#define xdr_getpos(xdrs) \ - (*(xdrs)->x_ops->x_getpostn)(xdrs) - -#define XDR_SETPOS(xdrs, pos) \ - (*(xdrs)->x_ops->x_setpostn)(xdrs, pos) -#define xdr_setpos(xdrs, pos) \ - (*(xdrs)->x_ops->x_setpostn)(xdrs, pos) - -#define XDR_INLINE(xdrs, len) \ - (*(xdrs)->x_ops->x_inline)(xdrs, len) -#define xdr_inline(xdrs, len) \ - (*(xdrs)->x_ops->x_inline)(xdrs, len) - -#define XDR_DESTROY(xdrs) \ - (*(xdrs)->x_ops->x_destroy)(xdrs) -#define xdr_destroy(xdrs) XDR_DESTROY(xdrs) - -/* - * Support struct for discriminated unions. - * You create an array of xdrdiscrim structures, terminated with - * a entry with a null procedure pointer. The xdr_union routine gets - * the discriminant value and then searches the array of structures - * for a matching value. If a match is found the associated xdr routine - * is called to handle that part of the union. If there is - * no match, then a default routine may be called. - * If there is no match and no default routine it is an error. - */ -#define NULL_xdrproc_t ((xdrproc_t)0) -struct xdr_discrim { - int value; - xdrproc_t proc; -}; - -/* - * In-line routines for fast encode/decode of primitve data types. - * Caveat emptor: these use single memory cycles to get the - * data from the underlying buffer, and will fail to operate - * properly if the data is not aligned. The standard way to use these - * is to say: - * if ((buf = XDR_INLINE(xdrs, count)) == NULL) - * return (FALSE); - * <<< macro calls >>> - * where ``count'' is the number of bytes of data occupied - * by the primitive data types. - * - * N.B. and frozen for all time: each data type here uses 4 bytes - * of external representation. - */ -#define IXDR_GET_LONG(buf) ((long)ntohl((u_long)*(buf)++)) -#define IXDR_PUT_LONG(buf, v) (*(buf)++ = (long)htonl((u_long)v)) - -#define IXDR_GET_BOOL(buf) ((bool_t)IXDR_GET_LONG(buf)) -#define IXDR_GET_ENUM(buf, t) ((t)IXDR_GET_LONG(buf)) -#define IXDR_GET_U_LONG(buf) ((u_long)IXDR_GET_LONG(buf)) -#define IXDR_GET_SHORT(buf) ((short)IXDR_GET_LONG(buf)) -#define IXDR_GET_U_SHORT(buf) ((u_short)IXDR_GET_LONG(buf)) - -#define IXDR_PUT_BOOL(buf, v) IXDR_PUT_LONG((buf), ((long)(v))) -#define IXDR_PUT_ENUM(buf, v) IXDR_PUT_LONG((buf), ((long)(v))) -#define IXDR_PUT_U_LONG(buf, v) IXDR_PUT_LONG((buf), ((long)(v))) -#define IXDR_PUT_SHORT(buf, v) IXDR_PUT_LONG((buf), ((long)(v))) -#define IXDR_PUT_U_SHORT(buf, v) IXDR_PUT_LONG((buf), ((long)(v))) - -/* - * These are the "generic" xdr routines. - */ -extern bool_t xdr_void(); -extern bool_t xdr_int(); -extern bool_t xdr_u_int(); -extern bool_t xdr_long(); -extern bool_t xdr_u_long(); -extern bool_t xdr_short(); -extern bool_t xdr_u_short(); -extern bool_t xdr_bool(); -extern bool_t xdr_enum(); -extern bool_t xdr_array(); -extern bool_t xdr_bytes(); -extern bool_t xdr_opaque(); -extern bool_t xdr_string(); -extern bool_t xdr_union(); -extern void xdr_free(); -extern bool_t xdr_char(); -extern bool_t xdr_u_char(); -extern bool_t xdr_vector(); -extern bool_t xdr_float(); -extern bool_t xdr_double(); -extern bool_t xdr_reference(); -extern bool_t xdr_pointer(); -extern bool_t xdr_wrapstring(); - -/* - * Common opaque bytes objects used by many rpc protocols; - * declared here due to commonality. - */ -#define MAX_NETOBJ_SZ 1024 -struct netobj { - u_int n_len; - char *n_bytes; -}; -typedef struct netobj netobj; -extern bool_t xdr_netobj(); - -/* - * These are the public routines for the various implementations of - * xdr streams. - */ -extern void xdrmem_create(); /* XDR using memory buffers */ -extern void xdrstdio_create(); /* XDR using stdio library */ -extern void xdrrec_create(); /* XDR pseudo records for tcp */ -extern bool_t xdrrec_endofrecord(); /* make end of xdr record */ -extern int xdrrec_readbytes(); /* like a read on a pipe */ -extern bool_t xdrrec_skiprecord(); /* move to beginning of next record */ -extern bool_t xdrrec_eof(); /* true if no more input */ - -#endif /* !_rpc_xdr_h */ diff --git a/usr/src/lib/libbc/inc/include/rpcsvc/pwdnm.h b/usr/src/lib/libbc/inc/include/rpcsvc/pwdnm.h deleted file mode 100644 index 69b38ede81..0000000000 --- a/usr/src/lib/libbc/inc/include/rpcsvc/pwdnm.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1987 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifndef _rpcsvc_pwdnm_h -#define _rpcsvc_pwdnm_h - -struct pwdnm { - char *name; - char *password; -}; -typedef struct pwdnm pwdnm; - - -#define PWDAUTH_PROG 100036 -#define PWDAUTH_VERS 1 -#define PWDAUTHSRV 1 -#define GRPAUTHSRV 2 - -bool_t xdr_pwdnm(); - -#endif /*!_rpcsvc_pwdnm_h*/ diff --git a/usr/src/lib/libbc/inc/include/rpcsvc/ypclnt.h b/usr/src/lib/libbc/inc/include/rpcsvc/ypclnt.h deleted file mode 100644 index c4970194fa..0000000000 --- a/usr/src/lib/libbc/inc/include/rpcsvc/ypclnt.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1990 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * ypclnt.h - * This defines the symbols used in the c language - * interface to the NIS client functions. A description of this interface - * can be read in ypclnt(3N). - */ - -/* - * Failure reason codes. The success condition is indicated by a functional - * value of "0". - */ -#define YPERR_BADARGS 1 /* Args to function are bad */ -#define YPERR_RPC 2 /* RPC failure */ -#define YPERR_DOMAIN 3 /* Can't bind to a server which serves - * this domain. */ -#define YPERR_MAP 4 /* No such map in server's domain */ -#define YPERR_KEY 5 /* No such key in map */ -#define YPERR_YPERR 6 /* Internal NIS server or client - * interface error */ -#define YPERR_RESRC 7 /* Local resource allocation failure */ -#define YPERR_NOMORE 8 /* No more records in map database */ -#define YPERR_PMAP 9 /* Can't communicate with portmapper */ -#define YPERR_YPBIND 10 /* Can't communicate with ypbind */ -#define YPERR_YPSERV 11 /* Can't communicate with ypserv */ -#define YPERR_NODOM 12 /* Local domain name not set */ -#define YPERR_BADDB 13 /* NIS data base is bad */ -#define YPERR_VERS 14 /* NIS version mismatch */ -#define YPERR_ACCESS 15 /* Access violation */ -#define YPERR_BUSY 16 /* Database is busy */ - -/* - * Types of update operations - */ -#define YPOP_CHANGE 1 /* change, do not add */ -#define YPOP_INSERT 2 /* add, do not change */ -#define YPOP_DELETE 3 /* delete this entry */ -#define YPOP_STORE 4 /* add, or change */ - - - -/* - * Data definitions - */ - -/* - * struct ypall_callback * is the arg which must be passed to yp_all - */ - -struct ypall_callback { - int (*foreach)(); /* Return non-0 to stop getting - * called */ - char *data; /* Opaque pointer for use of callback - * function */ -}; - -/* - * External NIS client function references. - */ -extern int yp_bind(); -extern int _yp_dobind(); -extern void yp_unbind(); -extern int yp_get_default_domain (); -extern int yp_match (); -extern int yp_first (); -extern int yp_next(); -extern int yp_master(); -extern int yp_order(); -extern int yp_all(); -extern int yp_match(); -extern char *yperr_string(); -extern int ypprot_err(); - -/* - * Global NIS data structures - */ diff --git a/usr/src/lib/libbc/inc/include/scsi/impl/uscsi.h b/usr/src/lib/libbc/inc/include/scsi/impl/uscsi.h deleted file mode 100644 index 17e0af91ae..0000000000 --- a/usr/src/lib/libbc/inc/include/scsi/impl/uscsi.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _SCSI_IMPL_USCSI_H -#define _SCSI_IMPL_USCSI_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Defines for user SCSI commands - */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * definition for user-scsi command structure - */ -struct uscsi_cmd { - caddr_t uscsi_cdb; - int uscsi_cdblen; - caddr_t uscsi_bufaddr; - int uscsi_buflen; - unsigned char uscsi_status; - int uscsi_flags; -}; - -/* - * flags for uscsi_flags field - */ -#define USCSI_SILENT 0x01 /* no error messages */ -#define USCSI_DIAGNOSE 0x02 /* fail if any error occurs */ -#define USCSI_ISOLATE 0x04 /* isolate from normal commands */ -#define USCSI_READ 0x08 /* get data from device */ -#define USCSI_WRITE 0xFFF7 /* use to zero the READ bit in uscsi_flags */ - -/* - * User SCSI io control command - */ -#define USCSICMD _IOWR('u', 1, struct uscsi_cmd) /* user scsi command */ - -/* - * user scsi status bit masks - */ - -#define USCSI_STATUS_GOOD 0x00 -#define USCSI_STATUS_CHECK 0x02 -#define USCSI_STATUS_MET 0x04 -#define USCSI_STATUS_BUSY 0x08 -#define USCSI_STATUS_INTERMEDIATE 0x10 -#define USCSI_STATUS_RESERVATION_CONFLICT \ - (USCSI_STATUS_INTERMEDIATE | USCSI_STATUS_BUSY) - -#ifdef __cplusplus -} -#endif - -#endif /* _SCSI_IMPL_USCSI_H */ diff --git a/usr/src/lib/libbc/inc/include/search.h b/usr/src/lib/libbc/inc/include/search.h deleted file mode 100644 index bd06d6df00..0000000000 --- a/usr/src/lib/libbc/inc/include/search.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifndef _search_h -#define _search_h - -/* HSEARCH(3C) */ -typedef struct entry { char *key, *data; } ENTRY; -typedef enum { FIND, ENTER } ACTION; - -/* TSEARCH(3C) */ -typedef enum { preorder, postorder, endorder, leaf } VISIT; - -#endif /*!_search_h*/ diff --git a/usr/src/lib/libbc/inc/include/sgtty.h b/usr/src/lib/libbc/inc/include/sgtty.h deleted file mode 100644 index a753fb7c23..0000000000 --- a/usr/src/lib/libbc/inc/include/sgtty.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifndef _sgtty_h -#define _sgtty_h - -#include <sys/ioctl.h> - -#endif /*!_sgtty_h*/ diff --git a/usr/src/lib/libbc/inc/include/signal.h b/usr/src/lib/libbc/inc/include/signal.h deleted file mode 100644 index c2bf4cc78f..0000000000 --- a/usr/src/lib/libbc/inc/include/signal.h +++ /dev/null @@ -1,91 +0,0 @@ -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Copyright (c) 1982 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - * - * Copyright (c) 1987 by Sun Microsystems, Inc. - */ - -#ifndef __signal_h -#define __signal_h - -#ifndef _POSIX_SOURCE -#include <sys/signal.h> -#else -/* - * All of the below is drawn from sys/signal.h. Adding anything here means you - * add it in sys/signal.h as well. - */ -#define SIGHUP 1 /* hangup */ -#define SIGINT 2 /* interrupt */ -#define SIGQUIT 3 /* quit */ -#define SIGILL 4 /* illegal instruction (not reset when caught) */ -#define SIGTRAP 5 /* trace trap (not reset when caught) */ -#define SIGIOT 6 /* IOT instruction */ -#define SIGABRT 6 /* used by abort, replace SIGIOT in the future */ -#define SIGEMT 7 /* EMT instruction */ -#define SIGFPE 8 /* floating point exception */ -#define SIGKILL 9 /* kill (cannot be caught or ignored) */ -#define SIGBUS 10 /* bus error */ -#define SIGSEGV 11 /* segmentation violation */ -#define SIGSYS 12 /* bad argument to system call */ -#define SIGPIPE 13 /* write on a pipe with no one to read it */ -#define SIGALRM 14 /* alarm clock */ -#define SIGTERM 15 /* software termination signal from kill */ -#define SIGURG 16 /* urgent condition on IO channel */ -#define SIGSTOP 17 /* sendable stop signal not from tty */ -#define SIGTSTP 18 /* stop signal from tty */ -#define SIGCONT 19 /* continue a stopped process */ -#define SIGCHLD 20 /* to parent on child stop or exit */ -#define SIGCLD 20 /* System V name for SIGCHLD */ -#define SIGTTIN 21 /* to readers pgrp upon background tty read */ -#define SIGTTOU 22 /* like TTIN for output if (tp->t_local<OSTOP) */ -#define SIGIO 23 /* input/output possible signal */ -#define SIGPOLL SIGIO /* System V name for SIGIO */ -#define SIGXCPU 24 /* exceeded CPU time limit */ -#define SIGXFSZ 25 /* exceeded file size limit */ -#define SIGVTALRM 26 /* virtual time alarm */ -#define SIGPROF 27 /* profiling time alarm */ -#define SIGWINCH 28 /* window changed */ -#define SIGLOST 29 /* resource lost (eg, record-lock lost) */ -#define SIGUSR1 30 /* user defined signal 1 */ -#define SIGUSR2 31 /* user defined signal 2 */ - -/* signal() args & returns */ -#define SIG_ERR (void (*)())-1 -#define SIG_DFL (void (*)())0 -#define SIG_IGN (void (*)())1 -#define SIG_HOLD (void (*)())3 - -/* sigprocmask flags */ -#define SIG_BLOCK 0x0001 -#define SIG_UNBLOCK 0x0002 -#define SIG_SETMASK 0x0004 - -/* sa_flags flag; also supports all the sigvec flags in sys/signal.h */ -#define SA_NOCLDSTOP 0x0008 /* don't send a SIGCHLD on child stop */ - -#include <sys/stdtypes.h> /* for sigset_t */ - -struct sigaction { - void (*sa_handler)(); - sigset_t sa_mask; - int sa_flags; -}; -void (*signal())(); -int kill(/* pid_t p, int sig */); -int sigaction(/* int signo, - struct sigaction *act, struct sigaction *oldact */); -int sigaddset(/* sigset_t *mask, int signo */); -int sigdelset(/* sigset_t *mask, int signo */); -int sigemptyset(/* sigset_t *mask */); -int sigfillset(/* sigset_t *mask */); -int sigismember(/* sigset_t *mask, int signo */); -int sigpending(/* sigset_t *set */); -int sigprocmask(/* int how, sigset_t *set, *oldset */); -int sigsuspend(/* sigset_t *mask */); - -#endif /* _POSIX_SOURCE */ -#endif /* !__signal_h */ diff --git a/usr/src/lib/libbc/inc/include/stdio.h b/usr/src/lib/libbc/inc/include/stdio.h deleted file mode 100644 index f334762635..0000000000 --- a/usr/src/lib/libbc/inc/include/stdio.h +++ /dev/null @@ -1,101 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1998 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef __include_stdio_h -#define __include_stdio_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -#define BUFSIZ 1024 -#define _SBFSIZ 8 -extern struct _iobuf { - int _cnt; - unsigned char *_ptr; - unsigned char *_base; - int _bufsiz; - short _flag; - char _file; /* should be short */ -} _iob[]; - -#define _IOFBF 0 -#define _IOREAD 01 -#define _IOWRT 02 -#define _IONBF 04 -#define _IOMYBUF 010 -#define _IOEOF 020 -#define _IOERR 040 -#define _IOSTRG 0100 -#define _IOLBF 0200 -#define _IORW 0400 -#define NULL 0 -#define FILE struct _iobuf -#define EOF (-1) - -#define stdin (&_iob[0]) -#define stdout (&_iob[1]) -#define stderr (&_iob[2]) - -#if defined(__lint) /* so that lint likes (void)putc(a,b) */ -extern int putc(int, FILE *); -extern int getc(FILE *); -#else -#define getc(p) (--(p)->_cnt>=0? ((int)*(p)->_ptr++):_filbuf(p)) -#define putc(x, p) (--(p)->_cnt >= 0 ?\ - (int)(*(p)->_ptr++ = (unsigned char)(x)) :\ - (((p)->_flag & _IOLBF) && -(p)->_cnt < (p)->_bufsiz ?\ - ((*(p)->_ptr = (unsigned char)(x)) != '\n' ?\ - (int)(*(p)->_ptr++) :\ - _flsbuf(*(unsigned char *)(p)->_ptr, p)) :\ - _flsbuf((unsigned char)(x), p))) -#endif - -#define getchar() getc(stdin) -#define putchar(x) putc((x),stdout) -#define feof(p) (((p)->_flag&_IOEOF)!=0) -#define ferror(p) (((p)->_flag&_IOERR)!=0) -#define clearerr(p) (void) ((p)->_flag &= ~(_IOERR|_IOEOF)) - -extern FILE *fopen(char *, char *); -extern FILE *fdopen(int, char *); -extern FILE *freopen(char *, char *, FILE *); -extern FILE *popen(char *, char *); -extern FILE *tmpfile(void); -extern long ftell(FILE *); -extern char *fgets(char *, int, FILE *); -extern char *gets(char *); -extern char *sprintf(char *, char *, ...); -extern char *ctermid(char *); -extern char *cuserid(char *); -extern char *tempnam(char *, char *); -extern char *tmpnam(char *); -extern int fileno(FILE *); - -#define L_ctermid 9 -#define L_cuserid 9 -#define P_tmpdir "/usr/tmp/" -#define L_tmpnam 25 /* (sizeof(P_tmpdir) + 15) */ - -#endif /* !__include_stdio_h */ diff --git a/usr/src/lib/libbc/inc/include/stdlib.h b/usr/src/lib/libbc/inc/include/stdlib.h deleted file mode 100644 index c97f9981a0..0000000000 --- a/usr/src/lib/libbc/inc/include/stdlib.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1989 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * stdlib.h - */ - -#ifndef __stdlib_h -#define __stdlib_h - -#include <sys/stdtypes.h> /* to get size_t */ - -extern unsigned int _mb_cur_max; -#define MB_CUR_MAX _mb_cur_max - -#define mblen(s, n) mbtowc((wchar_t *)0, s, n) - -/* declaration of various libc functions */ -extern int abort(/* void */); -extern int abs(/* int j */); -extern double atof(/* const char *nptr */); -extern int atoi(/* const char *nptr */); -extern long int atol(/* const char *nptr */); -extern char * bsearch(/* const void *key, const void *base, size_t nmemb, - size_t size, int (*compar)(const void *, const void *) */); -extern char * calloc(/* size_t nmemb, size_t size */); -extern int exit(/* int status */); -extern int free(/* void *ptr */); -extern char * getenv(/* const char *name */); -extern char * malloc(/* size_t size */); -extern int qsort(/* void *base, size_t nmemb, size_t size, - int (*compar)(const void *, const void *) */); -extern int rand(/* void */); -extern char * realloc(/* void *ptr, size_t size */); -extern int srand(/* unsigned int seed */); - -extern int mbtowc(/* wchar_t *pwc, const char *s, size_t n */); -extern int wctomb(/* char *s, wchar_t wchar */); -extern size_t mbstowcs(/* wchar_t *pwcs, const char *s, size_t n */); -extern size_t wcstombs(/* char *s, const wchar_t *pwcs, size_t n */); - -#endif diff --git a/usr/src/lib/libbc/inc/include/string.h b/usr/src/lib/libbc/inc/include/string.h deleted file mode 100644 index dd064fec74..0000000000 --- a/usr/src/lib/libbc/inc/include/string.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1989 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifndef __string_h -#define __string_h - -#include <sys/stdtypes.h> /* for size_t */ - -#ifndef NULL -#define NULL 0 -#endif - -extern char * strcat(/* char *s1, const char *s2 */); -extern char * strchr(/* const char *s, int c */); -extern int strcmp(/* const char *s1, const char *s2 */); -extern char * strcpy(/* char *s1, const char *s2 */); -extern size_t strcspn(/* const char *s1, const char *s2 */); -#ifndef _POSIX_SOURCE -extern char * strdup(/* char *s1 */); -#endif -extern size_t strlen(/* const char *s */); -extern char * strncat(/* char *s1, const char *s2, size_t n */); -extern int strncmp(/* const char *s1, const char *s2, size_t n */); -extern char * strncpy(/* char *s1, const char *s2, size_t n */); -extern char * strpbrk(/* const char *s1, const char *s2 */); -extern char * strrchr(/* const char *s, int c */); -extern size_t strspn(/* const char *s1, const char *s2 */); -extern char * strstr(/* const char *s1, const char *s2 */); -extern char * strtok(/* char *s1, const char *s2 */); - -#endif /* !__string_h */ diff --git a/usr/src/lib/libbc/inc/include/strings.h b/usr/src/lib/libbc/inc/include/strings.h deleted file mode 100644 index 665c2b534a..0000000000 --- a/usr/src/lib/libbc/inc/include/strings.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1989 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * External function definitions - * for routines described in string(3). - */ - -#ifndef _strings_h -#define _strings_h - -char *strcat(); -char *strncat(); -int strcmp(); -int strncmp(); -int strcasecmp(); -char *strcpy(); -char *strncpy(); -int strlen(); -char *index(); -char *rindex(); - -#endif /*!_strings_h*/ diff --git a/usr/src/lib/libbc/inc/include/sun/dkio.h b/usr/src/lib/libbc/inc/include/sun/dkio.h deleted file mode 100644 index 3fe34e0f74..0000000000 --- a/usr/src/lib/libbc/inc/include/sun/dkio.h +++ /dev/null @@ -1,361 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _sun_dkio_h -#define _sun_dkio_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* #include <sys/ioctl.h> not needed? */ -#include <sun/dklabel.h> - -/* - * Structures and definitions for disk io control commands - */ - -/* - * Structures used as data by ioctl calls. - */ - -/* - * Used for controller info - */ -struct dk_info { - int dki_ctlr; /* controller address */ - short dki_unit; /* unit (slave) address */ - short dki_ctype; /* controller type */ - short dki_flags; /* flags */ -}; - -#define DK_DEVLEN 16 /* device name max length, including */ - /* unit # & NULL (ie - "xyc1") */ -/* - * Used for configuration info - */ -struct dk_conf { - char dkc_cname[DK_DEVLEN]; /* controller name (no unit #) */ - u_short dkc_ctype; /* controller type */ - u_short dkc_flags; /* flags */ - short dkc_cnum; /* controller number */ - int dkc_addr; /* controller address */ - u_int dkc_space; /* controller bus type */ - int dkc_prio; /* interrupt priority */ - int dkc_vec; /* interrupt vector */ - char dkc_dname[DK_DEVLEN]; /* drive name (no unit #) */ - short dkc_unit; /* unit number */ - short dkc_slave; /* slave number */ -}; - -/* - * Controller types - */ -#define DKC_UNKNOWN 0 -/* 1 used to be Interphase 2180 */ -#define DKC_WDC2880 2 -/* 3 used to be Interphase 2181 */ -/* 4 used to be Xylogics 440 */ -#define DKC_DSD5215 5 -#define DKC_XY450 6 -#define DKC_ACB4000 7 -#define DKC_MD21 8 -/* 9 used to be Xylogics 751 */ -#define DKC_NCRFLOPPY 10 -/* #define DKC_XB1401 10 does not match dkinfo.c*/ -#define DKC_XD7053 11 -#define DKC_SMSFLOPPY 12 -#define DKC_SCSI_CCS 13 -#define DKC_INTEL82072 14 /* floppy ctlr on campus and hydra */ -#define DKC_PANTHER 15 -#define DKC_SUN_IPI1 DKC_PANTHER /* Sun Panther VME/IPI controller */ -#define DKC_MD 16 /* meta-disk (virtual-disk) driver */ -#define DKC_CDC_9057 17 /* CDC 9057-321 (CM-3) IPI String Controller */ -#define DKC_FJ_M1060 18 /* Fujitsu/Intellistor M1060 IPI-3 SC */ - -/* - * Flags - */ -#define DKI_BAD144 0x01 /* use DEC std 144 bad sector fwding */ -#define DKI_MAPTRK 0x02 /* controller does track mapping */ -#define DKI_FMTTRK 0x04 /* formats only full track at a time */ -#define DKI_FMTVOL 0x08 /* formats only full volume at a time */ -#define DKI_FMTCYL 0x10 /* formats only full cylinders at a time */ -#define DKI_HEXUNIT 0x20 /* unit number is printed as 3 hex digits */ - -/* - * Used for drive info - */ -struct dk_type { - u_short dkt_hsect; /* hard sector count (read only) */ - u_short dkt_promrev; /* prom revision (read only) */ - u_char dkt_drtype; /* drive type (ctlr specific) */ - u_char dkt_drstat; /* drive status (ctlr specific, ro) */ -}; - -/* - * Used for all partitions - */ -struct dk_allmap { - struct dk_map dka_map[NDKMAP]; -}; - -/* - * Used for bad sector map - */ -struct dk_badmap { - caddr_t dkb_bufaddr; /* address of user's map buffer */ -}; - -/* - * Definition of a disk's geometry - */ -struct dk_geom { - unsigned short dkg_ncyl; /* # of data cylinders */ - unsigned short dkg_acyl; /* # of alternate cylinders */ - unsigned short dkg_bcyl; /* cyl offset (for fixed head area) */ - unsigned short dkg_nhead; /* # of heads */ - unsigned short dkg_obs1; /* obsolete */ - unsigned short dkg_nsect; /* # of data sectors per track */ - unsigned short dkg_intrlv; /* interleave factor */ - unsigned short dkg_obs2; /* obsolete */ - unsigned short dkg_obs3; /* obsolete */ - unsigned short dkg_apc; /* alternates per cyl (SCSI only) */ - unsigned short dkg_rpm; /* revolutions per minute */ - unsigned short dkg_pcyl; /* # of physical cylinders */ - unsigned short dkg_extra[7]; /* for compatible expansion */ -}; -/* - * These defines are for historic compatibility with old drivers. - */ -#define dkg_bhead dkg_obs1 /* used to be head offset */ -#define dkg_gap1 dkg_obs2 /* used to be gap1 */ -#define dkg_gap2 dkg_obs3 /* used to be gap2 */ - -/* - * Used for generic commands - */ -struct dk_cmd { - u_short dkc_cmd; /* command to be executed */ - int dkc_flags; /* execution flags */ - daddr_t dkc_blkno; /* disk address for command */ - int dkc_secnt; /* sector count for command */ - caddr_t dkc_bufaddr; /* user's buffer address */ - u_int dkc_buflen; /* size of user's buffer */ -}; - -/* - * Execution flags. - */ -#define DK_SILENT 0x01 /* no error messages */ -#define DK_DIAGNOSE 0x02 /* fail if any error occurs */ -#define DK_ISOLATE 0x04 /* isolate from normal commands */ -#define DK_READ 0x08 /* read from device */ -#define DK_WRITE 0x10 /* write to device */ - -/* - * Used for disk diagnostics - */ -struct dk_diag { - u_short dkd_errcmd; /* most recent command in error */ - daddr_t dkd_errsect; /* most recent sector in error */ - u_char dkd_errno; /* most recent error number */ - u_char dkd_severe; /* severity of most recent error */ -}; - -/* - * Used for getting disk error log. - */ -struct dk_loghdr { - long dkl_entries; /* number of dk_log entries */ - long dkl_max_size; /* max. size of dk_log table */ - caddr_t dkl_logbfr; /* pointer to dk_log table */ -}; - -/* - * Disk error log table entry. - */ -struct dk_log { - daddr_t block; /* location of block in error */ - u_long count; /* number of failures */ - short type; /* type of error (e.g. soft error) */ - short err1; /* primary error code (e.g sense key) */ - short err2; /* secondary error code */ -}; - -/* - * Dk_log type flags. - * - * FIXME: Really should specify dkd_errno error codes. - * For some reason they're specified in the drivers - * instead of here?? Should also use those here for - * dk_log.type too. - */ -#define DKL_SOFT 0x01 /* recoverable erro */ -#define DKL_HARD 0x02 /* unrecoverable error */ - -/* - * Used for floppies - */ -struct fdk_char{ - u_char medium; /* medium type. Unused, why have it? history! */ - int transfer_rate; /* transfer rate */ - int ncyl; /* number of cylinders */ - int nhead; /* number of heads */ - int sec_size; /* sector size */ - int secptrack; /* sectors per track */ - int steps; /* number of steps per */ -}; - -struct fdk_state { - int fkc_bsec; /* bytes per sector */ - int fkc_strack; /* sectors per track */ - int fkc_step; /* step rate */ - int fkc_rate; /* data rate */ - int fkc_error; /* error returned by controller */ -}; - -struct fdk_cmd { /* used by generic command */ - struct dk_cmd dcmd; /* disk command info */ - struct fdk_state fstate; /* floppy state info */ -}; - -/* - * Floppy commands - */ -#define FKWRITE 1 -#define FKREAD 2 -#define FKSEEK 3 -#define FKREZERO 4 -#define FKFORMAT_UNIT 5 -#define FKFORMAT_TRACK 6 - -/* - * Used by FDKGETCHANGE, return state of the sense disk change bit. - */ -#define FDKGC_HISTORY 0x01 /* disk has changed since last call */ -#define FDKGC_CURRENT 0x02 /* current state of disk change */ - -/* - * Used by FDK{G, S}ETDRIVECHAR - */ -struct fdk_drive { - int fdd_ejectable; /* does the drive support eject? */ - int fdd_maxsearch; /* size of per-unit search table */ - - int fdd_writeprecomp; /* cyl to start write prcompensation */ - int fdd_writereduce; /* cyl to start recucing write current */ - int fdd_stepwidth; /* width of step pulse in 1 us units */ - int fdd_steprate; /* step rate in 100 us units */ - int fdd_headsettle; /* delay, in 100 us units */ - int fdd_headload; /* delay, in 100 us units */ - int fdd_headunload; /* delay, in 100 us units */ - int fdd_motoron; /* delay, in 100 ms units */ - int fdd_motoroff; /* delay, in 100 ms units */ - int fdd_precomplevel; /* bit shift, in nano-secs */ - int fdd_pins; /* defines meaning of pin 1, 2, 4, and 34 */ - int fdd_flags; /* TRUE READY, Starting Sector #, & Motor On */ -}; - -/* - * Used by FDK{G, S}ETSEARCH - */ -struct fdk_search { - int fdk_numentries; /* number of elements in the table */ - struct fdk_char *fdk_search; -}; - -/* - * Used by F_RAW - */ -struct fdraw { - char fr_cmd[10]; /* user-supplied command bytes */ - short fr_cnum; /* number of command bytes */ - char fr_result[10]; /* controller-supplied result bytes */ - short fr_nbytes; /* number to transfer if read/write command */ - char *fr_addr; /* where to transfer if read/write command */ -}; - -/* - * Floppy raw commands - */ -#define FRAW_SPECIFY 0x03 -#define FRAW_READID 0x0a -#define FRAW_SENSE_DRV 0x04 -#define FRAW_REZERO 0x07 -#define FRAW_SEEK 0x0f -#define FRAW_SENSE_INT 0x08 -#define FRAW_FORMAT 0x0d -#define FRAW_READTRACK 0x02 -#define FRAW_WRCMD 0x05 -#define FRAW_RDCMD 0x06 -#define FRAW_WRITEDEL 0x09 -#define FRAW_READDEL 0x0c - -/* - * Severity values - */ -#define DK_NOERROR 0 -#define DK_CORRECTED 1 -#define DK_RECOVERED 2 -#define DK_FATAL 3 - -/* - * Error types - */ -#define DK_NONMEDIA 0 /* not caused by a media defect */ -#define DK_ISMEDIA 1 /* caused by a media defect */ - - -/* - * Disk io control commands - */ -#define DKIOCGGEOM _IOR('d', 2, struct dk_geom) /* Get geometry */ -#define DKIOCSGEOM _IOW('d', 3, struct dk_geom) /* Set geometry */ -#define DKIOCGPART _IOR('d', 4, struct dk_map) /* Get partition info */ -#define DKIOCSPART _IOW('d', 5, struct dk_map) /* Set partition info */ -#define DKIOCINFO _IOR('d', 8, struct dk_info) /* Get info */ -#define DKIOCGCONF _IOR('d', 126, struct dk_conf) /* Get conf info */ -#define DKIOCSTYPE _IOW('d', 125, struct dk_type) /* Set drive info */ -#define DKIOCGTYPE _IOR('d', 124, struct dk_type) /* Get drive info */ -#define DKIOCSAPART _IOW('d', 123, struct dk_allmap) /* Set all partitions */ -#define DKIOCGAPART _IOR('d', 122, struct dk_allmap) /* Get all partitions */ -#define DKIOCSBAD _IOW('d', 121, struct dk_badmap) /* Set bad sector map */ -#define DKIOCGBAD _IOW('d', 120, struct dk_badmap) /* Get bad sector map */ -#define DKIOCSCMD _IOW('d', 119, struct dk_cmd) /* Set generic cmd */ -#define DKIOCGLOG _IOR('d', 118, struct dk_loghdr) /* Get error log */ -#define DKIOCGDIAG _IOR('d', 116, struct dk_diag) /* Get diagnostics */ -#define DKIOCWCHK _IOWR('d', 115, int) /* Toggle write check */ -#define FDKIOGCHAR _IOR('d', 114, struct fdk_char) /* GetCharacteristics */ -#define FDKIOSCHAR _IOW('d', 113, struct fdk_char) /* SetCharacteristics */ -#define FDKEJECT _IO('d', 112) /* Eject floppy disk */ -#define FDKGETCHANGE _IOR('d', 111, int) /* Get diskchng stat */ -#define FDKGETDRIVECHAR _IOR('d', 110, struct fdk_drive) /* Get drivechar */ -#define FDKSETDRIVECHAR _IOW('d', 109, struct fdk_drive) /* Set drivechar */ -#define FDKGETSEARCH _IOR('d', 108, struct fdk_search) /* Get search tbl */ -#define FDKSETSEARCH _IOW('d', 107, struct fdk_search) /* Set search tbl */ -#define FDKIOCSCMD _IOWR('d', 106, struct fdk_cmd) /* Floppy command */ -#define F_RAW _IOWR('d', 105, struct fdraw) /* ECDstyle genericcmd*/ - -#endif /* !_sun_dkio_h */ diff --git a/usr/src/lib/libbc/inc/include/sun/dklabel.h b/usr/src/lib/libbc/inc/include/sun/dklabel.h deleted file mode 100644 index 7f31835c06..0000000000 --- a/usr/src/lib/libbc/inc/include/sun/dklabel.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Copyright (c) 1987 by Sun Microsystems, Inc. - */ - -#ifndef _sun_dklabel_h -#define _sun_dklabel_h - -/* - * Miscellaneous defines - */ -#define DKL_MAGIC 0xDABE /* magic number */ -#define FKL_MAGIC 0xff /* magic number for DOS floppies */ -#define NDKMAP 8 /* # of logical partitions */ - -/* - * Format of a Sun SMD disk label. - * Resides in cylinder 0, head 0, sector 0. - * - * sizeof (struct dk_label) should be 512 (sector size) - */ -struct dk_label { - char dkl_asciilabel[128]; /* for compatibility */ - char dkl_pad[512-(128+NDKMAP*8+14*2)]; - unsigned short dkl_rpm; /* rotations per minute */ - unsigned short dkl_pcyl; /* # physical cylinders */ - unsigned short dkl_apc; /* alternates per cylinder */ - unsigned short dkl_obs1; /* obsolete */ - unsigned short dkl_obs2; /* obsolete */ - unsigned short dkl_intrlv; /* interleave factor */ - unsigned short dkl_ncyl; /* # of data cylinders */ - unsigned short dkl_acyl; /* # of alternate cylinders */ - unsigned short dkl_nhead; /* # of heads in this partition */ - unsigned short dkl_nsect; /* # of 512 byte sectors per track */ - unsigned short dkl_obs3; /* obsolete */ - unsigned short dkl_obs4; /* obsolete */ - /* */ - struct dk_map { /* logical partitions */ - daddr_t dkl_cylno; /* starting cylinder */ - daddr_t dkl_nblk; /* number of blocks */ - } dkl_map[NDKMAP]; - unsigned short dkl_magic; /* identifies this label format */ - unsigned short dkl_cksum; /* xor checksum of sector */ -}; - -/* - * These defines are for historic compatibility with old drivers. - */ -#define dkl_gap1 dkl_obs1 /* used to be gap1 */ -#define dkl_gap2 dkl_obs2 /* used to be gap2 */ -#define dkl_bhead dkl_obs3 /* used to be label head offset */ -#define dkl_ppart dkl_obs4 /* used to by physical partition */ - -struct fk_label { /* DOS floppy label */ - u_char fkl_type; - u_char fkl_magich; - u_char fkl_magicl; - u_char filler; -}; - -#endif /*!_sun_dklabel_h*/ diff --git a/usr/src/lib/libbc/inc/include/sun4/a.out.h b/usr/src/lib/libbc/inc/include/sun4/a.out.h deleted file mode 100644 index f44a30d256..0000000000 --- a/usr/src/lib/libbc/inc/include/sun4/a.out.h +++ /dev/null @@ -1,207 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1989 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifndef _sparc_a_out_h -#define _sparc_a_out_h - -#include <sys/exec.h> - -/* - * memory management parameters - */ - -#define PAGSIZ 0x02000 -#define SEGSIZ PAGSIZ -#define OLD_PAGSIZ 0x00800 /* Page size under Release 2.0 */ -#define OLD_SEGSIZ 0x08000 /* Segment size under Release 2.0 */ - -/* - * returns 1 if an object file type is invalid, i.e., if the other macros - * defined below will not yield the correct offsets. Note that a file may - * have N_BADMAG(x) = 0 and may be fully linked, but still may not be - * executable. - */ - -#define N_BADMAG(x) \ - ((x).a_magic!=OMAGIC && (x).a_magic!=NMAGIC && (x).a_magic!=ZMAGIC) - -/* - * relocation parameters. These are architecture-dependent - * and can be deduced from the machine type. They are used - * to calculate offsets of segments within the object file; - * See N_TXTOFF(x), etc. below. - */ - -#define N_PAGSIZ(x) \ - ((x).a_machtype == M_OLDSUN2? OLD_PAGSIZ : PAGSIZ) -#define N_SEGSIZ(x) \ - ((x).a_machtype == M_OLDSUN2? OLD_SEGSIZ : SEGSIZ) - -/* - * offsets of various sections of an object file. - */ - -#define N_TXTOFF(x) \ - /* text segment */ \ - ( (x).a_machtype == M_OLDSUN2 \ - ? ((x).a_magic==ZMAGIC ? N_PAGSIZ(x) : sizeof (struct exec)) \ - : ((x).a_magic==ZMAGIC ? 0 : sizeof (struct exec)) ) - -#define N_DATOFF(x) /* data segment */ \ - (N_TXTOFF(x) + (x).a_text) - -#define N_TRELOFF(x) /* text reloc'n */ \ - (N_DATOFF(x) + (x).a_data) - -#define N_DRELOFF(x) /* data relocation*/ \ - (N_TRELOFF(x) + (x).a_trsize) - -#define N_SYMOFF(x) \ - /* symbol table */ \ - (N_TXTOFF(x)+(x).a_text+(x).a_data+(x).a_trsize+(x).a_drsize) - -#define N_STROFF(x) \ - /* string table */ \ - (N_SYMOFF(x) + (x).a_syms) - -/* - * Macros which take exec structures as arguments and tell where the - * various pieces will be loaded. - */ - -#define _N_BASEADDR(x) \ - (((x).a_magic == ZMAGIC) && ((x).a_entry < N_PAGSIZ(x)) ? \ - 0 : N_PAGSIZ(x)) - -#define N_TXTADDR(x) \ - ((x).a_machtype == M_OLDSUN2 ? N_SEGSIZ(x) : _N_BASEADDR(x)) - -#define N_DATADDR(x) \ - (((x).a_magic==OMAGIC)? (N_TXTADDR(x)+(x).a_text) \ - : (N_SEGSIZ(x)+((N_TXTADDR(x)+(x).a_text-1) & ~(N_SEGSIZ(x)-1)))) - -#define N_BSSADDR(x) (N_DATADDR(x)+(x).a_data) - -/* - * Format of a relocation datum. - */ - -/* - * Sparc relocation types - */ - -enum reloc_type -{ - RELOC_8, RELOC_16, RELOC_32, /* simplest relocs */ - RELOC_DISP8, RELOC_DISP16, RELOC_DISP32, /* Disp's (pc-rel) */ - RELOC_WDISP30, RELOC_WDISP22, /* SR word disp's */ - RELOC_HI22, RELOC_22, /* SR 22-bit relocs */ - RELOC_13, RELOC_LO10, /* SR 13&10-bit relocs*/ - RELOC_SFA_BASE, RELOC_SFA_OFF13, /* SR S.F.A. relocs */ - RELOC_BASE10, RELOC_BASE13, RELOC_BASE22, /* base_relative pic */ - RELOC_PC10, RELOC_PC22, /* special pc-rel pic*/ - RELOC_JMP_TBL, /* jmp_tbl_rel in pic */ - RELOC_SEGOFF16, /* ShLib offset-in-seg*/ - RELOC_GLOB_DAT, RELOC_JMP_SLOT, RELOC_RELATIVE, /* rtld relocs */ -}; - -/* - * Format of a relocation datum. - */ - -struct reloc_info_sparc /* used when header.a_machtype == M_SPARC */ -{ - unsigned long int r_address; /* relocation addr (offset in segment)*/ - unsigned int r_index :24; /* segment index or symbol index */ - unsigned int r_extern : 1; /* if F, r_index==SEG#; if T, SYM idx */ - int : 2; /* <unused> */ - enum reloc_type r_type : 5; /* type of relocation to perform */ - long int r_addend; /* addend for relocation value */ -}; - - - -/* - * Format of a symbol table entry - */ -struct nlist { - union { - char *n_name; /* for use when in-core */ - long n_strx; /* index into file string table */ - } n_un; - unsigned char n_type; /* type flag (N_TEXT,..) */ - char n_other; /* unused */ - short n_desc; /* see <stab.h> */ - unsigned long n_value; /* value of symbol (or sdb offset) */ -}; - -/* - * Simple values for n_type. - */ -#define N_UNDF 0x0 /* undefined */ -#define N_ABS 0x2 /* absolute */ -#define N_TEXT 0x4 /* text */ -#define N_DATA 0x6 /* data */ -#define N_BSS 0x8 /* bss */ -#define N_COMM 0x12 /* common (internal to ld) */ -#define N_FN 0x1e /* file name symbol */ - -#define N_EXT 01 /* external bit, or'ed in */ -#define N_TYPE 0x1e /* mask for all the type bits */ - -/* - * Dbx entries have some of the N_STAB bits set. - * These are given in <stab.h> - */ -#define N_STAB 0xe0 /* if any of these bits set, a dbx symbol */ - -/* - * Format for namelist values. - */ -#define N_FORMAT "%08x" - -/* - * secondary sections. - * this stuff follows the string table. - * not even its presence or absence is noted in the - * exec header (?). the secondary header gives - * the number of sections. following it is an - * array of "extra_nsects" int's which give the - * sizeof of the individual sections. the presence of - * even the header is optional. - */ - -#define EXTRA_MAGIC 1040 /* taxing concept */ -#define EXTRA_IDENT 0 /* ident's in 0th extra section */ - -struct extra_sections { - int extra_magic; /* should be EXTRA_MAGIC */ - int extra_nsects; /* number of extra sections */ -}; - -#endif /*!_sparc_a_out_h*/ diff --git a/usr/src/lib/libbc/inc/include/sun4/mmu.h b/usr/src/lib/libbc/inc/include/sun4/mmu.h deleted file mode 100644 index a18c4ea8c4..0000000000 --- a/usr/src/lib/libbc/inc/include/sun4/mmu.h +++ /dev/null @@ -1,282 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _SUN4_MMU_H -#define _SUN4_MMU_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Sun-4 memory management unit. - * All sun-4 implementations use 32 bits of address. - * A particular implementation may implement a smaller MMU. - * If so, the missing addresses are in the "middle" of the - * 32 bit address space. All accesses in this range behave - * as if there was an invalid page map entry correspronding - * to the address. - * - * There are two types of MMUs a 2 level MMU and a 3 level MMU. - * Three level MMUs do not have holes. - */ - -/* - * Hardware context and segment information - * Mnemonic decoding: - * PMENT - Page Map ENTry - * PMGRP - Group of PMENTs (aka "segment") - * SMENT - Segment Map ENTry - 3 level MMU only - * SMGRP - Group of SMENTs (aka "region") - 3 level MMU only - */ -/* fixed SUN4 constants */ -#define NPMENTPERPMGRP 32 -#define NPMENTPERPMGRPSHIFT 5 /* log2(NPMENTPERPMGRP) */ -#define PMGRPSIZE (NPMENTPERPMGRP * PAGESIZE) -#define PMGRPOFFSET (PMGRPSIZE - 1) -#define PMGRPSHIFT (PAGESHIFT + NPMENTPERPMGRPSHIFT) -#define PMGRPMASK (~PMGRPOFFSET) - -#define NSMENTPERSMGRP 64 -#define NSMENTPERSMGRPSHIFT 6 /* log2(NSMENTPERSMGRP) */ -#define SMGRPSIZE (NSMENTPERSMGRP * PMGRPSIZE) -#define SMGRPOFFSET (SMGRPSIZE - 1) -#define SMGRPSHIFT (PMGRPSHIFT + NSMENTPERSMGRPSHIFT) -#define SMGRPMASK (~SMGRPOFFSET) - -#define NSMGRPPERCTX 256 - -/* - * Useful defines for hat constants, - * Every implementation seems to have its own set - * they are set at boot time by setcputype() - */ -#define NCTXS nctxs -#define NPMGRPS npmgrps -#define NSMGRPS nsmgrps - -/* - * Variables set at boot time to reflect cpu type. - */ -#ifndef LOCORE -#include <sys/types.h> - -extern uint_t nctxs; /* number of implemented contexts */ -extern uint_t npmgrps; /* number of pmgrps in page map */ -#ifdef MMU_3LEVEL -extern uint_t nsmgrps; /* number of smgrps in segment map (3 level) */ -#endif /* MMU_3LEVEL */ -extern uint_t segmask; /* mask for segment number */ -extern addr_t hole_start; /* addr of start of MMU "hole" */ -extern addr_t hole_end; /* addr of end of MMU "hole" */ -extern uint_t shm_alignment; /* VAC address consistency modulus */ - -#ifdef MMU_3LEVEL -extern int mmu_3level; /* indicates 3 level MMU can exist */ -#endif /* MMU_3LEVEL */ - -#define PMGRP_INVALID (NPMGRPS - 1) -#define SMGRP_INVALID (NSMGRPS - 1) - -/* - * Macro to determine whether an address is within the range of the MMU. - */ -#ifdef MMU_3LEVEL -#define good_addr(a) \ - (mmu_3level || (addr_t)(a) < hole_start || (addr_t)(a) >= hole_end) -#else -#define good_addr(a) \ - ((addr_t)(a) < hole_start || (addr_t)(a) >= hole_end) -#endif /* MMU_3LEVEL */ -#endif /* !LOCORE */ - -/* - * Address space identifiers. - */ -#define ASI_CTL 0x2 /* control space */ -#define ASI_SM 0x3 /* segment map */ -#define ASI_PM 0x4 /* page map */ -#define ASI_BC 0x5 /* block copy */ -#define ASI_RM 0x6 /* region map */ -#define ASI_FCR 0x7 /* flush cache region */ -#define ASI_UP 0x8 /* user program */ -#define ASI_SP 0x9 /* supervisor program */ -#define ASI_UD 0xA /* user data */ -#define ASI_SD 0xB /* supervisor data */ -#define ASI_FCS 0xC /* flush cache segment */ -#define ASI_FCP 0xD /* flush cache page */ -#define ASI_FCC 0xE /* flush cache context */ -#define ASI_FCU 0xF /* flush cache user, sunray */ - -#define ASI_CD 0xF /* cache data, sunrise */ - -/* - * ASI_CTL addresses - */ -#define ID_PROM 0x00000000 -#define CONTEXT_REG 0x30000000 -#define SYSTEM_ENABLE 0x40000000 -#define BUS_ERROR_REG 0x60000000 -#define DIAGNOSTIC_REG 0x70000000 -#define CACHE_TAGS 0x80000000 -#define CACHE_DATA 0x90000000 /* cache data, sunray */ -#define VME_INT_VEC 0xE0000000 -#define UART_BYPASS 0xF0000000 - -#define IDPROMSIZE 0x20 /* size of id prom in bytes */ - -/* - * Constants for cache operations. - * XXX - should be deleted but the standalones (boot) use them. - */ -#define VAC_SIZE 0x20000 /* 128K */ -#define VAC_LINESIZE_SUNRISE 16 /* 16 bytes per line */ -#define VAC_LINESIZE_SUNRAY 32 /* 32 bytes per line */ -#define NPMGRPPERCTX_110 4096 -#define NPMGRPPERCTX_260 4096 -#define NPMGRPPERCTX_330 4096 -#define NPMGRPS_110 256 -#define NPMGRPS_260 512 -#define NPMGRPS_330 256 -#define NPMGRPS_470 1024 - -/* - * Various I/O space related constants - */ -#define VME16_BASE 0xFFFF0000 -#define VME16_SIZE (1<<16) -#define VME16_MASK (VME16_SIZE-1) - -#define VME24_BASE 0xFF000000 -#define VME24_SIZE (1<<24) -#define VME24_MASK (VME24_SIZE-1) - -/* - * Virtual address where dvma starts. - */ -#define DVMABASE (0-(1024*1024)) - -/* - * Context for kernel. On a Sun-4 the kernel is in every address space, - * but KCONTEXT is magic in that there is never any user context there. - */ -#define KCONTEXT 0 - -/* - * MDEVBASE is a virtual segment reserved for mapping misc. obio devices. - * The base address and the number of devices mapped should not cause the - * device mappings to cross a segment boundary. We use the segment - * immediately before SYSBASE - */ -#define MDEVBASE (SYSBASE - PMGRPSIZE) - -/* - * SEGTEMP & SEGTEMP2 are virtual segments reserved for temporary operations. - * We use the segments immediately before the start of debugger area. - */ -#define SEGTEMP ((addr_t)(DEBUGSTART - (2 * PMGRPSIZE))) -#define SEGTEMP2 ((addr_t)(DEBUGSTART - PMGRPSIZE)) - -/* - * REGTEMP is only during intialization, we use the - * REGION immediately before KERNELBASE, it is invalidated - * after use - */ -#define REGTEMP ((KERNELBASE-SMGRPSIZE)&SMGRPMASK) - -#if defined(KERNEL) && !defined(LOCORE) - -#ifdef VAC -void vac_dontcache(); -/* - * cache related constants set at boot time - */ -extern int vac_size; /* size of cache in bytes */ -extern int vac_linesize; /* cache linesize */ -extern int vac_nlines; /* number of lines in cache */ -extern int vac_pglines; /* number of cache lines in a page */ -#endif /* VAC */ - -/* - * Low level mmu-specific functions - */ -struct ctx *mmu_getctx(); -void mmu_setctx(/* ctx */); -void mmu_setpmg(/* base, pmg */); -void mmu_settpmg(/* base, pmg */); -struct pmgrp *mmu_getpmg(/* base */); -void mmu_setpte(/* base, pte */); -void mmu_getpte(/* base, ppte */); -void mmu_getkpte(/* base, ppte */); -void mmu_pmginval(/* pmg */); -#ifdef MMU_3LEVEL -struct smgrp *mmu_getsmg(/* base */); -void mmu_setsmg(/* base, smg */); -void mmu_settsmg(/* base, smg */); -void mmu_smginval(/* smg */); -#endif /* MMU_3LEVEL */ - -/* - * Cache specific routines - ifdef'ed out if there is no chance - * of running on a machine with a virtual address cache. - */ -#ifdef VAC -void vac_init(); -void vac_tagsinit(); -void vac_flushall(); -void vac_ctxflush(); -#ifdef MMU_3LEVEL -void vac_usrflush(); -void vac_rgnflush(/* base */); -#endif /* MMU_3LEVEL */ -void vac_segflush(/* base */); -void vac_pageflush(/* base */); -void vac_flush(/* base, len */); -int bp_alloc(/* map, bp, size */); -#else /* VAC */ -#define vac_init() -#define vac_tagsinit() -#define vac_flushall() -#define vac_usrflush() -#define vac_ctxflush() -#define vac_rgnflush(base) -#define vac_segflush(base) -#define vac_pageflush(base) -#define vac_flush(base, len) -#define bp_alloc(map, bp, size) (int)rmalloc((map), (long)(size)) -#endif /* VAC */ - -int valid_va_range(/* basep, lenp, minlen, dir */); - -#endif /* defined(KERNEL) && !defined(LOCORE) */ - -#ifdef __cplusplus -} -#endif - -#endif /* !_SUN4_MMU_H */ diff --git a/usr/src/lib/libbc/inc/include/sun4/param.h b/usr/src/lib/libbc/inc/include/sun4/param.h deleted file mode 100644 index 75327f65b4..0000000000 --- a/usr/src/lib/libbc/inc/include/sun4/param.h +++ /dev/null @@ -1,203 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1989 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _sun4_param_h -#define _sun4_param_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * This file is intended to contain the basic - * specific details of a given architecture. - */ - -/* - * Machine dependent constants for Sun4. - */ - -/* - * Define the VAC symbol if we could run on a machine - * which has a Virtual Address Cache (e.g. SUN4_260) - */ -#if defined(SUN4_260) || defined(SUN4_470) || defined(SUN4_330) -#define VAC -#else -#undef VAC -#endif /* SUN4_260 || SUN4_470 || SUN4_330 */ - -/* - * Define the FPU symbol if we could run on a machine with an external - * FPU (i.e. not integrated with the normal machine state like the vax). - */ -#define FPU - -/* - * Define the MMU_3LEVEL symbol if we could run on a machine with - * a three level mmu. We also assume these machines have region - * and user cache flush operations. - */ -#ifdef SUN4_470 -#define MMU_3LEVEL -#else -#undef MMU_3LEVEL -#endif /* SUN4_470 */ - -/* - * Define IOC if we could run on machines that have an I/O cache. - */ -#ifdef SUN4_470 -#define IOC -#else -#undef IOC -#endif /* SUN4_470 */ - -/* - * Define BCOPY_BUF if we could run on machines that have a bcopy buffer. - */ -#ifdef SUN4_470 -#define BCOPY_BUF -#else -#undef BCOPY_BUF -#endif /* SUN4_470 */ - -/* - * Define VA_HOLE for machines that have a hole in the virtual address space. - */ -#if defined(SUN4_260) || defined(SUN4_110) || defined(SUN4_330) -#define VA_HOLE -#else -#undef VA_HOLE -#endif /* SUN4_260 || SUN4_110 || SUN4_330 */ - -/* - * MMU_PAGES* describes the physical page size used by the mapping hardware. - * PAGES* describes the logical page size used by the system. - */ - -#define MMU_PAGESIZE 0x2000 /* 8192 bytes */ -#define MMU_PAGESHIFT 13 /* log2(MMU_PAGESIZE) */ -#define MMU_PAGEOFFSET (MMU_PAGESIZE-1)/* Mask of address bits in page */ -#define MMU_PAGEMASK (~MMU_PAGEOFFSET) - -#define PAGESIZE 0x2000 /* All of the above, for logical */ -#define PAGESHIFT 13 -#define PAGEOFFSET (PAGESIZE - 1) -#define PAGEMASK (~PAGEOFFSET) - -/* - * DATA_ALIGN is used to define the alignment of the Unix data segment. - */ -#define DATA_ALIGN 0x2000 - -/* - * Some random macros for units conversion. - */ - -/* - * MMU pages to bytes, and back (with and without rounding) - */ -#define mmu_ptob(x) ((x) << MMU_PAGESHIFT) -#define mmu_btop(x) (((unsigned)(x)) >> MMU_PAGESHIFT) -#define mmu_btopr(x) ((((unsigned)(x) + MMU_PAGEOFFSET) >> MMU_PAGESHIFT)) - -/* - * pages to bytes, and back (with and without rounding) - */ -#define ptob(x) ((x) << PAGESHIFT) -#define btop(x) (((unsigned)(x)) >> PAGESHIFT) -#define btopr(x) ((((unsigned)(x) + PAGEOFFSET) >> PAGESHIFT)) - -/* - * 2 versions of pages to disk blocks - */ -#define mmu_ptod(x) ((x) << (MMU_PAGESHIFT - DEV_BSHIFT)) -#define ptod(x) ((x) << (PAGESHIFT - DEV_BSHIFT)) - -/* - * Delay units are in microseconds. - */ -#define DELAY(n) usec_delay(n) -#define CDELAY(c, n) \ -{ \ - register int N = n; \ - while (--N > 0) { \ - if (c) \ - break; \ - usec_delay(1); \ - } \ -} - -#define UPAGES 2 /* pages of u-area, NOT including red zone */ -#define KERNSTACK 0x3000 /* size of kernel stack in u-area */ - -/* - * KERNSIZE the amount of vitual address space the kernel - * uses in all contexts. - */ -#define KERNELSIZE (128*1024*1024) - -/* - * KERNELBASE is the virtual address which - * the kernel text/data mapping starts in all contexts. - */ -#define KERNELBASE (0-KERNELSIZE) - -/* - * SYSBASE is the virtual address which - * the kernel allocated memory mapping starts in all contexts. - */ -#define SYSBASE (0-(16*1024*1024)) - -/* - * Msgbuf size. - */ -#define MSG_BSIZE ((7 * 1024) - sizeof (struct msgbuf_hd)) - -/* - * XXX - Macros for compatibility - */ -/* Clicks (MMU PAGES) to disk blocks */ -#define ctod(x) mmu_ptod(x) - -/* Clicks (MMU PAGES) to bytes, and back (with rounding) */ -#define ctob(x) mmu_ptob(x) -#define btoc(x) mmu_btopr(x) - -/* - * XXX - Old names for some backwards compatibility - */ -#define NBPG MMU_PAGESIZE -#define PGOFSET MMU_PAGEOFFSET -#define PGSHIFT MMU_PAGESHIFT - -#define CLSIZE 1 -#define CLSIZELOG2 0 -#define CLBYTES PAGESIZE -#define CLOFSET PAGEOFFSET -#define CLSHIFT PAGESHIFT -#define clrnd(i) (i) - -#endif /* !_sun4_param_h */ diff --git a/usr/src/lib/libbc/inc/include/sun4/trap.h b/usr/src/lib/libbc/inc/include/sun4/trap.h deleted file mode 100644 index 69248c7662..0000000000 --- a/usr/src/lib/libbc/inc/include/sun4/trap.h +++ /dev/null @@ -1,123 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1985 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _sparc_trap_h -#define _sparc_trap_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Trap type values. - */ -#define TT(X) ((X)<<4) - -/* - * The Coprocessor bit. - */ -#define CP_BIT 0x20 - -/* - * Hardware traps. - */ -#define T_RESET 0x00 -#define T_TEXT_FAULT 0x01 -#define T_UNIMP_INSTR 0x02 -#define T_PRIV_INSTR 0x03 -#define T_FP_DISABLED 0x04 -#define T_CP_DISABLED (0x4 | CP_BIT) -#define T_WIN_OVERFLOW 0x05 -#define T_WIN_UNDERFLOW 0x06 -#define T_ALIGNMENT 0x07 -#define T_FP_EXCEPTION 0x08 -#define T_CP_EXCEPTION (0x8 | CP_BIT) -#define T_DATA_FAULT 0x09 -#define T_TAG_OVERFLOW 0x0A -#define T_INT 0x10 -#define T_INT_LEVEL 0x0F -#define T_INT_LEVEL_1 0x11 -#define T_INT_LEVEL_2 0x12 -#define T_INT_LEVEL_3 0x13 -#define T_INT_LEVEL_4 0x14 -#define T_INT_LEVEL_5 0x15 -#define T_INT_LEVEL_6 0x16 -#define T_INT_LEVEL_7 0x17 -#define T_INT_LEVEL_8 0x18 -#define T_INT_LEVEL_9 0x19 -#define T_INT_LEVEL_10 0x1A -#define T_INT_LEVEL_11 0x1B -#define T_INT_LEVEL_12 0x1C -#define T_INT_LEVEL_13 0x1D -#define T_INT_LEVEL_14 0x1E -#define T_INT_LEVEL_15 0x1F - -/* - * Software traps (ticc instructions). - */ -#define ST_SYSCALL 0x00 -#define ST_BREAKPOINT 0x01 -#define ST_DIV0 0x02 -#define ST_FLUSH_WINDOWS 0x03 -#define ST_CLEAN_WINDOWS 0x04 -#define ST_RANGE_CHECK 0x05 -#define ST_FIX_ALIGN 0x06 -#define ST_INT_OVERFLOW 0x07 - -#define ST_GETCC 0x20 -#define ST_SETCC 0x21 -#define ST_MON_BREAKPOINT 0x7F - -/* - * Software trap vectors 16 - 31 are reserved for use by the user - * and will not be usurped by Sun. - */ - -/* - * Software trap type values. - */ -#define T_SOFTWARE_TRAP 0x80 -#define T_ESOFTWARE_TRAP 0xFF -#define T_SYSCALL (T_SOFTWARE_TRAP + ST_SYSCALL) -#define T_BREAKPOINT (T_SOFTWARE_TRAP + ST_BREAKPOINT) -#define T_DIV0 (T_SOFTWARE_TRAP + ST_DIV0) -#define T_FLUSH_WINDOWS (T_SOFTWARE_TRAP + ST_FLUSH_WINDOWS) -#define T_CLEAN_WINDOWS (T_SOFTWARE_TRAP + ST_CLEAN_WINDOWS) -#define T_RANGE_CHECK (T_SOFTWARE_TRAP + ST_RANGE_CHECK) -#define T_FIX_ALIGN (T_SOFTWARE_TRAP + ST_FIX_ALIGN) -#define T_INT_OVERFLOW (T_SOFTWARE_TRAP + ST_INT_OVERFLOW) - -#define T_GETCC (T_SOFTWARE_TRAP + ST_GETCC) -#define T_SETCC (T_SOFTWARE_TRAP + ST_SETCC) - -/* - * Pseudo traps. - */ -#define T_INTERRUPT 0x100 -#define T_SPURIOUS (T_INTERRUPT | T_INT) -#define T_FAULT 0x200 -#define T_AST 0x400 -#define T_ZERO 0x00 - -#endif /* !_sparc_trap_h */ diff --git a/usr/src/lib/libbc/inc/include/sun4/vmparam.h b/usr/src/lib/libbc/inc/include/sun4/vmparam.h deleted file mode 100644 index 0204a7d333..0000000000 --- a/usr/src/lib/libbc/inc/include/sun4/vmparam.h +++ /dev/null @@ -1,150 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright (c) 1987-1998,2001 by Sun Microsystems, Inc. - * All rights reserved. - */ - -#ifndef _SUN4_VMPARAM_H -#define _SUN4_VMPARAM_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -#include <sun4/param.h> - -/* - * Machine dependent constants for Sun-4 - */ - -/* - * USRTEXT is the start of the user text/data space, while USRSTACK - * is the top (end) of the user stack. - */ -#define USRTEXT 0x2000 -#define USRSTACK KERNELBASE - -/* - * Virtual memory related constants for UNIX resource control, all in bytes - * The default stack size of 8M allows an optimization of mmu mapping - * resources so that in normal use a single mmu region map entry (smeg) - * can be used to map both the stack and shared libraries - */ -#define DFLSSIZ (8*1024*1024) /* initial stack size limit */ - -#define DFLDSIZ_260 ((512*1024*1024)-USRTEXT) /* initial data size limit */ -#define MAXDSIZ_260 ((512*1024*1024)-USRTEXT) /* max data size limit */ -#define MAXSSIZ_260 ((512*1024*1024)-KERNELSIZE) /* max stack size limit */ - -#define DFLDSIZ_470 ((2048*1024*1024)-USRTEXT) /* initial data size limit */ -#define MAXDSIZ_470 ((2048*1024*1024)-USRTEXT) /* max data size limit */ -#define MAXSSIZ_470 ((2048*1024*1024)-KERNELSIZE) /* max stack size limit */ - -#define DFLDSIZ dfldsiz -#define MAXDSIZ maxdsiz -#define MAXSSIZ maxssiz - -#ifndef LOCORE -extern unsigned int dfldsiz; -extern unsigned int maxdsiz; -extern unsigned int maxssiz; -#endif /* !LOCORE */ - -#define SSIZE 1 /* initial stack size */ -#define SINCR 1 /* increment of stack */ - -/* - * Size of the kernel segkmem system pte table. This virtual - * space is controlled by the resource map "kernelmap". - */ -#define SYSPTSIZE (0x640000 / MMU_PAGESIZE) - -/* - * Minimum allowable virtual address space to be used - * by the seg_map segment driver for fast kernel mappings. - */ -#define MINMAPSIZE 0x200000 - -/* - * The time for a process to be blocked before being very swappable. - * This is a number of seconds which the system takes as being a non-trivial - * amount of real time. You probably shouldn't change this; - * it is used in subtle ways (fractions and multiples of it are, that is, like - * half of a ``long time'', almost a long time, etc.) - * It is related to human patience and other factors which don't really - * change over time. - */ -#define MAXSLP 20 - -/* - * A swapped in process is given a small amount of core without being bothered - * by the page replacement algorithm. Basically this says that if you are - * swapped in you deserve some resources. We protect the last SAFERSS - * pages against paging and will just swap you out rather than paging you. - * Note that each process has at least UPAGES pages which are not - * paged anyways so this number just means a swapped in process is - * given around 32k bytes. - */ -#define SAFERSS 3 - -/* - * DISKRPM is used to estimate the number of paging i/o operations - * which one can expect from a single disk controller. - */ -#define DISKRPM 60 - -/* - * Paging thresholds (see vm_pageout.c). - * Strategy of 3/17/83: - * lotsfree is 256k bytes, but at most 1/8 of memory - * desfree is 100k bytes, but at most 1/16 of memory - * minfree is 32k bytes, but at most 1/2 of desfree - */ -#define LOTSFREE (256 * 1024) -#define LOTSFREEFRACT 8 -#define DESFREE (100 * 1024) -#define DESFREEFRACT 16 -#define MINFREE (32 * 1024) -#define MINFREEFRACT 2 - -/* - * There are two clock hands, initially separated by HANDSPREAD bytes - * (but at most all of user memory). The amount of time to reclaim - * a page once the pageout process examines it increases with this - * distance and decreases as the scan rate rises. - */ -#define HANDSPREAD (2 * 1024 * 1024) - -/* - * Paged text files that are less than PGTHRESH bytes - * may be "prefaulted in" instead of demand paged. - */ -#define PGTHRESH (280 * 1024) - -#ifdef __cplusplus -} -#endif - -#endif /* !_SUN4_VMPARAM_H */ diff --git a/usr/src/lib/libbc/inc/include/sys/audit.h b/usr/src/lib/libbc/inc/include/sys/audit.h deleted file mode 100644 index a3ba237f20..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/audit.h +++ /dev/null @@ -1,233 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1988 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" -/* - * Audit trail structures; - */ - -#ifndef _sys_audit_h -#define _sys_audit_h - -/* - * Maximum size for audit data passed from the audit system call - * This value is arbitrary, so offers of better numbers are invited. - */ - -#define AUP_USER (0x8000) -#define MAXAUDITDATA (AUP_USER - 1) -#define AUDITMAGIC 0x00070009 - -/* - * Audit conditions, statements reguarding what's to be done with - * audit records. - */ -#define AUC_UNSET 0 /* on/off hasn't been decided */ -#define AUC_AUDITING 1 /* auditing is being done */ -#define AUC_NOAUDIT 2 /* auditing is not being done */ -#define AUC_FCHDONE 3 /* no auditing, and you never can */ - -/* - * Minimum and maximum record type values. Change AUR_MAXRECTYPE when - * adding new record types. - */ -#define AUR_MINRECTYPE 1 -#define AUR_MAXRECTYPE 63 - -/* - * Audit record type codes - */ -#define AUR_ACCESS 1 -#define AUR_CHMOD 2 -#define AUR_CHOWN 3 -#define AUR_CREAT 4 -#define AUR_FCHMOD 5 -#define AUR_FCHOWN 6 -#define AUR_FTRUNCATE 7 -#define AUR_LINK 8 -#define AUR_MKDIR 9 -#define AUR_MKNOD 10 -#define AUR_OPEN 11 -#define AUR_RMDIR 12 -#define AUR_RENAME 13 -#define AUR_STAT 14 -#define AUR_SYMLINK 15 -#define AUR_TRUNCATE 16 -#define AUR_UNLINK 17 -#define AUR_UTIMES 18 -#define AUR_EXECV 19 -#define AUR_MSGCONV 20 -#define AUR_MSGCTL 21 -#define AUR_MSGGET 22 -#define AUR_MSGRCV 23 -#define AUR_MSGSND 24 -#define AUR_SEMCTL 25 -#define AUR_SEMGET 26 -#define AUR_SEMOP 27 -#define AUR_SHMAT 28 -#define AUR_SHMCTL 29 -#define AUR_SHMDT 30 -#define AUR_SHMGET 31 -#define AUR_SOCKET 32 -#define AUR_PTRACE 33 -#define AUR_KILL 34 -#define AUR_KILLPG 35 -#define AUR_EXECVE 36 -#define AUR_CORE 37 -#define AUR_ADJTIME 38 -#define AUR_SETTIMEOFDAY 39 -#define AUR_SETHOSTNAME 40 -#define AUR_SETDOMAINNAME 41 -#define AUR_REBOOT 42 -#define AUR_REBOOTFAIL 43 -#define AUR_SYSACCT 44 -#define AUR_MOUNT_UFS 45 -#define AUR_MOUNT_NFS 46 -#define AUR_MOUNT 47 -#define AUR_UNMOUNT 48 -#define AUR_READLINK 49 -#define AUR_QUOTA_ON 50 -#define AUR_QUOTA_OFF 51 -#define AUR_QUOTA_SET 52 -#define AUR_QUOTA_LIM 53 -#define AUR_QUOTA_SYNC 54 -#define AUR_QUOTA 55 -#define AUR_STATFS 56 -#define AUR_CHROOT 57 -#define AUR_TEXT 58 -#define AUR_CHDIR 59 -#define AUR_MSGCTLRMID 60 -#define AUR_SEMCTL3 61 -#define AUR_SEMCTLALL 62 -#define AUR_SHMCTLRMID 63 - -#define AUR_TRAILER 1000 - -/* - * The classes of audit events - */ -#define AU_DREAD 0x00000001 -#define AU_DWRITE 0x00000002 -#define AU_DACCESS 0x00000004 -#define AU_DCREATE 0x00000008 -#define AU_LOGIN 0x00000010 -#define AU_SREAD 0x00000020 -#define AU_SCTL 0x00000040 -#define AU_MINPRIV 0x00000080 -#define AU_MAJPRIV 0x00000100 -#define AU_ADMIN 0x00000200 -#define AU_ASSIGN 0x00000400 - -/* - * Success and failure are defined here because not everyone agrees on - * which values rate success and which failure. - */ -#define AU_EITHER -1 -#define AU_SUCCESS 0 -#define AU_FAILURE 1 - -/* - * The user id -2(0xfffe) is never audited - in fact, a setauid(AU_NOAUDITID) - * will turn off auditing. - */ -#define AU_NOAUDITID -2 - -/* - * The sturcture of the audit state - */ -struct audit_state { - unsigned int as_success; /* success bits */ - unsigned int as_failure; /* failure bits */ -}; -typedef struct audit_state audit_state_t; - -/* - * The audit file header structure. - * In the file it will be followed by a path name, the length of which is - * kept in the ah_namelen field. - */ -struct audit_header { - int ah_magic; /* magic number */ - time_t ah_time; /* the time */ - short ah_namelen; /* length of file name */ -}; -typedef struct audit_header audit_header_t; - -/* - * The audit file trailer record structure. - * In the file it will be followed by a path name, the length of which is - * kept in the at_namelen field. - */ -struct audit_trailer { - short at_record_size; /* size of this */ - short at_record_type; /* its type, a trailer */ - time_t at_time; /* the time */ - short at_namelen; /* length of file name */ -}; -typedef struct audit_trailer audit_trailer_t; - -/* - * The audit file record structure. - * au_record_size is the size of the entire record. - * au_param_count is the number of data items which follow the record. - * There is a short ( 16 bit ) length for each of the following - * parameters, then the parameters themselves. There is no way to know - * what the parameters are from the data, unless the au_record_type - * is understood. - * The first parameter is the group list, hence au_param_count will - * always be at least one. - */ -struct audit_record { - short au_record_size; /* size of this */ - short au_record_type; /* its type */ - unsigned int au_event; /* the event */ - time_t au_time; /* the time */ - uid_t au_uid; /* real uid */ - uid_t au_auid; /* audit uid */ - uid_t au_euid; /* effective */ - gid_t au_gid; /* real group */ - short au_pid; /* process id */ - int au_errno; /* error code */ - int au_return; /* a return value */ - blabel_t au_label; /* also ... */ - short au_param_count; /* # of parameters */ -}; -typedef struct audit_record audit_record_t; - -/* - * This structure controls a buffer for generating full pathnames - * for filenames. - */ -struct au_path_s { - u_int ap_size; /* Size of buffer */ - caddr_t ap_buf; /* Address of buffer */ - caddr_t ap_ptr; /* Current position */ -}; -typedef struct au_path_s au_path_t; - -#define AU_ALIGN(x) (((x) + 1) & ~1) - -#endif /*!_sys_audit_h*/ diff --git a/usr/src/lib/libbc/inc/include/sys/des.h b/usr/src/lib/libbc/inc/include/sys/des.h deleted file mode 100644 index 795e3b0544..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/des.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _sys_des_h -#define _sys_des_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Generic DES driver interface - * Keep this file hardware independent! - */ - -#define DES_MAXLEN 65536 /* maximum # of bytes to encrypt */ -#define DES_QUICKLEN 16 /* maximum # of bytes to encrypt quickly */ - -enum desdir { ENCRYPT, DECRYPT }; -enum desmode { CBC, ECB }; - -/* - * parameters to ioctl call - */ -struct desparams { - u_char des_key[8]; /* key (with low bit parity) */ - enum desdir des_dir; /* direction */ - enum desmode des_mode; /* mode */ - u_char des_ivec[8]; /* input vector */ - unsigned des_len; /* number of bytes to crypt */ - union { - u_char UDES_data[DES_QUICKLEN]; - u_char *UDES_buf; - } UDES; -#define des_data UDES.UDES_data /* direct data here if quick */ -#define des_buf UDES.UDES_buf /* otherwise, pointer to data */ -}; - -/* - * Encrypt an arbitrary sized buffer - */ -#define DESIOCBLOCK _IOWR('d', 6, struct desparams) - -/* - * Encrypt of small amount of data, quickly - */ -#define DESIOCQUICK _IOWR('d', 7, struct desparams) - -#endif /* !_sys_des_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/dir.h b/usr/src/lib/libbc/inc/include/sys/dir.h deleted file mode 100644 index afc1f77fd0..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/dir.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Filesystem-independent directory information. - * Directory entry structures are of variable length. - * Each directory entry is a struct direct containing its file number, the - * offset of the next entry (a cookie interpretable only the filesystem - * type that generated it), the length of the entry, and the length of the - * name contained in the entry. These are followed by the name. The - * entire entry is padded with null bytes to a 4 byte boundary. All names - * are guaranteed null terminated. The maximum length of a name in a - * directory is MAXNAMLEN, plus a null byte. - * Note: this file is present only for backwards compatibility. It is superseded - * by the files /usr/include/dirent.h and /usr/include/sys/dirent.h. It will - * disappear in a future major release. - */ - -#ifndef _sys_dir_h -#define _sys_dir_h - -#define MAXNAMLEN 255 - -struct direct { - off_t d_off; /* offset of next disk directory entry */ - u_long d_fileno; /* file number of entry */ - u_short d_reclen; /* length of this record */ - u_short d_namlen; /* length of string in d_name */ - char d_name[MAXNAMLEN + 1]; /* name (up to MAXNAMLEN + 1) */ -}; - -/* - * The macro DIRSIZ(dp) gives the minimum amount of space required to represent - * a directory entry. For any directory entry dp->d_reclen >= DIRSIZ(dp). - * Specific filesystem typesm may use this macro to construct the value - * for d_reclen. - */ -#undef DIRSIZ -#define DIRSIZ(dp) \ - (((sizeof (struct direct) - (MAXNAMLEN+1) + ((dp)->d_namlen+1)) + 3) & ~3) - -#ifndef KERNEL -#define d_ino d_fileno /* compatability */ - - -/* - * Definitions for library routines operating on directories. - */ - -typedef struct _dirdesc { - int dd_fd; /* file descriptor */ - long dd_loc; /* buf offset of entry from last readddir() */ - long dd_size; /* amount of valid data in buffer */ - long dd_bsize; /* amount of entries read at a time */ - long dd_off; /* Current offset in dir (for telldir) */ - char *dd_buf; /* directory data buffer */ -} DIR; - -#ifndef NULL -#define NULL 0 -#endif -extern DIR *opendir(); -extern struct direct *readdir(); -extern long telldir(); -extern void seekdir(); -#define rewinddir(dirp) seekdir((dirp), (long)0) -extern int closedir(); -#endif - -#endif /*!_sys_dir_h*/ diff --git a/usr/src/lib/libbc/inc/include/sys/dirent.h b/usr/src/lib/libbc/inc/include/sys/dirent.h deleted file mode 100644 index f4a154290a..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/dirent.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1989 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Filesystem-independent directory information. - * Directory entry structures are of variable length. - * Each directory entry is a struct dirent containing its file number, the - * offset of the next entry (a cookie interpretable only the filesystem - * type that generated it), the length of the entry, and the length of the - * name contained in the entry. These are followed by the name. The - * entire entry is padded with null bytes to a 4 byte boundary. All names - * are guaranteed null terminated. The maximum length of a name in a - * directory is MAXNAMLEN, plus a null byte. - */ - -#ifndef __sys_dirent_h -#define __sys_dirent_h - -struct dirent { - off_t d_off; /* offset of next disk dir entry */ - unsigned long d_fileno; /* file number of entry */ - unsigned short d_reclen; /* length of this record */ - unsigned short d_namlen; /* length of string in d_name */ - char d_name[255+1]; /* name (up to MAXNAMLEN + 1) */ -}; - -#ifndef _POSIX_SOURCE -/* - * It's unlikely to change, but make sure that sizeof d_name above is - * at least MAXNAMLEN + 1 (more may be added for padding). - */ -#define MAXNAMLEN 255 -/* - * The macro DIRSIZ(dp) gives the minimum amount of space required to represent - * a directory entry. For any directory entry dp->d_reclen >= DIRSIZ(dp). - * Specific filesystem types may use this macro to construct the value - * for d_reclen. - */ -#undef DIRSIZ -#define DIRSIZ(dp) \ - (((sizeof(struct dirent) - (MAXNAMLEN+1) + ((dp)->d_namlen+1)) +3) & ~3) - -#endif /* !_POSIX_SOURCE */ -#endif /* !__sys_dirent_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/errno.h b/usr/src/lib/libbc/inc/include/sys/errno.h deleted file mode 100644 index 5d45616601..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/errno.h +++ /dev/null @@ -1,147 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1993 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * If error codes are added or changed here, they should be updated in - * /usr/src/lib/libc/gen/common/errlst.c as well. - */ - -/* - * Error codes - */ - -#ifndef _sys_errno_h -#define _sys_errno_h - -#define EPERM 1 /* Not owner */ -#define ENOENT 2 /* No such file or directory */ -#define ESRCH 3 /* No such process */ -#define EINTR 4 /* Interrupted system call */ -#define EIO 5 /* I/O error */ -#define ENXIO 6 /* No such device or address */ -#define E2BIG 7 /* Arg list too long */ -#define ENOEXEC 8 /* Exec format error */ -#define EBADF 9 /* Bad file number */ -#define ECHILD 10 /* No children */ -#define EAGAIN 11 /* No more processes */ -#define ENOMEM 12 /* Not enough core */ -#define EACCES 13 /* Permission denied */ -#define EFAULT 14 /* Bad address */ -#define ENOTBLK 15 /* Block device required */ -#define EBUSY 16 /* Mount device busy */ -#define EEXIST 17 /* File exists */ -#define EXDEV 18 /* Cross-device link */ -#define ENODEV 19 /* No such device */ -#define ENOTDIR 20 /* Not a directory*/ -#define EISDIR 21 /* Is a directory */ -#define EINVAL 22 /* Invalid argument */ -#define ENFILE 23 /* File table overflow */ -#define EMFILE 24 /* Too many open files */ -#define ENOTTY 25 /* Not a typewriter */ -#define ETXTBSY 26 /* Text file busy */ -#define EFBIG 27 /* File too large */ -#define ENOSPC 28 /* No space left on device */ -#define ESPIPE 29 /* Illegal seek */ -#define EROFS 30 /* Read-only file system */ -#define EMLINK 31 /* Too many links */ -#define EPIPE 32 /* Broken pipe */ - -/* math software */ -#define EDOM 33 /* Argument too large */ -#define ERANGE 34 /* Result too large */ - -/* non-blocking and interrupt i/o */ -#define EWOULDBLOCK 35 /* Operation would block */ -#define EINPROGRESS 36 /* Operation now in progress */ -#define EALREADY 37 /* Operation already in progress */ -/* ipc/network software */ - - /* argument errors */ -#define ENOTSOCK 38 /* Socket operation on non-socket */ -#define EDESTADDRREQ 39 /* Destination address required */ -#define EMSGSIZE 40 /* Message too long */ -#define EPROTOTYPE 41 /* Protocol wrong type for socket */ -#define ENOPROTOOPT 42 /* Protocol not available */ -#define EPROTONOSUPPORT 43 /* Protocol not supported */ -#define ESOCKTNOSUPPORT 44 /* Socket type not supported */ -#define EOPNOTSUPP 45 /* Operation not supported on socket */ -#define EPFNOSUPPORT 46 /* Protocol family not supported */ -#define EAFNOSUPPORT 47 /* Address family not supported by protocol family */ -#define EADDRINUSE 48 /* Address already in use */ -#define EADDRNOTAVAIL 49 /* Can't assign requested address */ - - /* operational errors */ -#define ENETDOWN 50 /* Network is down */ -#define ENETUNREACH 51 /* Network is unreachable */ -#define ENETRESET 52 /* Network dropped connection on reset */ -#define ECONNABORTED 53 /* Software caused connection abort */ -#define ECONNRESET 54 /* Connection reset by peer */ -#define ENOBUFS 55 /* No buffer space available */ -#define EISCONN 56 /* Socket is already connected */ -#define ENOTCONN 57 /* Socket is not connected */ -#define ESHUTDOWN 58 /* Can't send after socket shutdown */ -#define ETOOMANYREFS 59 /* Too many references: can't splice */ -#define ETIMEDOUT 60 /* Connection timed out */ -#define ECONNREFUSED 61 /* Connection refused */ - - /* */ -#define ELOOP 62 /* Too many levels of symbolic links */ -#define ENAMETOOLONG 63 /* File name too long */ - -/* should be rearranged */ -#define EHOSTDOWN 64 /* Host is down */ -#define EHOSTUNREACH 65 /* No route to host */ -#define ENOTEMPTY 66 /* Directory not empty */ - -/* quotas & mush */ -#define EPROCLIM 67 /* Too many processes */ -#define EUSERS 68 /* Too many users */ -#define EDQUOT 69 /* Disc quota exceeded */ - -/* Network File System */ -#define ESTALE 70 /* Stale NFS file handle */ -#define EREMOTE 71 /* Too many levels of remote in path */ - -/* streams */ -#define ENOSTR 72 /* Device is not a stream */ -#define ETIME 73 /* Timer expired */ -#define ENOSR 74 /* Out of streams resources */ -#define ENOMSG 75 /* No message of desired type */ -#define EBADMSG 76 /* Trying to read unreadable message */ - -/* SystemV IPC */ -#define EIDRM 77 /* Identifier removed */ - -/* SystemV Record Locking */ -#define EDEADLK 78 /* Deadlock condition. */ -#define ENOLCK 79 /* No record locks available. */ - -/* POSIX */ -#define ENOSYS 90 /* function not implemented */ - -#endif /*!_sys_errno_h*/ diff --git a/usr/src/lib/libbc/inc/include/sys/exec.h b/usr/src/lib/libbc/inc/include/sys/exec.h deleted file mode 100644 index bb0b450dd4..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/exec.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1985 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _sys_exec_h -#define _sys_exec_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * format of the exec header - * known by kernel and by user programs - */ -struct exec { - unsigned char a_dynamic:1; /* has a __DYNAMIC */ - unsigned char a_toolversion:7;/* version of toolset used to create this file */ - unsigned char a_machtype; /* machine type */ - unsigned short a_magic; /* magic number */ - unsigned long a_text; /* size of text segment */ - unsigned long a_data; /* size of initialized data */ - unsigned long a_bss; /* size of uninitialized data */ - unsigned long a_syms; /* size of symbol table */ - unsigned long a_entry; /* entry point */ - unsigned long a_trsize; /* size of text relocation */ - unsigned long a_drsize; /* size of data relocation */ -}; - -#define OMAGIC 0407 /* old impure format */ -#define NMAGIC 0410 /* read-only text */ -#define ZMAGIC 0413 /* demand load format */ - -/* machine types */ - -#define M_OLDSUN2 0 /* old sun-2 executable files */ -#define M_68010 1 /* runs on either 68010 or 68020 */ -#define M_68020 2 /* runs only on 68020 */ -#define M_SPARC 3 /* runs only on SPARC */ - -#define TV_SUN2_SUN3 0 -#define TV_SUN4 1 - -#endif /* !_sys_exec_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/fcntl.h b/usr/src/lib/libbc/inc/include/sys/fcntl.h deleted file mode 100644 index 9bdb987b35..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/fcntl.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1989 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* @(#)fcntl.h 1.6 88/02/08 SMI */ - -#ifndef _FCNTL_ -#define _FCNTL_ - -#include <sys/fcntlcom.h> - -#define O_NDELAY _FNDELAY /* Non-blocking I/O (4.2 style) */ - -#endif /* !_FCNTL_ */ diff --git a/usr/src/lib/libbc/inc/include/sys/fcntlcom.h b/usr/src/lib/libbc/inc/include/sys/fcntlcom.h deleted file mode 100644 index 8caf65e2a3..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/fcntlcom.h +++ /dev/null @@ -1,193 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ - -/* - * Copyright 2016 Gary Mills - * Copyright 2010 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * Copyright (c) 1983 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#ifndef __SYS_FCNTLCOM_H -#define __SYS_FCNTLCOM_H - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Rewack the FXXXXX values as _FXXXX so that _POSIX_SOURCE works. - */ -#define _FOPEN (-1) /* from sys/file.h, kernel use only */ -#define _FREAD 0x0001 /* read enabled */ -#define _FWRITE 0x0002 /* write enabled */ -#define _FNDELAY 0x0004 /* non blocking I/O (4.2 style) */ -#define _FAPPEND 0x0008 /* append (writes guaranteed at the end) */ -#define _FMARK 0x0010 /* internal; mark during gc() */ -#define _FDEFER 0x0020 /* internal; defer for next gc pass */ -#define _FASYNC 0x0040 /* signal pgrp when data ready */ -#define _FSHLOCK 0x0080 /* BSD flock() shared lock present */ -#define _FEXLOCK 0x0100 /* BSD flock() exclusive lock present */ -#define _FCREAT 0x0200 /* open with file create */ -#define _FTRUNC 0x0400 /* open with truncation */ -#define _FEXCL 0x0800 /* error on open if file exists */ -#define _FNBIO 0x1000 /* non blocking I/O (sys5 style) */ -#define _FSYNC 0x2000 /* do all writes synchronously */ -#define _FNONBLOCK 0x4000 /* non blocking I/O (POSIX style) */ -#define _FNOCTTY 0x8000 /* don't assign a ctty on this open */ - -#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR) - -/* - * Flag values for open(2) and fcntl(2) - * The kernel adds 1 to the open modes to turn it into some - * combination of FREAD and FWRITE. - */ -#define O_RDONLY 0 /* +1 == FREAD */ -#define O_WRONLY 1 /* +1 == FWRITE */ -#define O_RDWR 2 /* +1 == FREAD|FWRITE */ -#define O_APPEND _FAPPEND -#define O_CREAT _FCREAT -#define O_TRUNC _FTRUNC -#define O_EXCL _FEXCL -/* O_SYNC _FSYNC not posix, defined below */ -/* O_NDELAY _FNDELAY set in include/fcntl.h */ -/* O_NDELAY _FNBIO set in 5include/fcntl.h */ -#define O_NONBLOCK _FNONBLOCK -#define O_NOCTTY _FNOCTTY - -#ifndef _POSIX_SOURCE - -#define O_SYNC _FSYNC - -/* - * Flags that work for fcntl(fd, F_SETFL, FXXXX) - */ -#define FAPPEND _FAPPEND -#define FSYNC _FSYNC -#define FASYNC _FASYNC -#define FNBIO _FNBIO -#define FNONBIO _FNONBLOCK /* XXX fix to be NONBLOCK everywhere */ -#define FNDELAY _FNDELAY - -/* - * Flags that are disallowed for fcntl's (FCNTLCANT); - * used for opens, internal state, or locking. - */ -#define FREAD _FREAD -#define FWRITE _FWRITE -#define FMARK _FMARK -#define FDEFER _FDEFER -#define FSHLOCK _FSHLOCK -#define FEXLOCK _FEXLOCK - -/* - * The rest of the flags, used only for opens - */ -#define FOPEN _FOPEN -#define FCREAT _FCREAT -#define FTRUNC _FTRUNC -#define FEXCL _FEXCL -#define FNOCTTY _FNOCTTY - -#endif /* !_POSIX_SOURCE */ - -/* XXX close on exec request; must match UF_EXCLOSE in user.h */ -#define FD_CLOEXEC 1 /* posix */ - -/* fcntl(2) requests */ -#define F_DUPFD 0 /* Duplicate fildes */ -#define F_GETFD 1 /* Get fildes flags (close on exec) */ -#define F_SETFD 2 /* Set fildes flags (close on exec) */ -#define F_GETFL 3 /* Get file flags */ -#define F_SETFL 4 /* Set file flags */ -#ifndef _POSIX_SOURCE -#define F_GETOWN 5 /* Get owner - for ASYNC */ -#define F_SETOWN 6 /* Set owner - for ASYNC */ -#endif /* !_POSIX_SOURCE */ -#define F_GETLK 7 /* Get record-locking information */ -#define F_SETLK 8 /* Set or Clear a record-lock (Non-Blocking) */ -#define F_SETLKW 9 /* Set or Clear a record-lock (Blocking) */ -#ifndef _POSIX_SOURCE -#define F_CNVT 12 /* Convert a fhandle to an open fd */ -#endif /* !_POSIX_SOURCE */ - -/* Needed by flock.c */ -#define F_FLOCKW F_SETLKW -#define F_FLOCK F_SETLK - -/* fcntl(2) flags (l_type field of flock structure) */ -#define F_RDLCK 1 /* read lock */ -#define F_WRLCK 2 /* write lock */ -#define F_UNLCK 3 /* remove lock(s) */ -#ifndef _POSIX_SOURCE -#define F_UNLKSYS 4 /* remove remote locks for a given system */ -#endif /* !_POSIX_SOURCE */ - -/* needed for _syscall(SYS_openat, AT_FDCWD, ...) */ -#define AT_FDCWD 0xffd19553 -#define AT_SYMLINK_NOFOLLOW 0x1000 -#define AT_REMOVEDIR 0x1 - -#include <sys/stdtypes.h> - -/* file segment locking set data type - information passed to system by user */ -struct flock { - short l_type; /* F_RDLCK, F_WRLCK, or F_UNLCK */ - short l_whence; /* flag to choose starting offset */ - long l_start; /* relative offset, in bytes */ - long l_len; /* length, in bytes; 0 means lock to EOF */ - short l_pid; /* returned with F_GETLK */ - short l_xxx; /* reserved for future use */ -}; - -#ifndef _POSIX_SOURCE -/* extended file segment locking set data type */ -struct eflock { - short l_type; /* F_RDLCK, F_WRLCK, or F_UNLCK */ - short l_whence; /* flag to choose starting offset */ - long l_start; /* relative offset, in bytes */ - long l_len; /* length, in bytes; 0 means lock to EOF */ - short l_pid; /* returned with F_GETLK */ - short l_xxx; /* reserved for future use */ - long l_rpid; /* Remote process id wanting this lock */ - long l_rsys; /* Remote system id wanting this lock */ -}; -#endif /* !_POSIX_SOURCE */ - -#ifndef KERNEL -#include <sys/stat.h> /* sigh. for the mode bits for open/creat */ - -int open(/* char *path, int flags, mode_t modes */); -int creat(/* char *path, mode_t modes */); -int fcntl(/* int fd, cmd, ... */); -#endif /* !KERNEL */ - -#ifdef __cplusplus -} -#endif - -#endif /* __SYS_FCNTLCOM_H */ diff --git a/usr/src/lib/libbc/inc/include/sys/file.h b/usr/src/lib/libbc/inc/include/sys/file.h deleted file mode 100644 index 60105370d2..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/file.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 2001 by Sun Microsystems, Inc. - * All rights reserved. - */ - -/* - * Copyright (c) 1982, 1986 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#ifndef __SYS_FILE_H -#define __SYS_FILE_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <sys/types.h> - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef KERNEL -/* - * Descriptor table entry. - * One for each kernel object. - */ -struct file { - int f_flag; /* see below */ - short f_type; /* descriptor type */ - short f_count; /* reference count */ - short f_msgcount; /* references from message queue */ - struct fileops { - int (*fo_rw)(); - int (*fo_ioctl)(); - int (*fo_select)(); - int (*fo_close)(); - } *f_ops; - caddr_t f_data; /* ptr to file specific struct (vnode/socket) */ - off_t f_offset; - struct ucred *f_cred; /* credentials of user who opened file */ -}; - -struct file *file, *fileNFILE; -int nfile; -struct file *getf(); -struct file *falloc(); -#endif /* KERNEL */ - -#include <sys/fcntlcom.h> - -/* - * bits to save after an open. The no delay bits mean "don't wait for - * carrier at open" in all cases. Sys5 & POSIX save the no delay bits, - * using them to also mean "don't block on reads"; BSD has you reset it - * with an fcntl() if you want the "don't block on reads" behavior. - */ -#define FMASK (FREAD|FWRITE|FAPPEND|FSYNC|FNBIO|FNONBIO) -#define FCNTLCANT (FREAD|FWRITE|FMARK|FDEFER|FSHLOCK|FEXLOCK) - -/* - * User definitions. - */ - -/* - * Flock call. - */ -#define LOCK_SH 1 /* shared lock */ -#define LOCK_EX 2 /* exclusive lock */ -#define LOCK_NB 4 /* don't block when locking */ -#define LOCK_UN 8 /* unlock */ - -/* - * Access call. Also maintained in unistd.h - */ -#define F_OK 0 /* does file exist */ -#define X_OK 1 /* is it executable by caller */ -#define W_OK 2 /* writable by caller */ -#define R_OK 4 /* readable by caller */ - -/* - * Lseek call. Also maintained in 5include/stdio.h and sys/unistd.h as SEEK_* - */ -#define L_SET 0 /* absolute offset */ -#define L_INCR 1 /* relative to current offset */ -#define L_XTND 2 /* relative to end of file */ - -#ifdef KERNEL -#define GETF(fp, fd) { \ - if ((fd) < 0 || (fd) > u.u_lastfile || \ - ((fp) = u.u_ofile[fd]) == NULL) { \ - u.u_error = EBADF; \ - return; \ - } \ -} - -#define DTYPE_VNODE 1 /* file */ -#define DTYPE_SOCKET 2 /* communications endpoint */ -#endif /* KERNEL */ - -#ifdef __cplusplus -} -#endif - -#endif /* __SYS_FILE_H */ diff --git a/usr/src/lib/libbc/inc/include/sys/filio.h b/usr/src/lib/libbc/inc/include/sys/filio.h deleted file mode 100644 index 4e87bf2494..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/filio.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * Copyright (c) 1982, 1986 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#ifndef _sys_filio_h -#define _sys_filio_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * General file ioctl definitions. - */ - -#include <sys/ioccom.h> - -#define FIOCLEX _IO('f', 1) /* set exclusive use on fd */ -#define FIONCLEX _IO('f', 2) /* remove exclusive use */ -/* another local */ -#define FIONREAD _IOR('f', 127, int) /* get # bytes to read */ -#define FIONBIO _IOW('f', 126, int) /* set/clear non-blocking i/o */ -#define FIOASYNC _IOW('f', 125, int) /* set/clear async i/o */ -#define FIOSETOWN _IOW('f', 124, int) /* set owner */ -#define FIOGETOWN _IOR('f', 123, int) /* get owner */ - -#endif /* !_sys_filio_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/ieeefp.h b/usr/src/lib/libbc/inc/include/sys/ieeefp.h deleted file mode 100644 index 1f7b26f7e8..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/ieeefp.h +++ /dev/null @@ -1,115 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Copyright (c) 1987 by Sun Microsystems, Inc. - */ - -/* - * Definitions for constants and types for IEEE floating point. - */ - -#ifndef _sys_ieeefp_h -#define _sys_ieeefp_h - - -/* Sun TYPES for IEEE floating point. */ - -#ifdef sparc -enum fp_direction_type /* rounding direction */ - { - fp_nearest = 0, - fp_tozero = 1, - fp_positive = 2, - fp_negative = 3 - } ; -#endif -#ifdef i386 -enum fp_direction_type /* rounding direction */ - { - fp_nearest = 0, - fp_negative = 1, - fp_positive = 2, - fp_tozero = 3 - } ; -#endif -#ifdef mc68000 -enum fp_direction_type /* rounding direction */ - { - fp_nearest = 0, - fp_tozero = 1, - fp_negative = 2, - fp_positive = 3 - } ; -#endif - -#ifdef i386 -enum fp_precision_type /* extended rounding precision */ - { - fp_single = 0, - fp_precision_3 = 1, - fp_double = 2, - fp_extended = 3 - } ; -#else -enum fp_precision_type /* extended rounding precision */ - { - fp_extended = 0, - fp_single = 1, - fp_double = 2, - fp_precision_3 = 3 - } ; -#endif - -#ifdef i386 -enum fp_exception_type /* exceptions according to bit number */ - { - fp_invalid = 0, - fp_denormalized = 1, - fp_division = 2, - fp_overflow = 3, - fp_underflow = 4, - fp_inexact = 5 - } ; -#else -enum fp_exception_type /* exceptions according to bit number */ - { - fp_inexact = 0, - fp_division = 1, - fp_underflow = 2, - fp_overflow = 3, - fp_invalid = 4 - } ; -#endif - -enum fp_class_type /* floating-point classes */ - { - fp_zero = 0, - fp_subnormal = 1, - fp_normal = 2, - fp_infinity = 3, - fp_quiet = 4, - fp_signaling = 5 - } ; - -#endif /*!_sys_ieeefp_h*/ diff --git a/usr/src/lib/libbc/inc/include/sys/ioccom.h b/usr/src/lib/libbc/inc/include/sys/ioccom.h deleted file mode 100644 index 0d7029ae4b..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/ioccom.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * Copyright (c) 1982, 1986 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#ifndef __sys_ioccom_h -#define __sys_ioccom_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Ioctl's have the command encoded in the lower word, - * and the size of any in or out parameters in the upper - * word. The high 2 bits of the upper word are used - * to encode the in/out status of the parameter; for now - * we restrict parameters to at most 255 bytes. - */ -#define _IOCPARM_MASK 0xff /* parameters must be < 256 bytes */ -#define _IOC_VOID 0x20000000 /* no parameters */ -#define _IOC_OUT 0x40000000 /* copy out parameters */ -#define _IOC_IN 0x80000000 /* copy in parameters */ -#define _IOC_INOUT (_IOC_IN|_IOC_OUT) - -/* the 0x20000000 is so we can distinguish new ioctl's from old */ -#define _IO(x,y) (_IOC_VOID|(x<<8)|y) -#define _IOR(x,y,t) (_IOC_OUT|((sizeof(t)&_IOCPARM_MASK)<<16)|(x<<8)|y) -#define _IORN(x,y,t) (_IOC_OUT|(((t)&_IOCPARM_MASK)<<16)|(x<<8)|y) -#define _IOW(x,y,t) (_IOC_IN|((sizeof(t)&_IOCPARM_MASK)<<16)|(x<<8)|y) -#define _IOWN(x,y,t) (_IOC_IN|(((t)&_IOCPARM_MASK)<<16)|(x<<8)|y) -/* this should be _IORW, but stdio got there first */ -#define _IOWR(x,y,t) (_IOC_INOUT|((sizeof(t)&_IOCPARM_MASK)<<16)|(x<<8)|y) -#define _IOWRN(x,y,t) (_IOC_INOUT|(((t)&_IOCPARM_MASK)<<16)|(x<<8)|y) - -/* - * Registry of ioctl characters, culled from system sources - * - * char file where defined notes - * ---- ------------------ ----- - * F sun/fbio.h - * G sun/gpio.h - * H vaxif/if_hy.h - * M sundev/mcpcmd.h *overlap* - * M sys/modem.h *overlap* - * S sys/stropts.h - * T sys/termio.h -no overlap- - * T sys/termios.h -no overlap- - * V sundev/mdreg.h - * a vaxuba/adreg.h - * d sun/dkio.h -no overlap with sys/des.h- - * d sys/des.h (possible overlap) - * d vax/dkio.h (possible overlap) - * d vaxuba/rxreg.h (possible overlap) - * f sys/filio.h - * g sunwindow/win_ioctl.h -no overlap- - * g sunwindowdev/winioctl.c !no manifest constant! -no overlap- - * h sundev/hrc_common.h - * i sys/sockio.h *overlap* - * i vaxuba/ikreg.h *overlap* - * k sundev/kbio.h - * m sundev/msio.h (possible overlap) - * m sundev/msreg.h (possible overlap) - * m sys/mtio.h (possible overlap) - * n sun/ndio.h - * p net/nit_buf.h (possible overlap) - * p net/nit_if.h (possible overlap) - * p net/nit_pf.h (possible overlap) - * p sundev/fpareg.h (possible overlap) - * p sys/sockio.h (possible overlap) - * p vaxuba/psreg.h (possible overlap) - * q sun/sqz.h - * r sys/sockio.h - * s sys/sockio.h - * t sys/ttold.h (possible overlap) - * t sys/ttycom.h (possible overlap) - * v sundev/vuid_event.h *overlap* - * v sys/vcmd.h *overlap* - * - * End of Registry - */ - -#endif /* !__sys_ioccom_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/ioctl.h b/usr/src/lib/libbc/inc/include/sys/ioctl.h deleted file mode 100644 index 1920418ae5..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/ioctl.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 1987 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Copyright (c) 1982, 1986 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -/* - * Ioctl definitions - */ - -#ifndef _sys_ioctl_h -#define _sys_ioctl_h - -#include <sys/ttychars.h> -#include <sys/ttydev.h> -#include <sys/ttold.h> - -#define TANDEM O_TANDEM -#define CBREAK O_CBREAK -#define LCASE O_LCASE -#define ECHO O_ECHO -#define CRMOD O_CRMOD -#define RAW O_RAW -#define ODDP O_ODDP -#define EVENP O_EVENP -#define ANYP O_ANYP -#define NLDELAY O_NLDELAY -#define NL0 O_NL0 -#define NL1 O_NL1 -#define NL2 O_NL2 -#define NL3 O_NL3 -#define TBDELAY O_TBDELAY -#define TAB0 O_TAB0 -#define TAB1 O_TAB1 -#define TAB2 O_TAB2 -#define XTABS O_XTABS -#define CRDELAY O_CRDELAY -#define CR0 O_CR0 -#define CR1 O_CR1 -#define CR2 O_CR2 -#define CR3 O_CR3 -#define VTDELAY O_VTDELAY -#define FF0 O_FF0 -#define FF1 O_FF1 -#define BSDELAY O_BSDELAY -#define BS0 O_BS0 -#define BS1 O_BS1 -#define ALLDELAY O_ALLDELAY -#define CRTBS O_CRTBS -#define PRTERA O_PRTERA -#define CRTERA O_CRTERA -#define TILDE O_TILDE -#define MDMBUF O_MDMBUF -#define LITOUT O_LITOUT -#define TOSTOP O_TOSTOP -#define FLUSHO O_FLUSHO -#define NOHANG O_NOHANG -#define L001000 O_L001000 -#define CRTKIL O_CRTKIL -#define PASS8 O_PASS8 -#define CTLECH O_CTLECH -#define PENDIN O_PENDIN -#define DECCTQ O_DECCTQ -#define NOFLSH O_NOFLSH - -#include <sys/filio.h> - -#include <sys/sockio.h> - -#endif /*!_sys_ioctl_h*/ diff --git a/usr/src/lib/libbc/inc/include/sys/ipc.h b/usr/src/lib/libbc/inc/include/sys/ipc.h deleted file mode 100644 index e0d545b10f..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/ipc.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* Common IPC Access Structure */ - -#ifndef _sys_ipc_h -#define _sys_ipc_h - -struct ipc_perm { - ushort uid; /* owner's user id */ - ushort gid; /* owner's group id */ - ushort cuid; /* creator's user id */ - ushort cgid; /* creator's group id */ - ushort mode; /* access modes */ - ushort seq; /* slot usage sequence number */ - key_t key; /* key */ -}; - -/* Common IPC Definitions. */ -/* Mode bits. */ -#define IPC_ALLOC 0100000 /* entry currently allocated */ -#define IPC_CREAT 0001000 /* create entry if key doesn't exist */ -#define IPC_EXCL 0002000 /* fail if key exists */ -#define IPC_NOWAIT 0004000 /* error if request must wait */ - -/* Keys. */ -#define IPC_PRIVATE (key_t)0 /* private key */ - -/* Control Commands. */ -#define IPC_RMID 0 /* remove identifier */ -#define IPC_SET 1 /* set options */ -#define IPC_STAT 2 /* get options */ - -#endif /*!_sys_ipc_h*/ diff --git a/usr/src/lib/libbc/inc/include/sys/label.h b/usr/src/lib/libbc/inc/include/sys/label.h deleted file mode 100644 index c89f157b3d..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/label.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1987 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * label - the security label structure - */ - -#ifndef _sys_label_h -#define _sys_label_h - -struct binary_label { - short sl_level; - char sl_categories[16]; - char sl_unused[14]; -}; - -typedef struct binary_label blabel_t; - -#endif /*!_sys_label_h*/ diff --git a/usr/src/lib/libbc/inc/include/sys/lock.h b/usr/src/lib/libbc/inc/include/sys/lock.h deleted file mode 100644 index 980761a50c..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/lock.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * flags for locking procs and texts - */ - -#ifndef _sys_lock_h -#define _sys_lock_h - -#define UNLOCK 0 -#define PROCLOCK 1 -#define TXTLOCK 2 -#define DATLOCK 4 - -#endif /*!_sys_lock_h*/ diff --git a/usr/src/lib/libbc/inc/include/sys/mman.h b/usr/src/lib/libbc/inc/include/sys/mman.h deleted file mode 100644 index b8bdd27db1..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/mman.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1989 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _sys_mman_h -#define _sys_mman_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Protections are chosen from these bits, or-ed together. - * Note - not all implementations literally provide all possible - * combinations. PROT_WRITE is often implemented as (PROT_READ | - * PROT_WRITE) and (PROT_EXECUTE as PROT_READ | PROT_EXECUTE). - * However, no implementation will permit a write to succeed - * where PROT_WRITE has not been set. Also, no implementation will - * allow any access to succeed where prot is specified as PROT_NONE. - */ -#define PROT_READ 0x1 /* pages can be read */ -#define PROT_WRITE 0x2 /* pages can be written */ -#define PROT_EXEC 0x4 /* pages can be executed */ - -#define PROT_NONE 0x0 /* pages cannot be accessed */ - -/* sharing types: must choose either SHARED or PRIVATE */ -#define MAP_SHARED 1 /* share changes */ -#define MAP_PRIVATE 2 /* changes are private */ -#define MAP_TYPE 0xf /* mask for share type */ - -/* other flags to mmap (or-ed in to MAP_SHARED or MAP_PRIVATE) */ -#define MAP_FIXED 0x10 /* user assigns address */ - -/* these flags not yet implemented */ -#define MAP_RENAME 0x20 /* rename private pages to file */ -#define MAP_NORESERVE 0x40 /* don't reserve needed swap area */ - -/* - * For the sake of backward object compatibility, we use the _MAP_NEW flag. - * This flag will be automatically or'ed in by the C library for all - * new mmap calls. Previous binaries with old mmap calls with continue - * to get 0 or -1 for return values. New mmap calls will get the mapped - * address as the return value if successful and -1 on errors. By default, - * new mmap calls automatically have the kernel assign the map address - * unless the MAP_FIXED flag is given. - */ -#define _MAP_NEW 0x80000000 /* user's should not need to use this */ - -#if !defined(LOCORE) && !defined(KERNEL) -#include <sys/types.h> - -/* - * Except for old binaries mmap() will return the resultant - * address of mapping on success and (caddr_t)-1 on error. - */ -extern caddr_t mmap(); -#endif /* !LOCORE && !KERNEL */ - -/* advice to madvise */ -#define MADV_NORMAL 0 /* no further special treatment */ -#define MADV_RANDOM 1 /* expect random page references */ -#define MADV_SEQUENTIAL 2 /* expect sequential page references */ -#define MADV_WILLNEED 3 /* will need these pages */ -#define MADV_DONTNEED 4 /* don't need these pages */ - -/* flags to msync */ -#define MS_ASYNC 0x1 /* return immediately */ -#define MS_INVALIDATE 0x2 /* invalidate caches */ - -/* functions to mctl */ -#define MC_SYNC 1 /* sync with backing store */ -#define MC_LOCK 2 /* lock pages in memory */ -#define MC_UNLOCK 3 /* unlock pages from memory */ -#define MC_ADVISE 4 /* give advice to management */ -#define MC_LOCKAS 5 /* lock address space in memory */ -#define MC_UNLOCKAS 6 /* unlock address space from memory */ - -/* flags to mlockall */ -#define MCL_CURRENT 0x1 /* lock current mappings */ -#define MCL_FUTURE 0x2 /* lock future mappings */ - -#endif /* !_sys_mman_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/mount.h b/usr/src/lib/libbc/inc/include/sys/mount.h deleted file mode 100644 index 5a087d4c80..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/mount.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1993 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _sys_mount_h -#define _sys_mount_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * mount options - */ - -#define M_RDONLY 0x01 /* mount fs read only */ -#define M_NOSUID 0x02 /* mount fs with setuid not allowed */ -#define M_NEWTYPE 0x04 /* use type string instead of int */ -#define M_GRPID 0x08 /* Old BSD group-id on create */ -#define M_REMOUNT 0x10 /* change options on an existing mount */ -#define M_NOSUB 0x20 /* Disallow mounts beneath this mount */ -#define M_MULTI 0x40 /* Do multi-component lookup on files */ -#define M_SYS5 0x80 /* Mount with Sys 5-specific semantics */ - -struct ufs_args { - char *fspec; -}; - - -#define _PC_LAST 9 /* highest value of any _PC_ */ -#define _BITS (8 * sizeof(short)) -#define _PC_N ((_PC_LAST + _BITS - 1) / _BITS) -#define _PC_ISSET(n, a) (a[(n) / _BITS] & (1 << ((n) % _BITS))) -#define _PC_SET(n, a) (a[(n) / _BITS] |= (1 << ((n) % _BITS))) -#define _PC_ERROR 0 - -struct pathcnf { - /* - * pathconf() information - */ - int pc_link_max; /* max links allowed */ - short pc_max_canon; /* max line len for a tty */ - short pc_max_input; /* input a tty can eat all once */ - short pc_name_max; /* max file name length (dir entry) */ - short pc_path_max; /* path name len (/x/y/z/...) */ - short pc_pipe_buf; /* size of a pipe (bytes) */ - cc_t pc_vdisable; /* safe char to turn off c_cc[i] */ - char pc_xxx; /* alignment padding; cc_t == char */ - short pc_mask[_PC_N]; /* see below */ -}; - - -struct nfs_args { - struct sockaddr_in *addr; /* file server address */ - caddr_t fh; /* File handle to be mounted */ - int flags; /* flags */ - int wsize; /* write size in bytes */ - int rsize; /* read size in bytes */ - int timeo; /* initial timeout in .1 secs */ - int retrans; /* times to retry send */ - char *hostname; /* server's hostname */ - int acregmin; /* attr cache file min secs */ - int acregmax; /* attr cache file max secs */ - int acdirmin; /* attr cache dir min secs */ - int acdirmax; /* attr cache dir max secs */ - char *netname; /* server's netname */ - struct pathcnf *pathconf; /* static pathconf kludge */ -}; - -/* - * NFS mount option flags - */ -#define NFSMNT_SOFT 0x001 /* soft mount (hard is default) */ -#define NFSMNT_WSIZE 0x002 /* set write size */ -#define NFSMNT_RSIZE 0x004 /* set read size */ -#define NFSMNT_TIMEO 0x008 /* set initial timeout */ -#define NFSMNT_RETRANS 0x010 /* set number of request retrys */ -#define NFSMNT_HOSTNAME 0x020 /* set hostname for error printf */ -#define NFSMNT_INT 0x040 /* allow interrupts on hard mount */ -#define NFSMNT_NOAC 0x080 /* don't cache attributes */ -#define NFSMNT_ACREGMIN 0x0100 /* set min secs for file attr cache */ -#define NFSMNT_ACREGMAX 0x0200 /* set max secs for file attr cache */ -#define NFSMNT_ACDIRMIN 0x0400 /* set min secs for dir attr cache */ -#define NFSMNT_ACDIRMAX 0x0800 /* set max secs for dir attr cache */ -#define NFSMNT_SECURE 0x1000 /* secure mount */ -#define NFSMNT_NOCTO 0x2000 /* no close-to-open consistency */ -#define NFSMNT_POSIX 0x4000 /* static pathconf kludge info */ - -#endif /* !_sys_mount_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/msg.h b/usr/src/lib/libbc/inc/include/sys/msg.h deleted file mode 100644 index e5f73a2686..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/msg.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1987 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ - -#ifndef _sys_msg_h -#define _sys_msg_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * IPC Message Facility. - */ - -/* - * Message Operation Flags. - */ -#define MSG_NOERROR 010000 /* no error if big message */ - -/* - * Structure Definitions. - */ - -/* - * There is one msg queue id data structure for each q in the system. - */ - -struct msqid_ds { - struct ipc_perm msg_perm; /* operation permission struct */ - struct msg *msg_first; /* ptr to first message on q */ - struct msg *msg_last; /* ptr to last message on q */ - ushort msg_cbytes; /* current # bytes on q */ - ushort msg_qnum; /* # of messages on q */ - ushort msg_qbytes; /* max # of bytes on q */ - ushort msg_lspid; /* pid of last msgsnd */ - ushort msg_lrpid; /* pid of last msgrcv */ - time_t msg_stime; /* last msgsnd time */ - time_t msg_rtime; /* last msgrcv time */ - time_t msg_ctime; /* last change time */ -}; - -/* - * User message buffer template for msgsnd and msgrcv system calls. - */ - -/* HACK :: change the name when compiling the kernel to avoid conflicts */ -struct msgbuf { - long mtype; /* message type */ - char mtext[1]; /* message text */ -}; - -/* - * There is one msg structure for each message that may be in the system. - */ - -struct msg { - struct msg *msg_next; /* ptr to next message on q */ - long msg_type; /* message type */ - ushort msg_ts; /* message text size */ - ushort msg_spot; /* message text map address */ -}; - -#endif /* !_sys_msg_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/msio.h b/usr/src/lib/libbc/inc/include/sys/msio.h deleted file mode 100644 index 2fdc4a1795..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/msio.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _sundev_msio_h -#define _sundev_msio_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Mouse related ioctls - */ -#include <sys/ioccom.h> - -typedef struct { - int jitter_thresh; - int speed_law; - int speed_limit; -} Ms_parms; - -#define MSIOGETPARMS _IOR('m', 2, Ms_parms) /* get / set jitter, speed */ -#define MSIOSETPARMS _IOW('m', 3, Ms_parms) /* law, or speed limit */ - -#endif /* !_sundev_msio_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/param.h b/usr/src/lib/libbc/inc/include/sys/param.h deleted file mode 100644 index 4ac91fcb79..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/param.h +++ /dev/null @@ -1,207 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1989 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifndef __sys_param_h -#define __sys_param_h - -/* - * Machine type dependent parameters. - */ -#include <machine/param.h> - -#define NPTEPG (NBPG/(sizeof (struct pte))) - -/* - * Machine-independent constants - */ -#define NMOUNT 40 /* est. of # mountable fs for quota calc */ -#define MSWAPX 15 /* pseudo mount table index for swapdev */ -#define MAXUPRC 25 /* max processes per user */ -#define NOFILE 256 /* max open files per process */ -#define MAXPID 30000 /* max process id */ -#define MAXUID 0xfffd /* max user id (from 60000) */ -#define MAXLINK 32767 /* max links */ -#define CANBSIZ 256 /* max size of typewriter line */ -#define VDISABLE 0 /* use this to turn off c_cc[i] */ -#define PIPE_BUF 4096 /* pipe buffer size */ -#ifndef KERNEL -/* - * HZ defines the ticks/second for system calls, eg, times(), which - * return values just in ticks; but not for getrusage(), which returns - * values in ticks*pages. HZ *must* be 60 for compatibility reasons. - */ -#define HZ 60 -#endif -#define NCARGS 0x100000 /* (absolute) max # characters in exec arglist */ -/* If NGROUPS changes, change <sys/limits.h> NGROUPS_MAX at the same time. */ -#define NGROUPS 16 /* max number groups */ - -#define NOGROUP -1 /* marker for empty group set member */ - -#ifdef KERNEL -/* - * Priorities - */ -#define PMASK 0177 -#define PCATCH 0400 /* return if sleep interrupted, don't longjmp */ -#define PSWP 0 -#define PINOD 10 -#define PAMAP 10 -#define PRIBIO 20 -#define PRIUBA 24 -#define PZERO 25 -#define PPIPE 26 -#define PVFS 27 -#define PWAIT 30 -#define PLOCK 35 -#define PSLEP 40 - -#ifdef VPIX -#define PV86 41 -#endif - -#define PFLCK 42 /* File/Record lock */ - -#define PUSER 50 - -#define NZERO 20 -#endif /* KERNEL */ - -/* - * Signals - */ -#include <sys/signal.h> - -#define ISSIG(p, flag) \ - ((p)->p_sig && ((p)->p_flag&STRC || \ - ((p)->p_sig &~ ((p)->p_sigignore | (p)->p_sigmask))) && issig(flag)) - -#define NBPW sizeof (int) /* number of bytes in an integer */ - -#ifndef NULL -#define NULL 0 -#endif -#define CMASK 0 /* default mask for file creation */ -#define NODEV (dev_t)(-1) - -#ifndef INTRLVE -/* macros replacing interleaving functions */ -#define dkblock(bp) ((bp)->b_blkno) -#define dkunit(bp) (minor((bp)->b_dev) >> 3) -#endif - -#define CBSIZE 28 /* number of chars in a clist block */ -#define CROUND 0x1F /* clist rounding; sizeof (int *) + CBSIZE-1 */ - -#if !defined(LOCORE) || !defined(KERNEL) -#include <sys/types.h> -#endif - -/* - * File system parameters and macros. - * - * The file system is made out of blocks of at most MAXBSIZE units, - * with smaller units (fragments) only in the last direct block. - * MAXBSIZE primarily determines the size of buffers in the buffer - * pool. It may be made larger without any effect on existing - * file systems; however making it smaller make make some file - * systems unmountable. - * - * Note that the blocked devices are assumed to have DEV_BSIZE - * "sectors" and that fragments must be some multiple of this size. - */ -#define MAXBSIZE 8192 -#define DEV_BSIZE 512 -#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ -#define MAXFRAG 8 - -#define btodb(bytes) /* calculates (bytes / DEV_BSIZE) */ \ - ((unsigned)(bytes) >> DEV_BSHIFT) -#define dbtob(db) /* calculates (db * DEV_BSIZE) */ \ - ((unsigned)(db) << DEV_BSHIFT) - -/* - * Map a ``block device block'' to a file system block. - * XXX - this is currently only being used for tape drives. - */ -#define BLKDEV_IOSIZE 2048 -#define bdbtofsb(bn) ((bn) / (BLKDEV_IOSIZE/DEV_BSIZE)) - -/* - * MAXPATHLEN defines the longest permissable path length, - * including the terminating null, after expanding symbolic links. - * MAXSYMLINKS defines the maximum number of symbolic links - * that may be expanded in a path name. It should be set high - * enough to allow all legitimate uses, but halt infinite loops - * reasonably quickly. - */ -#define MAXPATHLEN 1024 -#define MAXSYMLINKS 20 - -/* - * bit map related macros - */ -#define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY)) -#define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY))) -#define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY))) -#define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0) - -/* - * Macros for fast min/max. - */ -#ifndef MIN -#define MIN(a,b) (((a)<(b))?(a):(b)) -#endif -#ifndef MAX -#define MAX(a,b) (((a)>(b))?(a):(b)) -#endif - -/* - * Macros for counting and rounding. - */ -#ifdef sun386 -#define howmany(x, y) ((((u_int)(x))+(((u_int)(y))-1))/((u_int)(y))) -#define roundup(x, y) ((((u_int)(x)+((u_int)(y)-1))/(u_int)(y))*(u_int)(y)) -#else -#define howmany(x, y) (((x)+((y)-1))/(y)) -#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) -#endif - -/* - * Scale factor for scaled integers used to count - * %cpu time and load averages. - */ -#define FSHIFT 8 /* bits to right of fixed binary point */ -#define FSCALE (1<<FSHIFT) - -/* - * Maximum size of hostname recognized and stored in the kernel. - */ -#define MAXHOSTNAMELEN 64 - -#endif /* !__sys_param_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/resource.h b/usr/src/lib/libbc/inc/include/sys/resource.h deleted file mode 100644 index 33faf90733..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/resource.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1989 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifndef _sys_resource_h -#define _sys_resource_h - -/* - * Process priority specifications to get/setpriority. - */ -#define PRIO_MIN -20 -#define PRIO_MAX 20 - -#define PRIO_PROCESS 0 -#define PRIO_PGRP 1 -#define PRIO_USER 2 - -/* - * Resource utilization information. - */ - -#define RUSAGE_SELF 0 -#define RUSAGE_CHILDREN -1 - -struct rusage { - struct timeval ru_utime; /* user time used */ - struct timeval ru_stime; /* system time used */ - long ru_maxrss; -#define ru_first ru_ixrss - long ru_ixrss; /* XXX: 0 */ - long ru_idrss; /* XXX: sum of rm_asrss */ - long ru_isrss; /* XXX: 0 */ - long ru_minflt; /* any page faults not requiring I/O */ - long ru_majflt; /* any page faults requiring I/O */ - long ru_nswap; /* swaps */ - long ru_inblock; /* block input operations */ - long ru_oublock; /* block output operations */ - long ru_msgsnd; /* messages sent */ - long ru_msgrcv; /* messages received */ - long ru_nsignals; /* signals received */ - long ru_nvcsw; /* voluntary context switches */ - long ru_nivcsw; /* involuntary " */ -#define ru_last ru_nivcsw -}; - -/* - * Resource limits - */ -#define RLIMIT_CPU 0 /* cpu time in milliseconds */ -#define RLIMIT_FSIZE 1 /* maximum file size */ -#define RLIMIT_DATA 2 /* data size */ -#define RLIMIT_STACK 3 /* stack size */ -#define RLIMIT_CORE 4 /* core file size */ -#define RLIMIT_RSS 5 /* resident set size */ -#define RLIMIT_NOFILE 6 /* maximum descriptor index + 1 */ - -#define RLIM_NLIMITS 7 /* number of resource limits */ - -#define RLIM_INFINITY 0x7fffffff - -struct rlimit { - int rlim_cur; /* current (soft) limit */ - int rlim_max; /* maximum value for rlim_cur */ -}; - -#endif /*!_sys_resource_h*/ diff --git a/usr/src/lib/libbc/inc/include/sys/sem.h b/usr/src/lib/libbc/inc/include/sys/sem.h deleted file mode 100644 index be304cc724..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/sem.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1986 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ - -#ifndef _sys_sem_h -#define _sys_sem_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * IPC Semaphore Facility. - */ - -/* - * Semaphore Operation Flags. - */ -#define SEM_UNDO 010000 /* set up adjust on exit entry */ - -/* - * Semctl Command Definitions. - */ - -#define GETNCNT 3 /* get semncnt */ -#define GETPID 4 /* get sempid */ -#define GETVAL 5 /* get semval */ -#define GETALL 6 /* get all semval's */ -#define GETZCNT 7 /* get semzcnt */ -#define SETVAL 8 /* set semval */ -#define SETALL 9 /* set all semval's */ - -/* - * Structure Definitions. - */ - -/* - * There is one semaphore id data structure for each set of semaphores - * in the system. - */ - -struct semid_ds { - struct ipc_perm sem_perm; /* operation permission struct */ - struct sem *sem_base; /* ptr to first semaphore in set */ - ushort sem_nsems; /* # of semaphores in set */ - time_t sem_otime; /* last semop time */ - time_t sem_ctime; /* last change time */ -}; - -/* - * There is one semaphore structure for each semaphore in the system. - */ - -struct sem { - ushort semval; /* semaphore text map address */ - short sempid; /* pid of last operation */ - ushort semncnt; /* # awaiting semval > cval */ - ushort semzcnt; /* # awaiting semval = 0 */ -}; - -/* - * User semaphore template for semop system calls. - */ - -struct sembuf { - short sem_num; /* semaphore # */ - short sem_op; /* semaphore operation */ - short sem_flg; /* operation flags */ -}; - -/* - * 'arg' argument template for semctl system calls. - */ -union semun { - int val; /* value for SETVAL */ - struct semid_ds *buf; /* buffer for IPC_STAT & IPC_SET */ - ushort *array; /* array for GETALL & SETALL */ -}; - -#endif /* !_sys_sem_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/setjmp.h b/usr/src/lib/libbc/inc/include/sys/setjmp.h deleted file mode 100644 index 1954bdd08c..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/setjmp.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* from UCB 4.1 83/05/03 */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifndef __sparc_setjmp_h -#define __sparc_setjmp_h - -/* - * onsstack,sigmask,sp,pc,npc,psr,g1,o0,wbcnt (sigcontext). - * All else recovered by under/over(flow) handling. - */ -#define _JBLEN 9 - -typedef int jmp_buf[_JBLEN]; - -/* - * One extra word for the "signal mask saved here" flag. - */ -typedef int sigjmp_buf[_JBLEN+1]; - -int setjmp(/* jmp_buf env */); -int _setjmp(/* jmp_buf env */); -int sigsetjmp(/* sigjmp_buf env, int savemask */); -void longjmp(/* jmp_buf env, int val */); -void _longjmp(/* jmp_buf env, int val */); -void siglongjmp(/* sigjmp_buf env, int val */); - -/* - * Routines that call setjmp have strange control flow graphs, - * since a call to a routine that calls resume/longjmp will eventually - * return at the setjmp site, not the original call site. This - * utterly wrecks control flow analysis. - */ -#pragma unknown_control_flow(sigsetjmp, setjmp, _setjmp) - -#endif /* !__sparc_setjmp_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/shm.h b/usr/src/lib/libbc/inc/include/sys/shm.h deleted file mode 100644 index bf3bf80eac..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/shm.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ - -#ifndef _sys_shm_h -#define _sys_shm_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * IPC Shared Memory Facility. - */ - -#include <sys/param.h> -/* #include <machine/mmu.h> */ - -/* - * Shared Memory Operation Flags. - */ - -#define SHM_RDONLY 010000 /* attach read-only (else read-write) */ -#define SHM_RND 020000 /* round attach address to SHMLBA */ - -/* - * Shmctl Command Definitions. - */ - -#define SHM_LOCK 3 /* Lock segment in core */ -#define SHM_UNLOCK 4 /* Unlock segment */ - -/* - * Implementation Constants. - */ -#define SHMLBA PAGESIZE /* segment low boundary address multiple */ - /* (SHMLBA must be a power of 2) */ - -/* - * Structure Definitions. - */ - -/* - * There is a shared mem id data structure for each segment in the system. - */ - -struct shmid_ds { - struct ipc_perm shm_perm; /* operation permission struct */ - uint shm_segsz; /* size of segment in bytes */ - ushort shm_lpid; /* pid of last shmop */ - ushort shm_cpid; /* pid of creator */ - ushort shm_nattch; /* number of current attaches */ - time_t shm_atime; /* last shmat time */ - time_t shm_dtime; /* last shmdt time */ - time_t shm_ctime; /* last change time */ - struct anon_map *shm_amp; /* segment anon_map pointer */ -}; - -#endif /* !_sys_shm_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/signal.h b/usr/src/lib/libbc/inc/include/sys/signal.h deleted file mode 100644 index 586222b541..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/signal.h +++ /dev/null @@ -1,236 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * Copyright (c) 1982 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#ifndef __sys_signal_h -#define __sys_signal_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <vm/faultcode.h> -#define NSIG 32 - -/* - * If any signal defines (SIG*) are added, deleted, or changed, the same - * changes must be made in /usr/include/signal.h as well. - */ -#define SIGHUP 1 /* hangup */ -#define SIGINT 2 /* interrupt */ -#define SIGQUIT 3 /* quit */ -#define SIGILL 4 /* illegal instruction (not reset when caught) */ - -#define ILL_STACK 0x00 /* bad stack */ -#define ILL_ILLINSTR_FAULT 0x02 /* illegal instruction fault */ -#define ILL_PRIVINSTR_FAULT 0x03 /* privileged instruction fault */ -/* codes from 0x80 to 0xff are software traps */ -#define ILL_TRAP_FAULT(n) ((n)+0x80) /* trap n fault */ - -#define SIGTRAP 5 /* trace trap (not reset when caught) */ -#define SIGIOT 6 /* IOT instruction */ -#define SIGABRT 6 /* used by abort, replace SIGIOT in the future */ -#define SIGEMT 7 /* EMT instruction */ - -#define EMT_TAG 0x0a /* tag overflow */ - -#define SIGFPE 8 /* floating point exception */ - -#define FPE_INTOVF_TRAP 0x1 /* integer overflow */ -#define FPE_STARTSIG_TRAP 0x2 /* process using fp */ -#define FPE_INTDIV_TRAP 0x14 /* integer divide by zero */ -#define FPE_FLTINEX_TRAP 0xc4 /* [floating inexact result] */ -#define FPE_FLTDIV_TRAP 0xc8 /* [floating divide by zero] */ -#define FPE_FLTUND_TRAP 0xcc /* [floating underflow] */ -#define FPE_FLTOPERR_TRAP 0xd0 /* [floating operand error] */ -#define FPE_FLTOVF_TRAP 0xd4 /* [floating overflow] */ - -#define SIGKILL 9 /* kill (cannot be caught or ignored) */ -/* - * The codes for SIGBUS and SIGSEGV are described in <vm/faultcode.h> - */ -#define SIGBUS 10 /* bus error */ -#define BUS_HWERR FC_HWERR /* misc hardware error (e.g. timeout) */ -#define BUS_ALIGN FC_ALIGN /* hardware alignment error */ -#define BUS_OBJERR FC_OBJERR /* object returned errno value */ -/* - * The BUS_CODE(code) will be one of the above. In the BUS_OBJERR case, - * doing a BUS_ERRNO(code) gives an errno value reported by the underlying - * file object mapped at the fault address. Note that this appears to be - * duplicated with the segmentation fault case below -- unfortunate, since - * the specification has always claimed that such errors produce SIGBUS. - * The segmentation cases are left defined as a transition aid. - */ -#define BUS_CODE(C) FC_CODE(C) -#define BUS_ERRNO(C) FC_ERRNO(C) -#define SIGSEGV 11 /* segmentation violation */ -#define SEGV_NOMAP FC_NOMAP /* no mapping at the fault address */ -#define SEGV_PROT FC_PROT /* access exceeded protections */ -#define SEGV_OBJERR FC_OBJERR /* object returned errno value */ -/* - * The SEGV_CODE(code) will be SEGV_NOMAP, SEGV_PROT, or SEGV_OBJERR. - * In the SEGV_OBJERR case, doing a SEGV_ERRNO(code) gives an errno value - * reported by the underlying file object mapped at the fault address. - */ -#define SEGV_CODE(C) FC_CODE(C) -#define SEGV_ERRNO(C) FC_ERRNO(C) -#define SIGSYS 12 /* bad argument to system call */ -#define SIGPIPE 13 /* write on a pipe with no one to read it */ -#define SIGALRM 14 /* alarm clock */ -#define SIGTERM 15 /* software termination signal from kill */ -#define SIGURG 16 /* urgent condition on IO channel */ -#define SIGSTOP 17 /* sendable stop signal not from tty */ -#define SIGTSTP 18 /* stop signal from tty */ -#define SIGCONT 19 /* continue a stopped process */ -#define SIGCHLD 20 /* to parent on child stop or exit */ -#define SIGCLD 20 /* System V name for SIGCHLD */ -#define SIGTTIN 21 /* to readers pgrp upon background tty read */ -#define SIGTTOU 22 /* like TTIN for output if (tp->t_local<OSTOP) */ -#define SIGIO 23 /* input/output possible signal */ -#define SIGPOLL SIGIO /* System V name for SIGIO */ -#define SIGXCPU 24 /* exceeded CPU time limit */ -#define SIGXFSZ 25 /* exceeded file size limit */ -#define SIGVTALRM 26 /* virtual time alarm */ -#define SIGPROF 27 /* profiling time alarm */ -#define SIGWINCH 28 /* window changed */ -#define SIGLOST 29 /* resource lost (eg, record-lock lost) */ -#define SIGUSR1 30 /* user defined signal 1 */ -#define SIGUSR2 31 /* user defined signal 2 */ -/* - * If addr cannot be computed it is set to SIG_NOADDR. - */ -#define SIG_NOADDR ((char *)~0) - -#if !defined(KERNEL) && !defined(LOCORE) -void (*signal())(); -/* - * Define BSD 4.1 reliable signals for SVID compatibility. - * These functions may go away in a future release. - */ -void (*sigset())(); -int sighold(); -int sigrelse(); -int sigignore(); -#endif /* !KERNEL && !LOCORE */ - -#ifndef LOCORE -/* - * Signal vector "template" used in sigvec call. - */ -struct sigvec { - void (*sv_handler)(); /* signal handler */ - int sv_mask; /* signal mask to apply */ - int sv_flags; /* see signal options below */ -}; -#define SV_ONSTACK 0x0001 /* take signal on signal stack */ -#define SV_INTERRUPT 0x0002 /* do not restart system on signal return */ -#define SV_RESETHAND 0x0004 /* reset signal handler to SIG_DFL when signal taken */ -/* - * If any SA_NOCLDSTOP or SV_NOCLDSTOP is change, the same - * changes must be made in /usr/include/signal.h as well. - */ -#define SV_NOCLDSTOP 0x0008 /* don't send a SIGCHLD on child stop */ -#define SA_ONSTACK SV_ONSTACK -#define SA_INTERRUPT SV_INTERRUPT -#define SA_RESETHAND SV_RESETHAND - -#define SA_NOCLDSTOP SV_NOCLDSTOP -#define sv_onstack sv_flags /* isn't compatibility wonderful! */ - -/* - * Structure used in sigstack call. - */ -struct sigstack { - char *ss_sp; /* signal stack pointer */ - int ss_onstack; /* current status */ -}; - -/* - * Information pushed on stack when a signal is delivered. - * This is used by the kernel to restore state following - * execution of the signal handler. It is also made available - * to the handler to allow it to properly restore state if - * a non-standard exit is performed. - */ -struct sigcontext { - int sc_onstack; /* sigstack state to restore */ - int sc_mask; /* signal mask to restore */ -#define SPARC_MAXREGWINDOW 31 /* max usable windows in sparc */ - int sc_sp; /* sp to restore */ - int sc_pc; /* pc to retore */ - int sc_npc; /* next pc to restore */ - int sc_psr; /* psr to restore */ - int sc_g1; /* register that must be restored */ - int sc_o0; - int sc_wbcnt; /* number of outstanding windows */ - char *sc_spbuf[SPARC_MAXREGWINDOW]; /* sp's for each wbuf */ - int sc_wbuf[SPARC_MAXREGWINDOW][16]; /* window save buf */ -}; -#endif /* !LOCORE */ - -#define BADSIG (void (*)())-1 - -/* - * If SIG_ERR, SIG_DFL, SIG_IGN, or SIG_HOLD are changed, the same changes - * must be made in /usr/include/signal.h as well. - */ -#define SIG_ERR (void (*)())-1 -#define SIG_DFL (void (*)())0 -#define SIG_IGN (void (*)())1 - -#define SIG_HOLD (void (*)())3 - -/* - * Macro for converting signal number to a mask suitable for sigblock(). - */ -#define sigmask(m) (1 << ((m)-1)) -/* - * signals that can't caught, blocked, or ignored - */ - -/* - * If SIG_BLOCK, SIG_UNBLOCK, or SIG_SETMASK are changed, the same changes - * must be made in /usr/include/signal.h as well. - */ -#define SIG_BLOCK 0x0001 -#define SIG_UNBLOCK 0x0002 -#define SIG_SETMASK 0x0004 - -#if !defined(LOCORE) && !defined(KERNEL) - -/* - * If changes are made to sigset_t or struct sigaction, the same changes - * must be made in /usr/include/signal.h as well. - */ -#include <sys/stdtypes.h> - -struct sigaction { - void (*sa_handler)(); - sigset_t sa_mask; - int sa_flags; -}; - -/* - * If changes are made to the function prototypes, the same changes - * must be made in /usr/include/signal.h as well. - */ -void (*signal())(); -int kill(/* pid_t p, int sig */); -int sigaction(/* int signo, - struct sigaction *act, struct sigaction *oldact */); -int sigaddset(/* sigset_t *mask, int signo */); -int sigdelset(/* sigset_t *mask, int signo */); -int sigemptyset(/* sigset_t *mask */); -int sigfillset(/* sigset_t *mask */); -int sigismember(/* sigset_t *mask, int signo */); -int sigpending(/* sigset_t *set */); -int sigprocmask(/* int how, sigset_t *set, *oldset */); -int sigsuspend(/* sigset_t *mask */); - -#endif /* !LOCORE && !KERNEL */ -#endif /* !__sys_signal_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/socket.h b/usr/src/lib/libbc/inc/include/sys/socket.h deleted file mode 100644 index 6607721e62..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/socket.h +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright 1989 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * Copyright (c) 1982, 1985, 1986 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#ifndef _sys_socket_h -#define _sys_socket_h - -/* - * Definitions related to sockets: types, address families, options. - */ - -/* - * Types - */ -#define SOCK_STREAM 1 /* stream socket */ -#define SOCK_DGRAM 2 /* datagram socket */ -#define SOCK_RAW 3 /* raw-protocol interface */ -#define SOCK_RDM 4 /* reliably-delivered message */ -#define SOCK_SEQPACKET 5 /* sequenced packet stream */ - -/* - * Option flags per-socket. - */ -#define SO_DEBUG 0x0001 /* turn on debugging info recording */ -#define SO_ACCEPTCONN 0x0002 /* socket has had listen() */ -#define SO_REUSEADDR 0x0004 /* allow local address reuse */ -#define SO_KEEPALIVE 0x0008 /* keep connections alive */ -#define SO_DONTROUTE 0x0010 /* just use interface addresses */ -#define SO_BROADCAST 0x0020 /* permit sending of broadcast msgs */ -#define SO_USELOOPBACK 0x0040 /* bypass hardware when possible */ -#define SO_LINGER 0x0080 /* linger on close if data present */ -#define SO_OOBINLINE 0x0100 /* leave received OOB data in line */ -/* - * N.B.: The following definition is present only for compatibility - * with release 3.0. It will disappear in later releases. - */ -#define SO_DONTLINGER (~SO_LINGER) /* ~SO_LINGER */ - -/* - * Additional options, not kept in so_options. - */ -#define SO_SNDBUF 0x1001 /* send buffer size */ -#define SO_RCVBUF 0x1002 /* receive buffer size */ -#define SO_SNDLOWAT 0x1003 /* send low-water mark */ -#define SO_RCVLOWAT 0x1004 /* receive low-water mark */ -#define SO_SNDTIMEO 0x1005 /* send timeout */ -#define SO_RCVTIMEO 0x1006 /* receive timeout */ -#define SO_ERROR 0x1007 /* get error status and clear */ -#define SO_TYPE 0x1008 /* get socket type */ - -/* - * Structure used for manipulating linger option. - */ -struct linger { - int l_onoff; /* option on/off */ - int l_linger; /* linger time */ -}; - -/* - * Level number for (get/set)sockopt() to apply to socket itself. - */ -#define SOL_SOCKET 0xffff /* options for socket level */ - -/* - * Address families. - */ -#define AF_UNSPEC 0 /* unspecified */ -#define AF_UNIX 1 /* local to host (pipes, portals) */ -#define AF_INET 2 /* internetwork: UDP, TCP, etc. */ -#define AF_IMPLINK 3 /* arpanet imp addresses */ -#define AF_PUP 4 /* pup protocols: e.g. BSP */ -#define AF_CHAOS 5 /* mit CHAOS protocols */ -#define AF_NS 6 /* XEROX NS protocols */ -#define AF_NBS 7 /* nbs protocols */ -#define AF_ECMA 8 /* european computer manufacturers */ -#define AF_DATAKIT 9 /* datakit protocols */ -#define AF_CCITT 10 /* CCITT protocols, X.25 etc */ -#define AF_SNA 11 /* IBM SNA */ -#define AF_DECnet 12 /* DECnet */ -#define AF_DLI 13 /* Direct data link interface */ -#define AF_LAT 14 /* LAT */ -#define AF_HYLINK 15 /* NSC Hyperchannel */ -#define AF_APPLETALK 16 /* Apple Talk */ - -#define AF_NIT 17 /* Network Interface Tap */ -#define AF_802 18 /* IEEE 802.2, also ISO 8802 */ -#define AF_OSI 19 /* umbrella for all families used - * by OSI (e.g. protosw lookup) */ -#define AF_X25 20 /* CCITT X.25 in particular */ -#define AF_OSINET 21 /* AFI = 47, IDI = 4 */ -#define AF_GOSIP 22 /* U.S. Government OSI */ - -#define AF_MAX 21 - -/* - * Structure used by kernel to store most - * addresses. - */ -struct sockaddr { - u_short sa_family; /* address family */ - char sa_data[14]; /* up to 14 bytes of direct address */ -}; - -/* - * Structure used by kernel to pass protocol - * information in raw sockets. - */ -struct sockproto { - u_short sp_family; /* address family */ - u_short sp_protocol; /* protocol */ -}; - -/* - * Protocol families, same as address families for now. - */ -#define PF_UNSPEC AF_UNSPEC -#define PF_UNIX AF_UNIX -#define PF_INET AF_INET -#define PF_IMPLINK AF_IMPLINK -#define PF_PUP AF_PUP -#define PF_CHAOS AF_CHAOS -#define PF_NS AF_NS -#define PF_NBS AF_NBS -#define PF_ECMA AF_ECMA -#define PF_DATAKIT AF_DATAKIT -#define PF_CCITT AF_CCITT -#define PF_SNA AF_SNA -#define PF_DECnet AF_DECnet -#define PF_DLI AF_DLI -#define PF_LAT AF_LAT -#define PF_HYLINK AF_HYLINK -#define PF_APPLETALK AF_APPLETALK -#define PF_NIT AF_NIT -#define PF_802 AF_802 -#define PF_OSI AF_OSI -#define PF_X25 AF_X25 -#define PF_OSINET AF_OSINET -#define PF_GOSIP AF_GOSIP - -#define PF_MAX AF_MAX - -/* - * Maximum queue length specifiable by listen. - */ -#define SOMAXCONN 5 - -/* - * Message header for recvmsg and sendmsg calls. - */ -struct msghdr { - caddr_t msg_name; /* optional address */ - int msg_namelen; /* size of address */ - struct iovec *msg_iov; /* scatter/gather array */ - int msg_iovlen; /* # elements in msg_iov */ - caddr_t msg_accrights; /* access rights sent/received */ - int msg_accrightslen; -}; - -#define MSG_OOB 0x1 /* process out-of-band data */ -#define MSG_PEEK 0x2 /* peek at incoming message */ -#define MSG_DONTROUTE 0x4 /* send without using routing tables */ - -#endif /*!_sys_socket_h*/ diff --git a/usr/src/lib/libbc/inc/include/sys/socketvar.h b/usr/src/lib/libbc/inc/include/sys/socketvar.h deleted file mode 100644 index 35e8677e20..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/socketvar.h +++ /dev/null @@ -1,176 +0,0 @@ -/* from UCB 7.3 12/30/87 */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Copyright (c) 1982, 1986 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#ifndef _sys_socketvar_h -#define _sys_socketvar_h - -/* - * Kernel structure per socket. - * Contains send and receive buffer queues, - * handle on protocol and pointer to protocol - * private data and error information. - */ -struct socket { - short so_type; /* generic type, see socket.h */ - short so_options; /* from socket call, see socket.h */ - short so_linger; /* time to linger while closing */ - short so_state; /* internal state flags SS_*, below */ - caddr_t so_pcb; /* protocol control block */ - struct protosw *so_proto; /* protocol handle */ -/* - * Variables for connection queueing. - * Socket where accepts occur is so_head in all subsidiary sockets. - * If so_head is 0, socket is not related to an accept. - * For head socket so_q0 queues partially completed connections, - * while so_q is a queue of connections ready to be accepted. - * If a connection is aborted and it has so_head set, then - * it has to be pulled out of either so_q0 or so_q. - * We allow connections to queue up based on current queue lengths - * and limit on number of queued connections for this socket. - */ - struct socket *so_head; /* back pointer to accept socket */ - struct socket *so_q0; /* queue of partial connections */ - struct socket *so_q; /* queue of incoming connections */ - short so_q0len; /* partials on so_q0 */ - short so_qlen; /* number of connections on so_q */ - short so_qlimit; /* max number queued connections */ - short so_timeo; /* connection timeout */ - u_short so_error; /* error affecting connection */ - short so_pgrp; /* pgrp for signals */ - u_long so_oobmark; /* chars to oob mark */ -/* - * Variables for socket buffering. - */ - struct sockbuf { - u_long sb_cc; /* actual chars in buffer */ - u_long sb_hiwat; /* max actual char count */ - u_long sb_mbcnt; /* chars of mbufs used */ - u_long sb_mbmax; /* max chars of mbufs to use */ - u_long sb_lowat; /* low water mark (not used yet) */ - struct mbuf *sb_mb; /* the mbuf chain */ - struct proc *sb_sel; /* process selecting read/write */ - short sb_timeo; /* timeout (not used yet) */ - short sb_flags; /* flags, see below */ - } so_rcv, so_snd; -#define SB_MAX (64*1024) /* max chars in sockbuf */ -#define SB_LOCK 0x01 /* lock on data queue (so_rcv only) */ -#define SB_WANT 0x02 /* someone is waiting to lock */ -#define SB_WAIT 0x04 /* someone is waiting for data/space */ -#define SB_SEL 0x08 /* buffer is selected */ -#define SB_COLL 0x10 /* collision selecting */ -/* - * Hooks for alternative wakeup strategies. - * These are used by kernel subsystems wishing to access the socket - * abstraction. If so_wupfunc is nonnull, it is called in place of - * wakeup any time that wakeup would otherwise be called with an - * argument whose value is an address lying within a socket structure. - */ - struct wupalt *so_wupalt; -}; - -struct wupalt { - int (*wup_func)(); /* function to call instead of wakeup */ - caddr_t wup_arg; /* argument for so_wupfunc */ - /* - * Other state information here, for example, for a stream - * connected to a socket. - */ -}; - -/* - * Socket state bits. - */ -#define SS_NOFDREF 0x001 /* no file table ref any more */ -#define SS_ISCONNECTED 0x002 /* socket connected to a peer */ -#define SS_ISCONNECTING 0x004 /* in process of connecting to peer */ -#define SS_ISDISCONNECTING 0x008 /* in process of disconnecting */ -#define SS_CANTSENDMORE 0x010 /* can't send more data to peer */ -#define SS_CANTRCVMORE 0x020 /* can't receive more data from peer */ -#define SS_RCVATMARK 0x040 /* at mark on input */ - -#define SS_PRIV 0x080 /* privileged for broadcast, raw... */ -#define SS_NBIO 0x100 /* non-blocking ops */ -#define SS_ASYNC 0x200 /* async i/o notify */ -#define SS_PIPE 0x400 /* pipe behavior for POSIX & SVID */ - - -/* - * Macros for sockets and socket buffering. - */ - -/* how much space is there in a socket buffer (so->so_snd or so->so_rcv) */ -#define sbspace(sb) \ - (MIN((int)((sb)->sb_hiwat - (sb)->sb_cc),\ - (int)((sb)->sb_mbmax - (sb)->sb_mbcnt))) - -/* do we have to send all at once on a socket? */ -#define sosendallatonce(so) \ - ((so)->so_proto->pr_flags & PR_ATOMIC) - -/* can we read something from so? */ -#define soreadable(so) \ - ((so)->so_rcv.sb_cc || ((so)->so_state & SS_CANTRCVMORE) || \ - (so)->so_qlen || (so)->so_error) - -/* can we write something to so? */ -#define sowriteable(so) \ - (sbspace(&(so)->so_snd) > 0 && \ - (((so)->so_state&SS_ISCONNECTED) || \ - ((so)->so_proto->pr_flags&PR_CONNREQUIRED)==0) || \ - ((so)->so_state & SS_CANTSENDMORE) || \ - (so)->so_error) - -/* adjust counters in sb reflecting allocation of m */ -#define sballoc(sb, m) { \ - (sb)->sb_cc += (m)->m_len; \ - (sb)->sb_mbcnt += MSIZE; \ - if ((m)->m_off > MMAXOFF) \ - (sb)->sb_mbcnt += MCLBYTES; \ -} - -/* adjust counters in sb reflecting freeing of m */ -#define sbfree(sb, m) { \ - (sb)->sb_cc -= (m)->m_len; \ - (sb)->sb_mbcnt -= MSIZE; \ - if ((m)->m_off > MMAXOFF) \ - (sb)->sb_mbcnt -= MCLBYTES; \ -} - -/* set lock on sockbuf sb */ -#define sblock(so, sb) { \ - while ((sb)->sb_flags & SB_LOCK) { \ - (sb)->sb_flags |= SB_WANT; \ - (void) sleep((caddr_t)&(sb)->sb_flags, PZERO+1); \ - } \ - (sb)->sb_flags |= SB_LOCK; \ -} - -/* release lock on sockbuf sb */ -#define sbunlock(so, sb) { \ - (sb)->sb_flags &= ~SB_LOCK; \ - if ((sb)->sb_flags & SB_WANT) { \ - (sb)->sb_flags &= ~SB_WANT; \ - if ((so)->so_wupalt) \ - (*(so)->so_wupalt->wup_func)(so, \ - (caddr_t)&(sb)->sb_flags, \ - (so)->so_wupalt->wup_arg);\ - else \ - wakeup((caddr_t)&(sb)->sb_flags); \ - } \ -} - -#define sorwakeup(so) sowakeup((so), &(so)->so_rcv) -#define sowwakeup(so) sowakeup((so), &(so)->so_snd) - -#ifdef KERNEL -struct socket *sonewconn(); -#endif - -#endif /*!_sys_socketvar_h*/ diff --git a/usr/src/lib/libbc/inc/include/sys/sockio.h b/usr/src/lib/libbc/inc/include/sys/sockio.h deleted file mode 100644 index 884399c44f..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/sockio.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * Copyright (c) 1982, 1986 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#ifndef _sys_sockio_h -#define _sys_sockio_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * General socket ioctl definitions. - */ - -#include <sys/ioccom.h> - -/* socket i/o controls */ -#define SIOCSHIWAT _IOW('s', 0, int) /* set high watermark */ -#define SIOCGHIWAT _IOR('s', 1, int) /* get high watermark */ -#define SIOCSLOWAT _IOW('s', 2, int) /* set low watermark */ -#define SIOCGLOWAT _IOR('s', 3, int) /* get low watermark */ -#define SIOCATMARK _IOR('s', 7, int) /* at oob mark? */ -#define SIOCSPGRP _IOW('s', 8, int) /* set process group */ -#define SIOCGPGRP _IOR('s', 9, int) /* get process group */ - -#define SIOCADDRT _IOW('r', 10, struct rtentry) /* add route */ -#define SIOCDELRT _IOW('r', 11, struct rtentry) /* delete route */ - -#define SIOCSIFADDR _IOW('i', 12, struct ifreq) /* set ifnet address */ -#define SIOCGIFADDR _IOWR('i',13, struct ifreq) /* get ifnet address */ -#define SIOCSIFDSTADDR _IOW('i', 14, struct ifreq) /* set p-p address */ -#define SIOCGIFDSTADDR _IOWR('i',15, struct ifreq) /* get p-p address */ -#define SIOCSIFFLAGS _IOW('i', 16, struct ifreq) /* set ifnet flags */ -#define SIOCGIFFLAGS _IOWR('i',17, struct ifreq) /* get ifnet flags */ -#define SIOCSIFMEM _IOW('i', 18, struct ifreq) /* set interface mem */ -#define SIOCGIFMEM _IOWR('i',19, struct ifreq) /* get interface mem */ -#define SIOCGIFCONF _IOWR('i',20, struct ifconf) /* get ifnet list */ -#define SIOCSIFMTU _IOW('i', 21, struct ifreq) /* set if_mtu */ -#define SIOCGIFMTU _IOWR('i',22, struct ifreq) /* get if_mtu */ - - /* from 4.3BSD */ -#define SIOCGIFBRDADDR _IOWR('i',23, struct ifreq) /* get broadcast addr */ -#define SIOCSIFBRDADDR _IOW('i',24, struct ifreq) /* set broadcast addr */ -#define SIOCGIFNETMASK _IOWR('i',25, struct ifreq) /* get net addr mask */ -#define SIOCSIFNETMASK _IOW('i',26, struct ifreq) /* set net addr mask */ -#define SIOCGIFMETRIC _IOWR('i',27, struct ifreq) /* get IF metric */ -#define SIOCSIFMETRIC _IOW('i',28, struct ifreq) /* set IF metric */ - -#define SIOCSARP _IOW('i', 30, struct arpreq) /* set arp entry */ -#define SIOCGARP _IOWR('i',31, struct arpreq) /* get arp entry */ -#define SIOCDARP _IOW('i', 32, struct arpreq) /* delete arp entry */ -#define SIOCUPPER _IOW('i', 40, struct ifreq) /* attach upper layer */ -#define SIOCLOWER _IOW('i', 41, struct ifreq) /* attach lower layer */ -#define SIOCSETSYNC _IOW('i', 44, struct ifreq) /* set syncmode */ -#define SIOCGETSYNC _IOWR('i', 45, struct ifreq) /* get syncmode */ -#define SIOCSSDSTATS _IOWR('i', 46, struct ifreq) /* sync data stats */ -#define SIOCSSESTATS _IOWR('i', 47, struct ifreq) /* sync error stats */ - -#define SIOCSPROMISC _IOW('i', 48, int) /* request promisc mode - on/off */ -#define SIOCADDMULTI _IOW('i', 49, struct ifreq) /* set m/c address */ -#define SIOCDELMULTI _IOW('i', 50, struct ifreq) /* clr m/c address */ - -/* FDDI controls */ -#define SIOCFDRESET _IOW('i', 51, struct ifreq) /* Reset FDDI */ -#define SIOCFDSLEEP _IOW('i', 52, struct ifreq) /* Sleep until next dnld req */ -#define SIOCSTRTFMWAR _IOW('i', 53, struct ifreq) /* Start FW at an addr */ -#define SIOCLDNSTRTFW _IOW('i', 54, struct ifreq) /* Load the shared memory */ -#define SIOCGETFDSTAT _IOW('i', 55, struct ifreq) /* Get FDDI stats */ -#define SIOCFDNMIINT _IOW('i', 56, struct ifreq) /* NMI to fddi */ -#define SIOCFDEXUSER _IOW('i', 57, struct ifreq) /* Exec in user mode */ -#define SIOCFDGNETMAP _IOW('i', 58, struct ifreq) /* Get a netmap entry */ -#define SIOCFDGIOCTL _IOW('i', 59, struct ifreq) /* Generic ioctl for fddi */ - -/* protocol i/o controls */ -#define SIOCSNIT _IOW('p', 0, struct nit_ioc) /* set nit modes */ -#define SIOCGNIT _IOWR('p', 1, struct nit_ioc) /* get nit modes */ - -#endif /* !_sys_sockio_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/stat.h b/usr/src/lib/libbc/inc/include/sys/stat.h deleted file mode 100644 index 53c80c69dd..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/stat.h +++ /dev/null @@ -1,125 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2001 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef __SYS_STAT_H -#define __SYS_STAT_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * NOTE: changes to this file should also be made to xpg2include/sys/stat.h - */ - -#include <sys/types.h> - -#ifdef __cplusplus -extern "C" { -#endif - -struct stat { - dev_t st_dev; - ino_t st_ino; - mode_t st_mode; - short st_nlink; - uid_t st_uid; - gid_t st_gid; - dev_t st_rdev; - off_t st_size; - time_t st_atime; - int st_spare1; - time_t st_mtime; - int st_spare2; - time_t st_ctime; - int st_spare3; - long st_blksize; - long st_blocks; - long st_spare4[2]; -}; - -#define _IFMT 0170000 /* type of file */ -#define _IFDIR 0040000 /* directory */ -#define _IFCHR 0020000 /* character special */ -#define _IFBLK 0060000 /* block special */ -#define _IFREG 0100000 /* regular */ -#define _IFLNK 0120000 /* symbolic link */ -#define _IFSOCK 0140000 /* socket */ -#define _IFIFO 0010000 /* fifo */ - -#define S_ISUID 0004000 /* set user id on execution */ -#define S_ISGID 0002000 /* set group id on execution */ -#ifndef _POSIX_SOURCE -#define S_ISVTX 0001000 /* save swapped text even after use */ -#define S_IREAD 0000400 /* read permission, owner */ -#define S_IWRITE 0000200 /* write permission, owner */ -#define S_IEXEC 0000100 /* execute/search permission, owner */ - -#define S_ENFMT 0002000 /* enforcement-mode locking */ - -#define S_IFMT _IFMT -#define S_IFDIR _IFDIR -#define S_IFCHR _IFCHR -#define S_IFBLK _IFBLK -#define S_IFREG _IFREG -#define S_IFLNK _IFLNK -#define S_IFSOCK _IFSOCK -#define S_IFIFO _IFIFO -#endif /* !_POSIX_SOURCE */ - -#define S_IRWXU 0000700 /* rwx, owner */ -#define S_IRUSR 0000400 /* read permission, owner */ -#define S_IWUSR 0000200 /* write permission, owner */ -#define S_IXUSR 0000100 /* execute/search permission, owner */ -#define S_IRWXG 0000070 /* rwx, group */ -#define S_IRGRP 0000040 /* read permission, group */ -#define S_IWGRP 0000020 /* write permission, grougroup */ -#define S_IXGRP 0000010 /* execute/search permission, group */ -#define S_IRWXO 0000007 /* rwx, other */ -#define S_IROTH 0000004 /* read permission, other */ -#define S_IWOTH 0000002 /* write permission, other */ -#define S_IXOTH 0000001 /* execute/search permission, other */ - -#define S_ISBLK(m) (((m)&_IFMT) == _IFBLK) -#define S_ISCHR(m) (((m)&_IFMT) == _IFCHR) -#define S_ISDIR(m) (((m)&_IFMT) == _IFDIR) -#define S_ISFIFO(m) (((m)&_IFMT) == _IFIFO) -#define S_ISREG(m) (((m)&_IFMT) == _IFREG) -#ifndef _POSIX_SOURCE -#define S_ISLNK(m) (((m)&_IFMT) == _IFLNK) -#define S_ISSOCK(m) (((m)&_IFMT) == _IFSOCK) -#endif - -int chmod(char *, mode_t); -int fstat(int, struct stat *); -int mkdir(char *, mode_t); -int mkfifo(char *, mode_t); -int stat(char *, struct stat *); -mode_t umask(mode_t); - -#ifdef __cplusplus -} -#endif - -#endif /* __SYS_STAT_H */ diff --git a/usr/src/lib/libbc/inc/include/sys/stdtypes.h b/usr/src/lib/libbc/inc/include/sys/stdtypes.h deleted file mode 100644 index 687932cbb3..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/stdtypes.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright (c) 1997-1998 by Sun Microsystems, Inc. - * All rights reserved. - */ - -/* - * Suppose you have an ANSI C or POSIX thingy that needs a typedef - * for thingy_t. Put it here and include this file wherever you - * define the thingy. This is used so that we don't have size_t in - * N (N > 1) different places and so that we don't have to have - * types.h included all the time and so that we can include this in - * the lint libs instead of termios.h which conflicts with ioctl.h. - */ - -#ifndef __SYS_STDTYPES_H -#define __SYS_STDTYPES_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef int sigset_t; /* signal mask - may change */ - -typedef unsigned int speed_t; /* tty speeds */ -typedef unsigned long tcflag_t; /* tty line disc modes */ -typedef unsigned char cc_t; /* tty control char */ -typedef int pid_t; /* process id */ - -typedef unsigned short mode_t; /* file mode bits */ -typedef short nlink_t; /* links to a file */ - -typedef long clock_t; /* units=ticks (typically 60/sec) */ -typedef long time_t; /* value = secs since epoch */ - -typedef int size_t; /* ??? */ -typedef int ptrdiff_t; /* result of subtracting two pointers */ - -typedef unsigned short wchar_t; /* big enough for biggest char set */ - -/* - * POSIX Extensions - */ -typedef unsigned char uchar_t; -typedef unsigned short ushort_t; -typedef unsigned int uint_t; -typedef unsigned long ulong_t; - -#ifdef __cplusplus -} -#endif - -#endif /* __SYS_STDTYPES_H */ diff --git a/usr/src/lib/libbc/inc/include/sys/stropts.h b/usr/src/lib/libbc/inc/include/sys/stropts.h deleted file mode 100644 index 20418dc439..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/stropts.h +++ /dev/null @@ -1,158 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ - -#ifndef _sys_stropts_h -#define _sys_stropts_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Read options - */ -#define RNORM 0 /* read msg norm */ -#define RMSGD 1 /* read msg discard */ -#define RMSGN 2 /* read msg no discard */ - -/* - * Flush options - */ - -#define FLUSHR 1 /* flush read queue */ -#define FLUSHW 2 /* flush write queue */ -#define FLUSHRW 3 /* flush both queues */ - -/* - * Events for which to be sent SIGPOLL signal - */ -#define S_INPUT 001 /* regular priority msg on read Q */ -#define S_HIPRI 002 /* high priority msg on read Q */ -#define S_OUTPUT 004 /* write Q no longer full */ -#define S_MSG 010 /* signal msg at front of read Q */ - -/* - * Flags for recv() and send() syscall arguments - */ -#define RS_HIPRI 1 /* send/recv high priority message */ - -/* - * Flags returned as value of recv() syscall - */ -#define MORECTL 1 /* more ctl info is left in message */ -#define MOREDATA 2 /* more data is left in message */ - -#ifndef FMNAMESZ -#define FMNAMESZ 8 -#endif - -#include <sys/ioccom.h> - -/* - * Stream Ioctl defines - */ -#define I_NREAD _IOR('S',01,int) -#define I_PUSH _IOWN('S',02,FMNAMESZ+1) -#define I_POP _IO('S',03) -#define I_LOOK _IORN('S',04,FMNAMESZ+1) -#define I_FLUSH _IO('S',05) -#define I_SRDOPT _IO('S',06) -#define I_GRDOPT _IOR('S',07,int) -#define I_STR _IOWR('S',010,struct strioctl) -#define I_SETSIG _IO('S',011) -#define I_GETSIG _IOR('S',012,int) -#define I_FIND _IOWN('S',013,FMNAMESZ+1) -#define I_LINK _IO('S',014) -#define I_UNLINK _IO('S',015) -#define I_PEEK _IOWR('S',017,struct strpeek) -#define I_FDINSERT _IOW('S',020,struct strfdinsert) -#define I_SENDFD _IO('S',021) -#define I_RECVFD _IOR('S',022,struct strrecvfd) -#define I_PLINK _IO('S',023) -#define I_PUNLINK _IO('S',024) - - -/* - * User level ioctl format for ioctl that go downstream I_STR - */ -struct strioctl { - int ic_cmd; /* command */ - int ic_timout; /* timeout value */ - int ic_len; /* length of data */ - char *ic_dp; /* pointer to data */ -}; - - -/* - * Value for timeouts (ioctl, select) that denotes infinity - */ -#define INFTIM -1 - - -/* - * Stream buffer structure for send and recv system calls - */ -struct strbuf { - int maxlen; /* no. of bytes in buffer */ - int len; /* no. of bytes returned */ - char *buf; /* pointer to data */ -}; - - -/* - * stream I_PEEK ioctl format - */ - -struct strpeek { - struct strbuf ctlbuf; - struct strbuf databuf; - long flags; -}; - -/* - * stream I_FDINSERT ioctl format - */ -struct strfdinsert { - struct strbuf ctlbuf; - struct strbuf databuf; - long flags; - int fildes; - int offset; -}; - - -/* - * receive file descriptor structure - */ -struct strrecvfd { - int fd; - unsigned short uid; - unsigned short gid; - char fill[8]; -}; - -#endif /* !_sys_stropts_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/syslog.h b/usr/src/lib/libbc/inc/include/sys/syslog.h deleted file mode 100644 index 2d8690fb53..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/syslog.h +++ /dev/null @@ -1,70 +0,0 @@ -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Copyright (c) 1982, 1986 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#ifndef _sys_syslog_h -#define _sys_syslog_h - -/* - * Facility codes - */ -#define LOG_KERN (0<<3) /* kernel messages */ -#define LOG_USER (1<<3) /* random user-level messages */ -#define LOG_MAIL (2<<3) /* mail system */ -#define LOG_DAEMON (3<<3) /* system daemons */ -#define LOG_AUTH (4<<3) /* security/authorization messages */ -#define LOG_SYSLOG (5<<3) /* messages generated internally by syslogd */ -#define LOG_LPR (6<<3) /* line printer subsystem */ -#define LOG_NEWS (7<<3) /* netnews subsystem */ -#define LOG_UUCP (8<<3) /* uucp subsystem */ -#define LOG_CRON (15<<3) /* cron/at subsystem */ - /* other codes through 15 reserved for system use */ -#define LOG_LOCAL0 (16<<3) /* reserved for local use */ -#define LOG_LOCAL1 (17<<3) /* reserved for local use */ -#define LOG_LOCAL2 (18<<3) /* reserved for local use */ -#define LOG_LOCAL3 (19<<3) /* reserved for local use */ -#define LOG_LOCAL4 (20<<3) /* reserved for local use */ -#define LOG_LOCAL5 (21<<3) /* reserved for local use */ -#define LOG_LOCAL6 (22<<3) /* reserved for local use */ -#define LOG_LOCAL7 (23<<3) /* reserved for local use */ - -#define LOG_NFACILITIES 24 /* maximum number of facilities */ -#define LOG_FACMASK 0x03f8 /* mask to extract facility part */ - -/* - * Priorities (these are ordered) - */ -#define LOG_EMERG 0 /* system is unusable */ -#define LOG_ALERT 1 /* action must be taken immediately */ -#define LOG_CRIT 2 /* critical conditions */ -#define LOG_ERR 3 /* error conditions */ -#define LOG_WARNING 4 /* warning conditions */ -#define LOG_NOTICE 5 /* normal but signification condition */ -#define LOG_INFO 6 /* informational */ -#define LOG_DEBUG 7 /* debug-level messages */ - -#define LOG_PRIMASK 0x0007 /* mask to extract priority part (internal) */ - -/* - * arguments to setlogmask. - */ -#define LOG_MASK(pri) (1 << (pri)) /* mask for one priority */ -#define LOG_UPTO(pri) ((1 << ((pri)+1)) - 1) /* all priorities through pri */ - -/* - * Option flags for openlog. - * - * LOG_ODELAY no longer does anything; LOG_NDELAY is the - * inverse of what it used to be. - */ -#define LOG_PID 0x01 /* log the pid with each message */ -#define LOG_CONS 0x02 /* log on the console if errors in sending */ -#define LOG_ODELAY 0x04 /* delay open until syslog() is called */ -#define LOG_NDELAY 0x08 /* don't delay open */ -#define LOG_NOWAIT 0x10 /* if forking to log on console, don't wait() */ - -#endif /*!_sys_syslog_h*/ diff --git a/usr/src/lib/libbc/inc/include/sys/sysmacros.h b/usr/src/lib/libbc/inc/include/sys/sysmacros.h deleted file mode 100644 index 1482b87c03..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/sysmacros.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1986 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ - -/* - * Portions of this source code were derived from Berkeley 4.3 BSD - * under license from the Regents of the University of California. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Major/minor device constructing/busting macros. - */ - -#ifndef _sys_sysmacros_h -#define _sys_sysmacros_h - -/* major part of a device */ -#define major(x) ((int)(((unsigned)(x)>>8)&0377)) - -/* minor part of a device */ -#define minor(x) ((int)((x)&0377)) - -/* make a device number */ -#define makedev(x,y) ((dev_t)(((x)<<8) | (y))) - -#endif /*!_sys_sysmacros_h*/ diff --git a/usr/src/lib/libbc/inc/include/sys/termio.h b/usr/src/lib/libbc/inc/include/sys/termio.h deleted file mode 100644 index 7d159ae53f..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/termio.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ - -#ifndef _sys_termio_h -#define _sys_termio_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <sys/ioccom.h> -#include <sys/termios.h> - -#define NCC 8 - -#define SSPEED 7 /* default speed: 300 baud */ - -/* - * Ioctl control packet - */ -struct termio { - unsigned short c_iflag; /* input modes */ - unsigned short c_oflag; /* output modes */ - unsigned short c_cflag; /* control modes */ - unsigned short c_lflag; /* line discipline modes */ - char c_line; /* line discipline */ - unsigned char c_cc[NCC]; /* control chars */ -}; - -#define TCGETA _IOR('T', 1, struct termio) -#define TCSETA _IOW('T', 2, struct termio) -#define TCSETAW _IOW('T', 3, struct termio) -#define TCSETAF _IOW('T', 4, struct termio) -#define TCSBRK _IO('T', 5) - -#endif /* !_sys_termio_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/termios.h b/usr/src/lib/libbc/inc/include/sys/termios.h deleted file mode 100644 index 6182f49fd5..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/termios.h +++ /dev/null @@ -1,278 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef __SYS_TERMIOS_H -#define __SYS_TERMIOS_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <sys/stdtypes.h> -#include <sys/ioccom.h> -#include <sys/ttydev.h> -#include <sys/ttycom.h> - -#ifdef __cplusplus -extern "C" { -#endif - -#define NCCS 17 - -/* - * control characters - * the following are not (yet) posix - * VEOL2, VSWTCH, VDSUSP, VREPRINT, VDISCARD, VWERASE, VLNEXT, VSTATUS - */ -#define VINTR 0 -#define VQUIT 1 -#define VERASE 2 -#define VKILL 3 -#define VEOF 4 -#define VEOL 5 -#ifndef _POSIX_SOURCE -#define VEOL2 6 -#define VSWTCH 7 -#endif -#define VSTART 8 -#define VSTOP 9 -#define VSUSP 10 -#ifndef _POSIX_SOURCE -#define VDSUSP 11 -#define VREPRINT 12 -#define VDISCARD 13 -#define VWERASE 14 -#define VLNEXT 15 -#define VSTATUS 16 -#endif - -#define VMIN VEOF -#define VTIME VEOL - -#ifndef _POSIX_SOURCE -#define _CTRL(c) ('c'&037) - -/* - * default control chars. - * guarded for ttychars.h. - */ -#ifndef CINTR -#define CINTR _CTRL(c) -#define CQUIT 034 /* FS, ^\ */ -#define CERASE 0177 /* DEL, ^? */ -#define CKILL _CTRL(u) -#define CEOF _CTRL(d) -#define CEOT CEOF -#define CEOL 0 -#define CEOL2 0 -#define CSWTCH 0 -#define CNSWTCH 0 -#define CSTART _CTRL(q) -#define CSTOP _CTRL(s) -#define CSUSP _CTRL(z) -#define CDSUSP _CTRL(y) -#define CRPRNT _CTRL(r) -#define CFLUSH _CTRL(o) -#define CWERASE _CTRL(w) -#define CLNEXT _CTRL(v) -#endif /* !CINTR */ - -#define CESC '\\' -#define CNUL 0 -#define CDEL 0377 -#endif /* !_POSIX_SOURCE */ - -/* input modes */ -#define IGNBRK 0x00000001 -#define BRKINT 0x00000002 -#define IGNPAR 0x00000004 -#define PARMRK 0x00000008 -#define INPCK 0x00000010 -#define ISTRIP 0x00000020 -#define INLCR 0x00000040 -#define IGNCR 0x00000080 -#define ICRNL 0x00000100 -/* IUCLC 0x00000200 not posix, defined below */ -#define IXON 0x00000400 -/* IXANY 0x00000800 not posix, defined below */ -#define IXOFF 0x00001000 -/* IMAXBEL 0x00002000 not posix, defined below */ - -#ifndef _POSIX_SOURCE -#define IUCLC 0x00000200 -#define IXANY 0x00000800 -#define IMAXBEL 0x00002000 -#endif /* !_POSIX_SOURCE */ - -/* output modes */ -#define OPOST 0x00000001 -#ifndef _POSIX_SOURCE -#define OLCUC 0x00000002 -#define ONLCR 0x00000004 -#define OCRNL 0x00000008 -#define ONOCR 0x00000010 -#define ONLRET 0x00000020 -#define OFILL 0x00000040 -#define OFDEL 0x00000080 -#define NLDLY 0x00000100 -#define NL0 0 -#define NL1 0x00000100 -#define CRDLY 0x00000600 -#define CR0 0 -#define CR1 0x00000200 -#define CR2 0x00000400 -#define CR3 0x00000600 -#define TABDLY 0x00001800 -#define TAB0 0 -#define TAB1 0x00000800 -#define TAB2 0x00001000 -#define XTABS 0x00001800 -#define TAB3 XTABS -#define BSDLY 0x00002000 -#define BS0 0 -#define BS1 0x00002000 -#define VTDLY 0x00004000 -#define VT0 0 -#define VT1 0x00004000 -#define FFDLY 0x00008000 -#define FF0 0 -#define FF1 0x00008000 -#define PAGEOUT 0x00010000 -#define WRAP 0x00020000 -#endif /* !_POSIX_SOURCE */ - -/* control modes */ -#ifndef _POSIX_SOURCE -#define CBAUD 0x0000000f -#endif -#define CSIZE 0x00000030 -#define CS5 0 -#define CS6 0x00000010 -#define CS7 0x00000020 -#define CS8 0x00000030 -#define CSTOPB 0x00000040 -#define CREAD 0x00000080 -#define PARENB 0x00000100 -#define PARODD 0x00000200 -#define HUPCL 0x00000400 -#define CLOCAL 0x00000800 -#ifndef _POSIX_SOURCE -#define LOBLK 0x00001000 -#define CIBAUD 0x000f0000 -#define CRTSXOFF 0x40000000 -#define CRTSCTS 0x80000000 -#define CBAUDEXT 0x200000 -#define CIBAUDEXT 0x400000 - -/* - * 4.4BSD flags for hardware flow control - */ -#define CRTS_IFLOW 0x40000000 -#define CCTS_OFLOW 0x80000000 - -#define IBSHIFT 16 -#endif /* !_POSIX_SOURCE */ - -/* line discipline 0 modes */ -#define ISIG 0x00000001 -#define ICANON 0x00000002 -/* XCASE 0x00000004 not posix, defined below */ -#define ECHO 0x00000008 -#define ECHOE 0x00000010 -#define ECHOK 0x00000020 -#define ECHONL 0x00000040 -#define NOFLSH 0x00000080 -#define TOSTOP 0x00000100 -/* ECHOCTL 0x00000200 not posix, defined below */ -/* ECHOPRT 0x00000400 not posix, defined below */ -/* ECHOKE 0x00000800 not posix, defined below */ -/* DEFECHO 0x00001000 not posix, defined below */ -/* FLUSHO 0x00002000 not posix, defined below */ -/* PENDIN 0x00004000 not posix, defined below */ -#define IEXTEN 0x00008000 - -#ifndef _POSIX_SOURCE -#define XCASE 0x00000004 -#define ECHOCTL 0x00000200 -#define ECHOPRT 0x00000400 -#define ECHOKE 0x00000800 -#define DEFECHO 0x00001000 -#define FLUSHO 0x00002000 -#define PENDIN 0x00004000 -#endif /* !_POSIX_SOURCE */ - -#ifndef _POSIX_SOURCE -/* - * codes 1 through 5, not shown here, are old "termio" calls - */ -#define TCXONC _IO('T', 6) -#define TCFLSH _IO('T', 7) -#define TCGETS _IOR('T', 8, struct termios) -#define TCSETS _IOW('T', 9, struct termios) -#define TCSETSW _IOW('T', 10, struct termios) -#define TCSETSF _IOW('T', 11, struct termios) -#endif /* !_POSIX_SOURCE */ - -#define TCOOFF 0 /* arg to TCXONC & tcflow() */ -#define TCOON 1 /* arg to TCXONC & tcflow() */ -#define TCIOFF 2 /* arg to TCXONC & tcflow() */ -#define TCION 3 /* arg to TCXONC & tcflow() */ -#define TCIFLUSH 0 /* arg to TCFLSH & tcflush() */ -#define TCOFLUSH 1 /* arg to TCFLSH & tcflush() */ -#define TCIOFLUSH 2 /* arg to TCFLSH & tcflush() */ -#define TCSANOW 0 /* arg to tcsetattr() */ -#define TCSADRAIN 1 /* arg to tcsetattr() */ -#define TCSAFLUSH 2 /* arg to tcsetattr() */ - -/* - * Ioctl control packet - */ -struct termios { - tcflag_t c_iflag; /* input modes */ - tcflag_t c_oflag; /* output modes */ - tcflag_t c_cflag; /* control modes */ - tcflag_t c_lflag; /* line discipline modes */ - char c_line; /* line discipline XXX */ - cc_t c_cc[NCCS]; /* control chars */ -}; - - -#ifndef KERNEL -speed_t cfgetispeed(/* struct termios *termios_p */); -speed_t cfgetospeed(/* struct termios *termios_p */); -int cfsetispeed(/* struct termios *termios_p, speed_t speed */); -int cfsetospeed(/* struct termios *termios_p, speed_t speed */); -int tcdrain(/* int fildes */); -int tcflow(/* int fildes, int action */); -int tcflush(/* int fildes, int queue_selector */); -int tcgetattr(/* int fildes, struct termios *termios_p */); -int tcsendbreak(/* int fildes, int duration */); -int tcsetattr(/* int fildes, int optional_actions, struct *termios_p */); -#endif /* !KERNEL */ - -#ifdef __cplusplus -} -#endif - -#endif /* __SYS_TERMIOS_H */ diff --git a/usr/src/lib/libbc/inc/include/sys/time.h b/usr/src/lib/libbc/inc/include/sys/time.h deleted file mode 100644 index a79fb2df9f..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/time.h +++ /dev/null @@ -1,65 +0,0 @@ -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Copyright (c) 1982, 1986 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#ifndef _sys_time_h -#define _sys_time_h - -/* - * Structure returned by gettimeofday(2) system call, - * and used in other calls. - */ -struct timeval { - long tv_sec; /* seconds */ - long tv_usec; /* and microseconds */ -}; - -struct timezone { - int tz_minuteswest; /* minutes west of Greenwich */ - int tz_dsttime; /* type of dst correction */ -}; -#define DST_NONE 0 /* not on dst */ -#define DST_USA 1 /* USA style dst */ -#define DST_AUST 2 /* Australian style dst */ -#define DST_WET 3 /* Western European dst */ -#define DST_MET 4 /* Middle European dst */ -#define DST_EET 5 /* Eastern European dst */ -#define DST_CAN 6 /* Canada */ -#define DST_GB 7 /* Great Britain and Eire */ -#define DST_RUM 8 /* Rumania */ -#define DST_TUR 9 /* Turkey */ -#define DST_AUSTALT 10 /* Australian style with shift in 1986 */ - -/* - * Operations on timevals. - * - * NB: timercmp does not work for >= or <=. - */ -#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) -#define timercmp(tvp, uvp, cmp) \ - ((tvp)->tv_sec cmp (uvp)->tv_sec || \ - (tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec) -#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 - -/* - * Names of the interval timers, and structure - * defining a timer setting. - */ -#define ITIMER_REAL 0 -#define ITIMER_VIRTUAL 1 -#define ITIMER_PROF 2 - -struct itimerval { - struct timeval it_interval; /* timer interval */ - struct timeval it_value; /* current value */ -}; - -#ifndef KERNEL -#include <time.h> -#endif - -#endif /*!_sys_time_h*/ diff --git a/usr/src/lib/libbc/inc/include/sys/times.h b/usr/src/lib/libbc/inc/include/sys/times.h deleted file mode 100644 index 392d2a25d3..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/times.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Structure returned by times() - */ - -#ifndef __sys_times_h -#define __sys_times_h - -#include <sys/types.h> - -struct tms { - clock_t tms_utime; /* user time */ - clock_t tms_stime; /* system time */ - clock_t tms_cutime; /* user time, children */ - clock_t tms_cstime; /* system time, children */ -}; - -#ifndef KERNEL -clock_t times(/* struct tms *tmsp */); -#endif - -#endif /* !__sys_times_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/ttold.h b/usr/src/lib/libbc/inc/include/sys/ttold.h deleted file mode 100644 index baf4817108..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/ttold.h +++ /dev/null @@ -1,198 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ - -#ifndef _sys_ttold_h -#define _sys_ttold_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -struct tchars { - char t_intrc; /* interrupt */ - char t_quitc; /* quit */ - char t_startc; /* start output */ - char t_stopc; /* stop output */ - char t_eofc; /* end-of-file */ - char t_brkc; /* input delimiter (like nl) */ -}; - -struct ltchars { - char t_suspc; /* stop process signal */ - char t_dsuspc; /* delayed stop process signal */ - char t_rprntc; /* reprint line */ - char t_flushc; /* flush output (toggles) */ - char t_werasc; /* word erase */ - char t_lnextc; /* literal next character */ -}; - -/* - * Structure for TIOCGETP and TIOCSETP ioctls. - */ - -#ifndef _SGTTYB_ -#define _SGTTYB_ -struct sgttyb { - char sg_ispeed; /* input speed */ - char sg_ospeed; /* output speed */ - char sg_erase; /* erase character */ - char sg_kill; /* kill character */ - short sg_flags; /* mode flags */ -}; -#endif - -#include <sys/ioccom.h> - -/* - * 4.3BSD tty ioctl commands that are either: - * 1) deprecated - * 2) not implemented (and never were implemented) - * 3) implemented on top of new-style "ioctl"s. - */ -#define TIOCGETD _IOR('t', 0, int) /* get line discipline */ -#define TIOCSETD _IOW('t', 1, int) /* set line discipline */ -#define TIOCHPCL _IO('t', 2) /* hang up on last close */ -#define TIOCMODG _IOR('t', 3, int) /* get modem state - OBSOLETE */ -#define TIOCMODS _IOW('t', 4, int) /* set modem state - OBSOLETE */ -#define TIOCGETP _IOR('t', 8,struct sgttyb)/* get parameters -- gtty */ -#define TIOCSETP _IOW('t', 9,struct sgttyb)/* set parameters -- stty */ -#define TIOCSETN _IOW('t',10,struct sgttyb)/* as above, but no flushtty */ -#define TIOCEXCL _IO('t', 13) /* set exclusive use of tty */ -#define TIOCNXCL _IO('t', 14) /* reset exclusive use of tty */ -#define TIOCFLUSH _IOW('t', 16, int) /* flush buffers */ -#define TIOCSETC _IOW('t',17,struct tchars)/* set special characters */ -#define TIOCGETC _IOR('t',18,struct tchars)/* get special characters */ -#define O_TANDEM 0x00000001 /* send stopc on out q full */ -#define O_CBREAK 0x00000002 /* half-cooked mode */ -#define O_LCASE 0x00000004 /* simulate lower case */ -#define O_ECHO 0x00000008 /* echo input */ -#define O_CRMOD 0x00000010 /* map \r to \r\n on output */ -#define O_RAW 0x00000020 /* no i/o processing */ -#define O_ODDP 0x00000040 /* get/send odd parity */ -#define O_EVENP 0x00000080 /* get/send even parity */ -#define O_ANYP 0x000000c0 /* get any parity/send none */ -#define O_NLDELAY 0x00000300 /* \n delay */ -#define O_NL0 0x00000000 -#define O_NL1 0x00000100 /* tty 37 */ -#define O_NL2 0x00000200 /* vt05 */ -#define O_NL3 0x00000300 -#define O_TBDELAY 0x00000c00 /* horizontal tab delay */ -#define O_TAB0 0x00000000 -#define O_TAB1 0x00000400 /* tty 37 */ -#define O_TAB2 0x00000800 -#define O_XTABS 0x00000c00 /* expand tabs on output */ -#define O_CRDELAY 0x00003000 /* \r delay */ -#define O_CR0 0x00000000 -#define O_CR1 0x00001000 /* tn 300 */ -#define O_CR2 0x00002000 /* tty 37 */ -#define O_CR3 0x00003000 /* concept 100 */ -#define O_VTDELAY 0x00004000 /* vertical tab delay */ -#define O_FF0 0x00000000 -#define O_FF1 0x00004000 /* tty 37 */ -#define O_BSDELAY 0x00008000 /* \b delay */ -#define O_BS0 0x00000000 -#define O_BS1 0x00008000 -#define O_ALLDELAY (O_NLDELAY|O_TBDELAY|O_CRDELAY|O_VTDELAY|O_BSDELAY) -#define O_CRTBS 0x00010000 /* do backspacing for crt */ -#define O_PRTERA 0x00020000 /* \ ... / erase */ -#define O_CRTERA 0x00040000 /* " \b " to wipe out char */ -#define O_TILDE 0x00080000 /* hazeltine tilde kludge */ -#define O_MDMBUF 0x00100000 /* start/stop output on carrier intr */ -#define O_LITOUT 0x00200000 /* literal output */ -#define O_TOSTOP 0x00400000 /* SIGSTOP on background output */ -#define O_FLUSHO 0x00800000 /* flush output to terminal */ -#define O_NOHANG 0x01000000 /* no SIGHUP on carrier drop */ -#define O_L001000 0x02000000 -#define O_CRTKIL 0x04000000 /* kill line with " \b " */ -#define O_PASS8 0x08000000 -#define O_CTLECH 0x10000000 /* echo control chars as ^X */ -#define O_PENDIN 0x20000000 /* tp->t_rawq needs reread */ -#define O_DECCTQ 0x40000000 /* only ^Q starts after ^S */ -#define O_NOFLSH 0x80000000 /* no output flush on signal */ -/* locals, from 127 down */ -#define TIOCLBIS _IOW('t', 127, int) /* bis local mode bits */ -#define TIOCLBIC _IOW('t', 126, int) /* bic local mode bits */ -#define TIOCLSET _IOW('t', 125, int) /* set entire local mode word */ -#define TIOCLGET _IOR('t', 124, int) /* get local modes */ -#define LCRTBS (O_CRTBS>>16) -#define LPRTERA (O_PRTERA>>16) -#define LCRTERA (O_CRTERA>>16) -#define LTILDE (O_TILDE>>16) -#define LMDMBUF (O_MDMBUF>>16) -#define LLITOUT (O_LITOUT>>16) -#define LTOSTOP (O_TOSTOP>>16) -#define LFLUSHO (O_FLUSHO>>16) -#define LNOHANG (O_NOHANG>>16) -#define LCRTKIL (O_CRTKIL>>16) -#define LPASS8 (O_PASS8>>16) -#define LCTLECH (O_CTLECH>>16) -#define LPENDIN (O_PENDIN>>16) -#define LDECCTQ (O_DECCTQ>>16) -#define LNOFLSH (O_NOFLSH>>16) -#define TIOCSBRK _IO('t', 123) /* set break bit */ -#define TIOCCBRK _IO('t', 122) /* clear break bit */ -#define TIOCSDTR _IO('t', 121) /* set data terminal ready */ -#define TIOCCDTR _IO('t', 120) /* clear data terminal ready */ -#define TIOCSLTC _IOW('t',117,struct ltchars)/* set local special chars */ -#define TIOCGLTC _IOR('t',116,struct ltchars)/* get local special chars */ -#define TIOCSTOP _IO('t', 111) /* stop output, like ^S */ -#define TIOCSTART _IO('t', 110) /* start output, like ^Q */ - -/* - * Sun-specific ioctls, which have been moved to the Sun-specific range. - * The old codes will be kept around for binary compatibility; the - * codes for TIOCCONS and TIOCGSIZE don't collide with the 4.3BSD codes - * because the structure size and copy direction fields are different. - * Unfortunately, the old TIOCSSIZE code does collide with TIOCSWINSZ, - * but they can be disambiguated by checking whether a "struct ttysize" - * structure's "ts_lines" field is greater than 64K or not. If so, - * it's almost certainly a "struct winsize" instead. - */ -#define _O_TIOCCONS _IO('t', 104) /* get console I/O */ -#define _O_TIOCSSIZE _IOW('t',103,struct ttysize)/* get tty size */ -#define _O_TIOCGSIZE _IOR('t',102,struct ttysize)/* get tty size */ - -/* - * Sun-specific ioctls. - */ -#define TIOCSETX _IOW('t', 34, int) /* set extra modes for S5 compatibility */ -#define TIOCGETX _IOR('t', 35, int) /* get extra modes for S5 compatibility */ -#define NOPOST 0x00000001 /* no processing on output (LITOUT with 7 bits + parity) */ -#define NOISIG 0x00000002 /* disable all signal-generating characters */ -#define STOPB 0x00000004 /* two stop bits */ - -#define OTTYDISC 0 /* old, v7 std tty driver */ -#define NETLDISC 1 /* line discip for berk net */ -#define NTTYDISC 2 /* new tty discipline */ -#define TABLDISC 3 /* hitachi tablet discipline */ -#define NTABLDISC 4 /* gtco tablet discipline */ -#define MOUSELDISC 5 /* mouse discipline */ -#define KBDLDISC 6 /* up/down keyboard trans (console) */ - -#include <sys/ttycom.h> - -#endif /* !_sys_ttold_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/ttychars.h b/usr/src/lib/libbc/inc/include/sys/ttychars.h deleted file mode 100644 index 8ab232d3d2..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/ttychars.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * User visible structures and constants - * related to terminal handling. - */ - -#ifndef _sys_ttychars_h -#define _sys_ttychars_h - -struct ttychars { - char tc_erase; /* erase last character */ - char tc_kill; /* erase entire line */ - char tc_intrc; /* interrupt */ - char tc_quitc; /* quit */ - char tc_startc; /* start output */ - char tc_stopc; /* stop output */ - char tc_eofc; /* end-of-file */ - char tc_brkc; /* input delimiter (like nl) */ - char tc_suspc; /* stop process signal */ - char tc_dsuspc; /* delayed stop process signal */ - char tc_rprntc; /* reprint line */ - char tc_flushc; /* flush output (toggles) */ - char tc_werasc; /* word erase */ - char tc_lnextc; /* literal next character */ -}; - -#ifndef CTRL -#define CTRL(c) ('c'&037) -#endif - -/* - * default special characters. - * guarded because termio[s].h also define these. - */ -#ifndef CERASE -#define CERASE 0177 -#define CKILL CTRL(u) -#define CINTR CTRL(c) -#define CQUIT 034 /* FS, ^\ */ -#define CSTART CTRL(q) -#define CSTOP CTRL(s) -#define CEOF CTRL(d) -#define CEOT CEOF -#define CBRK 0377 -#define CSUSP CTRL(z) -#define CDSUSP CTRL(y) -#define CRPRNT CTRL(r) -#define CFLUSH CTRL(o) -#define CWERASE CTRL(w) -#define CLNEXT CTRL(v) -#endif /* !CERASE */ - -#endif /* !_sys_ttychars_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/ttycom.h b/usr/src/lib/libbc/inc/include/sys/ttycom.h deleted file mode 100644 index de4d7a97bd..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/ttycom.h +++ /dev/null @@ -1,116 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef __sys_ttycom_h -#define __sys_ttycom_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifndef _POSIX_SOURCE - -/* - * Window/terminal size structure. - * This information is stored by the kernel - * in order to provide a consistent interface, - * but is not used by the kernel. - * - * Type must be "unsigned short" so that types.h not required. - */ -struct winsize { - unsigned short ws_row; /* rows, in characters */ - unsigned short ws_col; /* columns, in characters */ - unsigned short ws_xpixel; /* horizontal size, pixels - not used */ - unsigned short ws_ypixel; /* vertical size, pixels - not used */ -}; - -#define TIOCGWINSZ _IOR('t', 104, struct winsize) /* get window size */ -#define TIOCSWINSZ _IOW('t', 103, struct winsize) /* set window size */ - -/* - * Sun version of same. - */ -struct ttysize { - int ts_lines; /* number of lines on terminal */ - int ts_cols; /* number of columns on terminal */ -}; - -#define TIOCSSIZE _IOW('t',37,struct ttysize)/* set tty size */ -#define TIOCGSIZE _IOR('t',38,struct ttysize)/* get tty size */ - -/* - * 4.3BSD and SunOS terminal "ioctl"s with no "termios" equivalents. - * This file is included by <sys/termios.h> and indirectly by <sys/ioctl.h> - * so that programs that include either one have these "ioctl"s defined. - */ -#define TIOCSCTTY _IO('t', 132) /* get a ctty */ -#define TIOCGPGRP _IOR('t', 119, int) /* get pgrp of tty */ -#define TIOCGETPGRP _IOR('t', 131, int) /* get pgrp of tty (posix) */ -#define TIOCSPGRP _IOW('t', 118, int) /* set pgrp of tty */ -#define TIOCSETPGRP _IOW('t', 130, int) /* set pgrp of tty (posix) */ -#define TIOCOUTQ _IOR('t', 115, int) /* output queue size */ -#define TIOCSTI _IOW('t', 114, char) /* simulate terminal input */ -#define TIOCNOTTY _IO('t', 113) /* void tty association */ -#define TIOCPKT _IOW('t', 112, int) /* pty: set/clear packet mode */ -#define TIOCPKT_DATA 0x00 /* data packet */ -#define TIOCPKT_FLUSHREAD 0x01 /* flush data not yet written to controller */ -#define TIOCPKT_FLUSHWRITE 0x02 /* flush data read from controller but not yet processed */ -#define TIOCPKT_STOP 0x04 /* stop output */ -#define TIOCPKT_START 0x08 /* start output */ -#define TIOCPKT_NOSTOP 0x10 /* no more ^S, ^Q */ -#define TIOCPKT_DOSTOP 0x20 /* now do ^S, ^Q */ -#define TIOCPKT_IOCTL 0x40 /* "ioctl" packet */ -#define TIOCMSET _IOW('t', 109, int) /* set all modem bits */ -#define TIOCMBIS _IOW('t', 108, int) /* bis modem bits */ -#define TIOCMBIC _IOW('t', 107, int) /* bic modem bits */ -#define TIOCMGET _IOR('t', 106, int) /* get all modem bits */ -#define TIOCM_LE 0001 /* line enable */ -#define TIOCM_DTR 0002 /* data terminal ready */ -#define TIOCM_RTS 0004 /* request to send */ -#define TIOCM_ST 0010 /* secondary transmit */ -#define TIOCM_SR 0020 /* secondary receive */ -#define TIOCM_CTS 0040 /* clear to send */ -#define TIOCM_CAR 0100 /* carrier detect */ -#define TIOCM_CD TIOCM_CAR -#define TIOCM_RNG 0200 /* ring */ -#define TIOCM_RI TIOCM_RNG -#define TIOCM_DSR 0400 /* data set ready */ - -#define TIOCREMOTE _IOW('t', 105, int) /* remote input editing */ -#define TIOCUCNTL _IOW('t', 102, int) /* pty: set/clr usr cntl mode */ - -/* - * Sun-specific ioctls with no "termios" equivalents. - */ -#define TIOCTCNTL _IOW('t', 32, int) /* pty: set/clr intercept ioctl mode */ -#define TIOCSIGNAL _IOW('t', 33, int) /* pty: send signal to slave */ -#define TIOCCONS _IO('t', 36) /* get console I/O */ -#define TIOCSSOFTCAR _IOW('t', 101, int) /* set soft carrier flag */ -#define TIOCGSOFTCAR _IOR('t', 100, int) /* get soft carrier flag */ -#define TIOCISPACE _IOR('t', 128, int) /* space left in input queue */ -#define TIOCISIZE _IOR('t', 129, int) /* size of input queue */ - -#endif /* !_POSIX_SOURCE */ -#endif /* !__sys_ttycom_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/ttydev.h b/usr/src/lib/libbc/inc/include/sys/ttydev.h deleted file mode 100644 index 567db2853e..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/ttydev.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Terminal definitions related to underlying hardware. - */ - -#ifndef __sys_ttydev_h -#define __sys_ttydev_h - -/* - * Speeds - */ -#define B0 0 -#define B50 1 -#define B75 2 -#define B110 3 -#define B134 4 -#define B150 5 -#define B200 6 -#define B300 7 -#define B600 8 -#define B1200 9 -#define B1800 10 -#define B2400 11 -#define B4800 12 -#define B9600 13 -#define B19200 14 -#define B38400 15 -#ifndef _POSIX_SOURCE -#define EXTA 14 -#define EXTB 15 -#endif - -#ifdef KERNEL -/* - * Hardware bits. - * SHOULD NOT BE HERE. - */ -#define DONE 0200 -#define IENABLE 0100 - -/* - * Modem control commands. - */ -#define DMSET 0 -#define DMBIS 1 -#define DMBIC 2 -#define DMGET 3 -#endif /* KERNEL */ - -#endif /* !__sys_ttydev_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/types.h b/usr/src/lib/libbc/inc/include/sys/types.h deleted file mode 100644 index 765d3ea55e..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/types.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 1989 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * Copyright (c) 1982, 1986 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#ifndef __sys_types_h -#define __sys_types_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Basic system types. - */ - -#include <sys/stdtypes.h> /* ANSI & POSIX types */ - -#ifndef _POSIX_SOURCE -#include <sys/sysmacros.h> - -#define physadr physadr_t -#define quad quad_t - -typedef unsigned char u_char; -typedef unsigned short u_short; -typedef unsigned int u_int; -typedef unsigned long u_long; -typedef unsigned short ushort; /* System V compatibility */ -typedef unsigned int uint; /* System V compatibility */ -#endif /* !_POSIX_SOURCE */ - -typedef struct _physadr_t { int r[1]; } *physadr_t; -typedef struct label_t { - int val[2]; -} label_t; -typedef struct _quad_t { long val[2]; } quad_t; -typedef long daddr_t; -typedef char * caddr_t; -typedef unsigned long ino_t; -typedef short dev_t; -typedef long off_t; -typedef unsigned short uid_t; -typedef unsigned short gid_t; -typedef long key_t; -typedef char * addr_t; - -#ifndef _POSIX_SOURCE - -#define NBBY 8 /* number of bits in a byte */ -/* - * Select uses bit masks of file descriptors in longs. - * These macros manipulate such bit fields (the filesystem macros use chars). - * FD_SETSIZE may be defined by the user, but the default here - * should be >= NOFILE (param.h). - */ -#ifndef FD_SETSIZE -#define FD_SETSIZE 256 -#endif - -typedef long fd_mask; -#define NFDBITS (sizeof (fd_mask) * NBBY) /* bits per mask */ -#ifndef howmany -#define howmany(x, y) (((x)+((y)-1))/(y)) -#endif - -typedef struct fd_set { - fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)]; -} fd_set; - - -#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS))) -#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS))) -#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS))) -#define FD_ZERO(p) bzero((char *)(p), sizeof (*(p))) - -#endif /* !_POSIX_SOURCE */ -#endif /* !__sys_types_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/uio.h b/usr/src/lib/libbc/inc/include/sys/uio.h deleted file mode 100644 index 3509436478..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/uio.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 1989 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * Copyright (c) 1982, 1986 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifndef _sys_uio_h -#define _sys_uio_h - -struct iovec { - caddr_t iov_base; - int iov_len; -}; - -/* - * The uio_seg define below is obsolete and is included only - * for compatibility with previous releases. New code should - * use the uio_segflg field. - */ -struct uio { - struct iovec *uio_iov; - int uio_iovcnt; - off_t uio_offset; - short uio_segflg; -#define uio_seg uio_segflg /* obsolete */ - short uio_fmode; /* careful what you put here, the file - * bits that fill this are an int. */ - int uio_resid; -}; - -enum uio_rw { UIO_READ, UIO_WRITE }; - -/* - * Segment flag values (should be enum). - * - * The UIOSEG_* defines are obsolete and are included only - * for compatibility with previous releases. New code should - * use the UIO_* definitions. - */ -#define UIO_USERSPACE 0 /* from user data space */ -#define UIO_SYSSPACE 1 /* from system space */ -#define UIO_USERISPACE 2 /* from user I space */ - -#define UIOSEG_USER 0 /* obsolete */ -#define UIOSEG_KERNEL 1 /* obsolete */ - -#endif /*!_sys_uio_h*/ diff --git a/usr/src/lib/libbc/inc/include/sys/utsname.h b/usr/src/lib/libbc/inc/include/sys/utsname.h deleted file mode 100644 index 623dc23119..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/utsname.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1989 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ -/* from S5R2 6.1 */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifndef __sys_utsname_h -#define __sys_utsname_h - -struct utsname { - char sysname[9]; - char nodename[9]; - char nodeext[65-9]; /* extends nodename to MAXHOSTNAMELEN+1 chars */ - char release[9]; - char version[9]; - char machine[9]; -}; - -#ifdef KERNEL -extern struct utsname utsname; -#else -int uname(/* struct utsname *name */); -#endif - -#endif /* !__sys_utsname_h */ diff --git a/usr/src/lib/libbc/inc/include/sys/vfs.h b/usr/src/lib/libbc/inc/include/sys/vfs.h deleted file mode 100644 index b593914bfe..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/vfs.h +++ /dev/null @@ -1,164 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1988 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * File system identifier. Should be unique (at least per machine). - */ - -#ifndef _sys_vfs_h -#define _sys_vfs_h - -typedef struct { - long val[2]; /* file system id type */ -} fsid_t; - -/* - * File identifier. Should be unique per filesystem on a single machine. - */ -#define MAXFIDSZ 16 -#define freefid(fidp) \ - kmem_free((caddr_t)(fidp), sizeof (struct fid) - MAXFIDSZ + (fidp)->fid_len) - -struct fid { - u_short fid_len; /* length of data in bytes */ - char fid_data[MAXFIDSZ]; /* data (variable length) */ -}; - -/* - * Structure per mounted file system. - * Each mounted file system has an array of - * operations and an instance record. - * The file systems are put on a singly linked list. - * If vfs_stats is non-NULL statistics are gathered, see vfs_stat.h - */ -struct vfs { - struct vfs *vfs_next; /* next vfs in vfs list */ - struct vfsops *vfs_op; /* operations on vfs */ - struct vnode *vfs_vnodecovered; /* vnode we mounted on */ - int vfs_flag; /* flags */ - int vfs_bsize; /* native block size */ - fsid_t vfs_fsid; /* file system id */ - caddr_t vfs_stats; /* filesystem statistics */ - caddr_t vfs_data; /* private data */ -}; - -/* - * vfs flags. - * VFS_MLOCK lock the vfs so that name lookup cannot proceed past the vfs. - * This keeps the subtree stable during mounts and unmounts. - */ -#define VFS_RDONLY 0x01 /* read only vfs */ -#define VFS_MLOCK 0x02 /* lock vfs so that subtree is stable */ -#define VFS_MWAIT 0x04 /* someone is waiting for lock */ -#define VFS_NOSUID 0x08 /* turn off set-uid on exec */ -#define VFS_GRPID 0x10 /* Old BSD group-id on create */ -#define VFS_NOSUB 0x20 /* No mounts allowed beneath this fs */ -#define VFS_REMOUNT 0x40 /* modify mount otions only */ -#define VFS_MULTI 0x80 /* Do multi-component lookup on files */ - -/* - * Operations supported on virtual file system. - */ -struct vfsops { - int (*vfs_mount)(); /* mount file system */ - int (*vfs_unmount)(); /* unmount file system */ - int (*vfs_root)(); /* get root vnode */ - int (*vfs_statfs)(); /* get fs statistics */ - int (*vfs_sync)(); /* flush fs buffers */ - int (*vfs_vget)(); /* get vnode from fid */ - int (*vfs_mountroot)(); /* mount the root filesystem */ - int (*vfs_swapvp)(); /* return vnode for swap */ -}; - -#define VFS_MOUNT(VFSP, PATH, DATA) \ - (*(VFSP)->vfs_op->vfs_mount)(VFSP, PATH, DATA) -#define VFS_UNMOUNT(VFSP) (*(VFSP)->vfs_op->vfs_unmount)(VFSP) -#define VFS_ROOT(VFSP, VPP) (*(VFSP)->vfs_op->vfs_root)(VFSP,VPP) -#define VFS_STATFS(VFSP, SBP) (*(VFSP)->vfs_op->vfs_statfs)(VFSP,SBP) -#define VFS_SYNC(VFSP) (*(VFSP)->vfs_op->vfs_sync)(VFSP) -#define VFS_VGET(VFSP, VPP, FIDP) (*(VFSP)->vfs_op->vfs_vget)(VFSP, VPP, FIDP) -#define VFS_MOUNTROOT(VFSP, VPP, NM) \ - (*(VFSP)->vfs_op->vfs_mountroot)(VFSP, VPP, NM) -#define VFS_SWAPVP(VFSP, VPP, NM) (*(VFSP)->vfs_op->vfs_swapvp)(VFSP, VPP, NM) - -/* - * file system statistics - */ -struct statfs { - long f_type; /* type of info, zero for now */ - long f_bsize; /* fundamental file system block size */ - long f_blocks; /* total blocks in file system */ - long f_bfree; /* free block in fs */ - long f_bavail; /* free blocks avail to non-superuser */ - long f_files; /* total file nodes in file system */ - long f_ffree; /* free file nodes in fs */ - fsid_t f_fsid; /* file system id */ - long f_spare[7]; /* spare for later */ -}; - -#ifdef KERNEL -/* - * Filesystem type switch table - */ -struct vfssw { - char *vsw_name; /* type name string */ - struct vfsops *vsw_ops; /* filesystem operations vector */ -}; - -/* - * public operations - */ -extern void vfs_mountroot(); /* mount the root */ -extern int vfs_add(); /* add a new vfs to mounted vfs list */ -extern void vfs_remove(); /* remove a vfs from mounted vfs list */ -extern int vfs_lock(); /* lock a vfs */ -extern void vfs_unlock(); /* unlock a vfs */ -extern struct vfs *getvfs(); /* return vfs given fsid */ -extern struct vfssw *getfstype(); /* find default filesystem type */ -extern int vfs_getmajor(); /* get major device # for an fs type */ -extern void vfs_putmajor(); /* free major device # for an fs type */ -extern int vfs_getnum(); /* get device # for an fs type */ -extern void vfs_putnum(); /* release device # for an fs type */ - -#define VFS_INIT(VFSP, OP, DATA) { \ - (VFSP)->vfs_next = (struct vfs *)0; \ - (VFSP)->vfs_op = (OP); \ - (VFSP)->vfs_flag = 0; \ - (VFSP)->vfs_stats = NULL; \ - (VFSP)->vfs_data = (DATA); \ -} - -/* - * globals - */ -extern struct vfs *rootvfs; /* ptr to root vfs structure */ -extern struct vfssw vfssw[]; /* table of filesystem types */ -extern struct vfssw *vfsNVFS; /* vfs switch table end marker */ -#endif - -#endif /*!_sys_vfs_h*/ diff --git a/usr/src/lib/libbc/inc/include/sys/wait.h b/usr/src/lib/libbc/inc/include/sys/wait.h deleted file mode 100644 index e374f677f6..0000000000 --- a/usr/src/lib/libbc/inc/include/sys/wait.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright 1989 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * Copyright (c) 1982, 1986 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#ifndef __sys_wait_h -#define __sys_wait_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * This file holds definitions relevant to the wait system call. - * Some of the options here are available only through the ``wait3'' - * entry point; the old entry point with one argument has more fixed - * semantics, never returning status of unstopped children, hanging until - * a process terminates if any are outstanding, and never returns - * detailed information about process resource utilization (<vtimes.h>). - */ - -#ifndef _POSIX_SOURCE -#define __wait wait -#define w_termsig __w_termsig -#define w_coredump __w_coredump -#define w_retcode __w_retcode -#define w_stopval __w_stopval -#define w_stopsig __w_stopsig -#define WSTOPPED _WSTOPPED -#endif /* !_POSIX_SOURCE */ - -/* - * Structure of the information in the first word returned by both - * wait and wait3. If w_stopval==WSTOPPED, then the second structure - * describes the information returned, else the first. See WUNTRACED below. - */ -union __wait { - int w_status; /* used in syscall */ - /* - * Terminated process status. - */ - struct { - unsigned short w_Fill1:16; /* high 16 bits unused */ - unsigned short w_Retcode:8; /* exit code if w_termsig==0 */ - unsigned short w_Coredump:1; /* core dump indicator */ - unsigned short w_Termsig:7; /* termination signal */ - } w_T; - /* - * Stopped process status. Returned - * only for traced children unless requested - * with the WUNTRACED option bit. - */ - struct { - unsigned short w_Fill2:16; /* high 16 bits unused */ - unsigned short w_Stopsig:8; /* signal that stopped us */ - unsigned short w_Stopval:8; /* == W_STOPPED if stopped */ - } w_S; -}; -#define __w_termsig w_T.w_Termsig -#define __w_coredump w_T.w_Coredump -#define __w_retcode w_T.w_Retcode -#define __w_stopval w_S.w_Stopval -#define __w_stopsig w_S.w_Stopsig -#define _WSTOPPED 0177 /* value of s.stopval if process is stopped */ - -/* - * Option bits for the second argument of wait3. WNOHANG causes the - * wait to not hang if there are no stopped or terminated processes, rather - * returning an error indication in this case (pid==0). WUNTRACED - * indicates that the caller should receive status about untraced children - * which stop due to signals. If children are stopped and a wait without - * this option is done, it is as though they were still running... nothing - * about them is returned. - */ -#define WNOHANG 1 /* dont hang in wait */ -#define WUNTRACED 2 /* tell about stopped, untraced children */ - -#define WIFSTOPPED(x) (((union __wait*)&(x))->__w_stopval == _WSTOPPED) -#define WIFSIGNALED(x) (((union __wait*)&(x))->__w_stopval != _WSTOPPED && \ - ((union __wait*)&(x))->__w_termsig != 0) -#define WIFEXITED(x) (((union __wait*)&(x))->__w_stopval != _WSTOPPED && \ - ((union __wait*)&(x))->__w_termsig == 0) -#define WEXITSTATUS(x) (((union __wait*)&(x))->__w_retcode) -#define WTERMSIG(x) (((union __wait*)&(x))->__w_termsig) -#define WSTOPSIG(x) (((union __wait*)&(x))->__w_stopsig) - -#include <sys/stdtypes.h> - -pid_t wait(/* int *loc */); -pid_t waitpid(/* pid_t pid, int *loc, int opts */); - -#endif /* !__sys_wait_h */ diff --git a/usr/src/lib/libbc/inc/include/syslog.h b/usr/src/lib/libbc/inc/include/syslog.h deleted file mode 100644 index 13a84ae401..0000000000 --- a/usr/src/lib/libbc/inc/include/syslog.h +++ /dev/null @@ -1,72 +0,0 @@ -/* from UCB 7.1 6/5/86 */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Copyright (c) 1982, 1986 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#ifndef _sys_syslog_h -#define _sys_syslog_h - -/* - * Facility codes - */ -#define LOG_KERN (0<<3) /* kernel messages */ -#define LOG_USER (1<<3) /* random user-level messages */ -#define LOG_MAIL (2<<3) /* mail system */ -#define LOG_DAEMON (3<<3) /* system daemons */ -#define LOG_AUTH (4<<3) /* security/authorization messages */ -#define LOG_SYSLOG (5<<3) /* messages generated internally by syslogd */ -#define LOG_LPR (6<<3) /* line printer subsystem */ -#define LOG_NEWS (7<<3) /* netnews subsystem */ -#define LOG_UUCP (8<<3) /* uucp subsystem */ -#define LOG_CRON (15<<3) /* cron/at subsystem */ - /* other codes through 15 reserved for system use */ -#define LOG_LOCAL0 (16<<3) /* reserved for local use */ -#define LOG_LOCAL1 (17<<3) /* reserved for local use */ -#define LOG_LOCAL2 (18<<3) /* reserved for local use */ -#define LOG_LOCAL3 (19<<3) /* reserved for local use */ -#define LOG_LOCAL4 (20<<3) /* reserved for local use */ -#define LOG_LOCAL5 (21<<3) /* reserved for local use */ -#define LOG_LOCAL6 (22<<3) /* reserved for local use */ -#define LOG_LOCAL7 (23<<3) /* reserved for local use */ - -#define LOG_NFACILITIES 24 /* maximum number of facilities */ -#define LOG_FACMASK 0x03f8 /* mask to extract facility part */ - -/* - * Priorities (these are ordered) - */ -#define LOG_EMERG 0 /* system is unusable */ -#define LOG_ALERT 1 /* action must be taken immediately */ -#define LOG_CRIT 2 /* critical conditions */ -#define LOG_ERR 3 /* error conditions */ -#define LOG_WARNING 4 /* warning conditions */ -#define LOG_NOTICE 5 /* normal but signification condition */ -#define LOG_INFO 6 /* informational */ -#define LOG_DEBUG 7 /* debug-level messages */ - -#define LOG_PRIMASK 0x0007 /* mask to extract priority part (internal) */ - -/* - * arguments to setlogmask. - */ -#define LOG_MASK(pri) (1 << (pri)) /* mask for one priority */ -#define LOG_UPTO(pri) ((1 << ((pri)+1)) - 1) /* all priorities through pri */ - -/* - * Option flags for openlog. - * - * LOG_ODELAY no longer does anything; LOG_NDELAY is the - * inverse of what it used to be. - */ -#define LOG_PID 0x01 /* log the pid with each message */ -#define LOG_CONS 0x02 /* log on the console if errors in sending */ -#define LOG_ODELAY 0x04 /* delay open until syslog() is called */ -#define LOG_NDELAY 0x08 /* don't delay open */ -#define LOG_NOWAIT 0x10 /* if forking to log on console, don't wait() */ - -#endif /*!_sys_syslog_h*/ diff --git a/usr/src/lib/libbc/inc/include/termio.h b/usr/src/lib/libbc/inc/include/termio.h deleted file mode 100644 index 7d159ae53f..0000000000 --- a/usr/src/lib/libbc/inc/include/termio.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ - -#ifndef _sys_termio_h -#define _sys_termio_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <sys/ioccom.h> -#include <sys/termios.h> - -#define NCC 8 - -#define SSPEED 7 /* default speed: 300 baud */ - -/* - * Ioctl control packet - */ -struct termio { - unsigned short c_iflag; /* input modes */ - unsigned short c_oflag; /* output modes */ - unsigned short c_cflag; /* control modes */ - unsigned short c_lflag; /* line discipline modes */ - char c_line; /* line discipline */ - unsigned char c_cc[NCC]; /* control chars */ -}; - -#define TCGETA _IOR('T', 1, struct termio) -#define TCSETA _IOW('T', 2, struct termio) -#define TCSETAW _IOW('T', 3, struct termio) -#define TCSETAF _IOW('T', 4, struct termio) -#define TCSBRK _IO('T', 5) - -#endif /* !_sys_termio_h */ diff --git a/usr/src/lib/libbc/inc/include/termios.h b/usr/src/lib/libbc/inc/include/termios.h deleted file mode 100644 index 6182f49fd5..0000000000 --- a/usr/src/lib/libbc/inc/include/termios.h +++ /dev/null @@ -1,278 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef __SYS_TERMIOS_H -#define __SYS_TERMIOS_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <sys/stdtypes.h> -#include <sys/ioccom.h> -#include <sys/ttydev.h> -#include <sys/ttycom.h> - -#ifdef __cplusplus -extern "C" { -#endif - -#define NCCS 17 - -/* - * control characters - * the following are not (yet) posix - * VEOL2, VSWTCH, VDSUSP, VREPRINT, VDISCARD, VWERASE, VLNEXT, VSTATUS - */ -#define VINTR 0 -#define VQUIT 1 -#define VERASE 2 -#define VKILL 3 -#define VEOF 4 -#define VEOL 5 -#ifndef _POSIX_SOURCE -#define VEOL2 6 -#define VSWTCH 7 -#endif -#define VSTART 8 -#define VSTOP 9 -#define VSUSP 10 -#ifndef _POSIX_SOURCE -#define VDSUSP 11 -#define VREPRINT 12 -#define VDISCARD 13 -#define VWERASE 14 -#define VLNEXT 15 -#define VSTATUS 16 -#endif - -#define VMIN VEOF -#define VTIME VEOL - -#ifndef _POSIX_SOURCE -#define _CTRL(c) ('c'&037) - -/* - * default control chars. - * guarded for ttychars.h. - */ -#ifndef CINTR -#define CINTR _CTRL(c) -#define CQUIT 034 /* FS, ^\ */ -#define CERASE 0177 /* DEL, ^? */ -#define CKILL _CTRL(u) -#define CEOF _CTRL(d) -#define CEOT CEOF -#define CEOL 0 -#define CEOL2 0 -#define CSWTCH 0 -#define CNSWTCH 0 -#define CSTART _CTRL(q) -#define CSTOP _CTRL(s) -#define CSUSP _CTRL(z) -#define CDSUSP _CTRL(y) -#define CRPRNT _CTRL(r) -#define CFLUSH _CTRL(o) -#define CWERASE _CTRL(w) -#define CLNEXT _CTRL(v) -#endif /* !CINTR */ - -#define CESC '\\' -#define CNUL 0 -#define CDEL 0377 -#endif /* !_POSIX_SOURCE */ - -/* input modes */ -#define IGNBRK 0x00000001 -#define BRKINT 0x00000002 -#define IGNPAR 0x00000004 -#define PARMRK 0x00000008 -#define INPCK 0x00000010 -#define ISTRIP 0x00000020 -#define INLCR 0x00000040 -#define IGNCR 0x00000080 -#define ICRNL 0x00000100 -/* IUCLC 0x00000200 not posix, defined below */ -#define IXON 0x00000400 -/* IXANY 0x00000800 not posix, defined below */ -#define IXOFF 0x00001000 -/* IMAXBEL 0x00002000 not posix, defined below */ - -#ifndef _POSIX_SOURCE -#define IUCLC 0x00000200 -#define IXANY 0x00000800 -#define IMAXBEL 0x00002000 -#endif /* !_POSIX_SOURCE */ - -/* output modes */ -#define OPOST 0x00000001 -#ifndef _POSIX_SOURCE -#define OLCUC 0x00000002 -#define ONLCR 0x00000004 -#define OCRNL 0x00000008 -#define ONOCR 0x00000010 -#define ONLRET 0x00000020 -#define OFILL 0x00000040 -#define OFDEL 0x00000080 -#define NLDLY 0x00000100 -#define NL0 0 -#define NL1 0x00000100 -#define CRDLY 0x00000600 -#define CR0 0 -#define CR1 0x00000200 -#define CR2 0x00000400 -#define CR3 0x00000600 -#define TABDLY 0x00001800 -#define TAB0 0 -#define TAB1 0x00000800 -#define TAB2 0x00001000 -#define XTABS 0x00001800 -#define TAB3 XTABS -#define BSDLY 0x00002000 -#define BS0 0 -#define BS1 0x00002000 -#define VTDLY 0x00004000 -#define VT0 0 -#define VT1 0x00004000 -#define FFDLY 0x00008000 -#define FF0 0 -#define FF1 0x00008000 -#define PAGEOUT 0x00010000 -#define WRAP 0x00020000 -#endif /* !_POSIX_SOURCE */ - -/* control modes */ -#ifndef _POSIX_SOURCE -#define CBAUD 0x0000000f -#endif -#define CSIZE 0x00000030 -#define CS5 0 -#define CS6 0x00000010 -#define CS7 0x00000020 -#define CS8 0x00000030 -#define CSTOPB 0x00000040 -#define CREAD 0x00000080 -#define PARENB 0x00000100 -#define PARODD 0x00000200 -#define HUPCL 0x00000400 -#define CLOCAL 0x00000800 -#ifndef _POSIX_SOURCE -#define LOBLK 0x00001000 -#define CIBAUD 0x000f0000 -#define CRTSXOFF 0x40000000 -#define CRTSCTS 0x80000000 -#define CBAUDEXT 0x200000 -#define CIBAUDEXT 0x400000 - -/* - * 4.4BSD flags for hardware flow control - */ -#define CRTS_IFLOW 0x40000000 -#define CCTS_OFLOW 0x80000000 - -#define IBSHIFT 16 -#endif /* !_POSIX_SOURCE */ - -/* line discipline 0 modes */ -#define ISIG 0x00000001 -#define ICANON 0x00000002 -/* XCASE 0x00000004 not posix, defined below */ -#define ECHO 0x00000008 -#define ECHOE 0x00000010 -#define ECHOK 0x00000020 -#define ECHONL 0x00000040 -#define NOFLSH 0x00000080 -#define TOSTOP 0x00000100 -/* ECHOCTL 0x00000200 not posix, defined below */ -/* ECHOPRT 0x00000400 not posix, defined below */ -/* ECHOKE 0x00000800 not posix, defined below */ -/* DEFECHO 0x00001000 not posix, defined below */ -/* FLUSHO 0x00002000 not posix, defined below */ -/* PENDIN 0x00004000 not posix, defined below */ -#define IEXTEN 0x00008000 - -#ifndef _POSIX_SOURCE -#define XCASE 0x00000004 -#define ECHOCTL 0x00000200 -#define ECHOPRT 0x00000400 -#define ECHOKE 0x00000800 -#define DEFECHO 0x00001000 -#define FLUSHO 0x00002000 -#define PENDIN 0x00004000 -#endif /* !_POSIX_SOURCE */ - -#ifndef _POSIX_SOURCE -/* - * codes 1 through 5, not shown here, are old "termio" calls - */ -#define TCXONC _IO('T', 6) -#define TCFLSH _IO('T', 7) -#define TCGETS _IOR('T', 8, struct termios) -#define TCSETS _IOW('T', 9, struct termios) -#define TCSETSW _IOW('T', 10, struct termios) -#define TCSETSF _IOW('T', 11, struct termios) -#endif /* !_POSIX_SOURCE */ - -#define TCOOFF 0 /* arg to TCXONC & tcflow() */ -#define TCOON 1 /* arg to TCXONC & tcflow() */ -#define TCIOFF 2 /* arg to TCXONC & tcflow() */ -#define TCION 3 /* arg to TCXONC & tcflow() */ -#define TCIFLUSH 0 /* arg to TCFLSH & tcflush() */ -#define TCOFLUSH 1 /* arg to TCFLSH & tcflush() */ -#define TCIOFLUSH 2 /* arg to TCFLSH & tcflush() */ -#define TCSANOW 0 /* arg to tcsetattr() */ -#define TCSADRAIN 1 /* arg to tcsetattr() */ -#define TCSAFLUSH 2 /* arg to tcsetattr() */ - -/* - * Ioctl control packet - */ -struct termios { - tcflag_t c_iflag; /* input modes */ - tcflag_t c_oflag; /* output modes */ - tcflag_t c_cflag; /* control modes */ - tcflag_t c_lflag; /* line discipline modes */ - char c_line; /* line discipline XXX */ - cc_t c_cc[NCCS]; /* control chars */ -}; - - -#ifndef KERNEL -speed_t cfgetispeed(/* struct termios *termios_p */); -speed_t cfgetospeed(/* struct termios *termios_p */); -int cfsetispeed(/* struct termios *termios_p, speed_t speed */); -int cfsetospeed(/* struct termios *termios_p, speed_t speed */); -int tcdrain(/* int fildes */); -int tcflow(/* int fildes, int action */); -int tcflush(/* int fildes, int queue_selector */); -int tcgetattr(/* int fildes, struct termios *termios_p */); -int tcsendbreak(/* int fildes, int duration */); -int tcsetattr(/* int fildes, int optional_actions, struct *termios_p */); -#endif /* !KERNEL */ - -#ifdef __cplusplus -} -#endif - -#endif /* __SYS_TERMIOS_H */ diff --git a/usr/src/lib/libbc/inc/include/time.h b/usr/src/lib/libbc/inc/include/time.h deleted file mode 100644 index 8affc15e78..0000000000 --- a/usr/src/lib/libbc/inc/include/time.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1989 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifndef __time_h -#define __time_h - -#include <sys/stdtypes.h> -/* - * Structure returned by gmtime and localtime calls (see ctime(3)). - */ -struct tm { - int tm_sec; - int tm_min; - int tm_hour; - int tm_mday; - int tm_mon; - int tm_year; - int tm_wday; - int tm_yday; - int tm_isdst; - char *tm_zone; - long tm_gmtoff; -}; - -extern struct tm *gmtime(), *localtime(); -extern char *asctime(), *ctime(); -extern void tzset(), tzsetwall(); -extern int dysize(); -extern time_t timelocal(), timegm(); - -#endif /* !__time_h */ diff --git a/usr/src/lib/libbc/inc/include/ttyent.h b/usr/src/lib/libbc/inc/include/ttyent.h deleted file mode 100644 index 1ae6271d14..0000000000 --- a/usr/src/lib/libbc/inc/include/ttyent.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 1987 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Copyright (c) 1983 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#ifndef _ttyent_h -#define _ttyent_h - -struct ttyent { /* see getttyent(3) */ - char *ty_name; /* terminal device name */ - char *ty_getty; /* command to execute, usually getty */ - char *ty_type; /* terminal type for termcap (3X) */ - int ty_status; /* status flags (see below for defines) */ - char *ty_window; /* command to start up window manager */ - char *ty_comment; /* usually the location of the terminal */ -}; - -#define TTY_ON 0x1 /* enable logins (startup getty) */ -#define TTY_SECURE 0x2 /* allow root to login */ -#define TTY_LOCAL 0x4 /* local tty, supply software carrier */ - -extern struct ttyent *getttyent(); -extern struct ttyent *getttynam(); - -#endif /*!_ttyent_h*/ diff --git a/usr/src/lib/libbc/inc/include/tzfile.h b/usr/src/lib/libbc/inc/include/tzfile.h deleted file mode 100644 index b094236256..0000000000 --- a/usr/src/lib/libbc/inc/include/tzfile.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* from Arthur Olson's 6.1 */ - -#ifndef _TZFILE_H -#define _TZFILE_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <sys/tzfile.h> - -#endif /* _TZFILE_H */ diff --git a/usr/src/lib/libbc/inc/include/unistd.h b/usr/src/lib/libbc/inc/include/unistd.h deleted file mode 100644 index 921d3cb27d..0000000000 --- a/usr/src/lib/libbc/inc/include/unistd.h +++ /dev/null @@ -1,159 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2001 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ - -#ifndef _BC_SYS_UNISTD_H -#define _BC_SYS_UNISTD_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -/* WARNING: _SC_CLK_TCK and sysconf() are also defined/declared in <time.h>. */ -#define _SC_ARG_MAX 1 /* space for argv & envp */ -#define _SC_CHILD_MAX 2 /* maximum children per process??? */ -#define _SC_CLK_TCK 3 /* clock ticks/sec */ -#define _SC_NGROUPS_MAX 4 /* number of groups if multple supp. */ -#define _SC_OPEN_MAX 5 /* max open files per process */ -#define _SC_JOB_CONTROL 6 /* do we have job control */ -#define _SC_SAVED_IDS 7 /* do we have saved uid/gids */ -#define _SC_VERSION 8 /* POSIX version supported */ - -#define _POSIX_JOB_CONTROL 1 -#define _POSIX_SAVED_IDS 1 -#define _POSIX_VERSION 198808 - -#define _PC_LINK_MAX 1 /* max links to file/dir */ -#define _PC_MAX_CANON 2 /* max line length */ -#define _PC_MAX_INPUT 3 /* max "packet" to a tty device */ -#define _PC_NAME_MAX 4 /* max pathname component length */ -#define _PC_PATH_MAX 5 /* max pathname length */ -#define _PC_PIPE_BUF 6 /* size of a pipe */ -#define _PC_CHOWN_RESTRICTED 7 /* can we give away files */ -#define _PC_NO_TRUNC 8 /* trunc or error on >NAME_MAX */ -#define _PC_VDISABLE 9 /* best char to shut off tty c_cc */ -#define _PC_LAST 9 /* highest value of any _PC_* */ - -#define STDIN_FILENO 0 -#define STDOUT_FILENO 1 -#define STDERR_FILENO 2 - -#ifndef NULL -#define NULL 0 -#endif - -#ifndef _POSIX_SOURCE -/* - * SVID lockf() requests - */ -#define F_ULOCK 0 /* Unlock a previously locked region */ -#define F_LOCK 1 /* Lock a region for exclusive use */ -#define F_TLOCK 2 /* Test and lock a region for exclusive use */ -#define F_TEST 3 /* Test a region for other processes locks */ - -/* Path names: */ -#define GF_PATH "/etc/group" -#define PF_PATH "/etc/passwd" - -#endif /* !_POSIX_SOURCE */ - -/* - * lseek & access args - * - * SEEK_* have to track L_* in sys/file.h & SEEK_* in 5include/stdio.h - * ?_OK have to track ?_OK in sys/file.h - */ -#ifndef SEEK_SET -#define SEEK_SET 0 /* Set file pointer to "offset" */ -#define SEEK_CUR 1 /* Set file pointer to current plus "offset" */ -#define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ -#endif - -#define F_OK 0 /* does file exist */ -#define X_OK 1 /* is it executable by caller */ -#define W_OK 2 /* is it writable by caller */ -#define R_OK 4 /* is it readable by caller */ - -#include <sys/types.h> - -extern void _exit(int); -extern int access(char *, int); -extern unsigned alarm(unsigned); -extern int chdir(char *); -extern int chmod(char *, mode_t); -extern int chown(char *, uid_t, gid_t); -extern int close(int); -extern char *ctermid(char *); -extern char *cuserid(char *); -extern int dup(int); -extern int dup2(int, int); -extern int execl(char *, ...); -extern int execle(char *, ...); -extern int execlp(char *, ...); -extern int execv(char *, char *[]); -extern int execve(char *, char *[], char *[]); -extern int execvp(char *, char *[]); -extern pid_t fork(void); -extern long fpathconf(int, int); -extern char *getcwd(char *, int); -extern gid_t getegid(void); -extern uid_t geteuid(void); -extern gid_t getgid(void); -extern int getgroups(int, gid_t []); -extern char *getlogin(void); -extern pid_t getpgrp(void); -extern pid_t getpid(void); -extern pid_t getppid(void); -extern uid_t getuid(void); -extern int isatty(int); -extern int link(char *, char *); -extern off_t lseek(int, off_t, int); -extern long pathconf(char *, int); -extern int pause(void); -extern int pipe(int [2]); -extern int read(int, char *, int); -extern int rmdir(char *); -extern int setgid(gid_t); -extern int setpgid(pid_t, pid_t); -extern pid_t setsid(void); -extern int setuid(uid_t); -extern unsigned sleep(unsigned int); -extern long sysconf(int); -extern pid_t tcgetpgrp(int); -extern int tcsetpgrp(int, pid_t); -extern char *ttyname(int); -extern int unlink(char *); -extern int write(int, char *, int); - -#ifdef __cplusplus -} -#endif - -#endif /* _BC_SYS_UNISTD_H */ diff --git a/usr/src/lib/libbc/inc/include/utmp.h b/usr/src/lib/libbc/inc/include/utmp.h deleted file mode 100644 index 195f035d2b..0000000000 --- a/usr/src/lib/libbc/inc/include/utmp.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1987 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifndef _utmp_h -#define _utmp_h - -/* - * Structure of utmp and wtmp files. - * - * XXX - Assuming the number 8 is unwise. - */ -struct utmp { - char ut_line[8]; /* tty name */ - char ut_name[8]; /* user id */ - char ut_host[16]; /* host name, if remote */ - long ut_time; /* time on */ -}; - -/* - * This is a utmp entry that does not correspond to a genuine user - */ -#define nonuser(ut) ((ut).ut_host[0] == 0 && \ - strncmp((ut).ut_line, "tty", 3) == 0 && ((ut).ut_line[3] == 'p' \ - || (ut).ut_line[3] == 'q' \ - || (ut).ut_line[3] == 'r' \ - || (ut).ut_line[3] == 's')) - -#endif /*!_utmp_h*/ diff --git a/usr/src/lib/libbc/inc/include/values.h b/usr/src/lib/libbc/inc/include/values.h deleted file mode 100644 index ce1bc43299..0000000000 --- a/usr/src/lib/libbc/inc/include/values.h +++ /dev/null @@ -1,147 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1989 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* Copyright (c) 1984 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifndef _values_h -#define _values_h - -/* These values work with any binary representation of integers - * where the high-order bit contains the sign. */ - -/* a number used normally for size of a shift */ -#if gcos -#define BITSPERBYTE 9 -#else -#define BITSPERBYTE 8 -#endif -#define BITS(type) (BITSPERBYTE * (int)sizeof(type)) - -/* short, regular and long ints with only the high-order bit turned on */ -#define HIBITS ((short)(1 << BITS(short) - 1)) -#define HIBITI (1U << BITS(int) - 1) -#define HIBITL (1UL << BITS(long) - 1) - -/* largest short, regular and long int */ -#define MAXSHORT ((short)~HIBITS) -#define MAXINT ((int)~HIBITI) -#define MAXLONG ((long)~HIBITL) - -/* various values that describe the binary floating-point representation - * _EXPBASE - the exponent base - * DMAXEXP - the maximum exponent of a double (as returned by frexp()) - * FMAXEXP - the maximum exponent of a float (as returned by frexp()) - * DMINEXP - the minimum exponent of a double (as returned by frexp()) - * FMINEXP - the minimum exponent of a float (as returned by frexp()) - * MAXDOUBLE - the largest double - ((_EXPBASE ** DMAXEXP) * (1 - (_EXPBASE ** -DSIGNIF))) - * MAXFLOAT - the largest float - ((_EXPBASE ** FMAXEXP) * (1 - (_EXPBASE ** -FSIGNIF))) - * MINDOUBLE - the smallest double (_EXPBASE ** (DMINEXP - 1)) - * MINFLOAT - the smallest float (_EXPBASE ** (FMINEXP - 1)) - * DSIGNIF - the number of significant bits in a double - * FSIGNIF - the number of significant bits in a float - * DMAXPOWTWO - the largest power of two exactly representable as a double - * FMAXPOWTWO - the largest power of two exactly representable as a float - * _IEEE - 1 if IEEE standard representation is used - * _DEXPLEN - the number of bits for the exponent of a double - * _FEXPLEN - the number of bits for the exponent of a float - * _HIDDENBIT - 1 if high-significance bit of mantissa is implicit - * LN_MAXDOUBLE - the natural log of the largest double -- log(MAXDOUBLE) - * LN_MINDOUBLE - the natural log of the smallest double -- log(MINDOUBLE) - * LN_MAXFLOAT - the natural log of the largest float - * LN_MINFLOAT - the natural log of the smallest float - */ -#if u3b || u3b5 || sun -#define MAXDOUBLE 1.797693134862315708e+308 -#define MAXFLOAT ((float)3.40282346638528860e+38) -#define MINDOUBLE 4.94065645841246544e-324 -#define MINFLOAT ((float)1.40129846432481707e-45) -#define _IEEE 1 -#define _DEXPLEN 11 -#define _HIDDENBIT 1 -#define DMINEXP (-(DMAXEXP + DSIGNIF - _HIDDENBIT - 3)) -#define FMINEXP (-(FMAXEXP + FSIGNIF - _HIDDENBIT - 3)) -#define LN_MAXFLOAT 8.8722839052068e+01 -#define LN_MINFLOAT -1.03278929903432e+02 -#endif -#if pdp11 || vax -#define MAXDOUBLE 1.701411834604692293e+38 -#define MAXFLOAT ((float)1.701411733192644299e+38) -/* The following is kludged because the PDP-11 compilers botch the simple form. - The kludge causes the constant to be computed at run-time on the PDP-11, - even though it is still "folded" at compile-time on the VAX. */ -#define MINDOUBLE (0.01 * 2.938735877055718770e-37) -#define MINFLOAT ((float)MINDOUBLE) -#define _IEEE 0 -#define _DEXPLEN 8 -#define _HIDDENBIT 1 -#define DMINEXP (-DMAXEXP) -#define FMINEXP (-FMAXEXP) -#endif -#if gcos -#define MAXDOUBLE 1.7014118346046923171e+38 -#define MAXFLOAT ((float)1.7014118219281863150e+38) -#define MINDOUBLE 2.9387358770557187699e-39 -#define MINFLOAT ((float)MINDOUBLE) -#define _IEEE 0 -#define _DEXPLEN 8 -#define _HIDDENBIT 0 -#define DMINEXP (-(DMAXEXP + 1)) -#define FMINEXP (-(FMAXEXP + 1)) -#endif -#if u370 -#define _LENBASE 4 -#else -#define _LENBASE 1 -#endif -#define _EXPBASE (1 << _LENBASE) -#define _FEXPLEN 8 -#define DSIGNIF (BITS(double) - _DEXPLEN + _HIDDENBIT - 1) -#define FSIGNIF (BITS(float) - _FEXPLEN + _HIDDENBIT - 1) -#define DMAXPOWTWO ((double)(1L << BITS(long) - 2) * \ - (1L << DSIGNIF - BITS(long) + 1)) -#define FMAXPOWTWO ((float)(1L << FSIGNIF - 1)) -#define DMAXEXP ((1 << _DEXPLEN - 1) - 1 + _IEEE) -#define FMAXEXP ((1 << _FEXPLEN - 1) - 1 + _IEEE) -#define LN_MAXDOUBLE (M_LN2 * DMAXEXP) -#define LN_MINDOUBLE (M_LN2 * (DMINEXP - 1)) - -#define H_PREC (DSIGNIF % 2 ? (1L << DSIGNIF/2) * M_SQRT2 : 1L << DSIGNIF/2) -#define X_EPS (1.0/H_PREC) -#define X_PLOSS ((double)(long)(M_PI * H_PREC)) -#define X_TLOSS (M_PI * DMAXPOWTWO) -#define M_LN2 0.69314718055994530942 -#define M_PI 3.14159265358979323846 -#define M_SQRT2 1.41421356237309504880 -#define MAXBEXP DMAXEXP /* for backward compatibility */ -#define MINBEXP DMINEXP /* for backward compatibility */ -#define MAXPOWTWO DMAXPOWTWO /* for backward compatibility */ - -#endif /*!_values_h*/ diff --git a/usr/src/lib/libbc/inc/include/vfork.h b/usr/src/lib/libbc/inc/include/vfork.h deleted file mode 100644 index 20bf11f0d4..0000000000 --- a/usr/src/lib/libbc/inc/include/vfork.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Copyright (c) 1986 by Sun Microsystems, Inc. - */ - -/* - * this atrocity is necessary on sparc because registers modified - * by the child get propagated back to the parent via the window - * save/restore mechanism. - */ - -#ifndef _vfork_h -#define _vfork_h - -extern int vfork(); - -#ifdef sparc -#pragma unknown_control_flow(vfork) -#endif - -#endif /*!_vfork_h*/ diff --git a/usr/src/lib/libbc/inc/include/vm/faultcode.h b/usr/src/lib/libbc/inc/include/vm/faultcode.h deleted file mode 100644 index 0b6d54bb9b..0000000000 --- a/usr/src/lib/libbc/inc/include/vm/faultcode.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 1987 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _vm_faultcode_h -#define _vm_faultcode_h - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * This file describes the "code" that is delivered during - * SIGBUS and SIGSEGV exceptions. It also describes the data - * type returned by vm routines which handle faults. - * - * If FC_CODE(fc) == FC_OBJERR, then FC_ERRNO(fc) contains the errno value - * returned by the underlying object mapped at the fault address. - */ -#define FC_HWERR 0x1 /* misc hardware error (e.g. bus timeout) */ -#define FC_ALIGN 0x2 /* hardware alignment error */ -#define FC_NOMAP 0x3 /* no mapping at the fault address */ -#define FC_PROT 0x4 /* access exceeded current protections */ -#define FC_OBJERR 0x5 /* underlying object returned errno value */ - -#define FC_MAKE_ERR(e) (((e) << 8) | FC_OBJERR) - -#define FC_CODE(fc) ((fc) & 0xff) -#define FC_ERRNO(fc) ((unsigned)(fc) >> 8) - -#ifndef LOCORE -typedef int faultcode_t; /* type returned by vm fault routines */ -#endif /* LOCORE */ - -#endif /* !_vm_faultcode_h */ |
