00001 /***************************************************************************************** 00002 Copyright (c) 2002-2004 The UbixOS Project 00003 All rights reserved. 00004 00005 Redistribution and use in source and binary forms, with or without modification, are 00006 permitted provided that the following conditions are met: 00007 00008 Redistributions of source code must retain the above copyright notice, this list of 00009 conditions, the following disclaimer and the list of authors. Redistributions in binary 00010 form must reproduce the above copyright notice, this list of conditions, the following 00011 disclaimer and the list of authors in the documentation and/or other materials provided 00012 with the distribution. Neither the name of the UbixOS Project nor the names of its 00013 contributors may be used to endorse or promote products derived from this software 00014 without specific prior written permission. 00015 00016 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 00017 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 00018 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 00019 THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 00020 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 00021 OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00022 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 00023 TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00024 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00025 00026 $Id$ 00027 00028 *****************************************************************************************/ 00029 00030 #ifndef _SYSPROTO_H 00031 #define _SYSPROTO_H 00032 00033 #include <sys/signal.h> 00034 00035 typedef int register_t; 00036 00037 #define PAD_(t) (sizeof(register_t) <= sizeof(t) ? \ 00038 0 : sizeof(register_t) - sizeof(t)) 00039 00040 #if BYTE_ORDER == LITTLE_ENDIAN 00041 #define PADL_(t) 0 00042 #define PADR_(t) PAD_(t) 00043 #else 00044 #define PADL_(t) PAD_(t) 00045 #define PADR_(t) 0 00046 #endif 00047 00048 00049 struct write_args { 00050 char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; 00051 char buf_l_[PADL_(const void *)]; const void * buf; char buf_r_[PADR_(const void *)]; 00052 char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)]; 00053 }; 00054 00055 struct sysctl_args { 00056 char name_l_[PADL_(int *)]; int * name; char name_r_[PADR_(int *)]; 00057 char namelen_l_[PADL_(u_int)]; u_int namelen; char namelen_r_[PADR_(u_int)]; 00058 char old_l_[PADL_(void *)]; void * old; char old_r_[PADR_(void *)]; 00059 char oldlenp_l_[PADL_(size_t *)]; size_t * oldlenp; char oldlenp_r_[PADR_(size_t *)]; 00060 char new_l_[PADL_(void *)]; void * new; char new_r_[PADR_(void *)]; 00061 char newlen_l_[PADL_(size_t)]; size_t newlen; char newlen_r_[PADR_(size_t)]; 00062 }; 00063 00064 struct getpid_args { 00065 register_t dummy; 00066 }; 00067 struct issetugid_args { 00068 register_t dummy; 00069 }; 00070 struct fcntl_args { 00071 char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; 00072 char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; 00073 char arg_l_[PADL_(long)]; long arg; char arg_r_[PADR_(long)]; 00074 }; 00075 00076 struct pipe_args { 00077 register_t dummy; 00078 }; 00079 00080 struct readlink_args { 00081 char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; 00082 char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)]; 00083 char count_l_[PADL_(int)]; int count; char count_r_[PADR_(int)]; 00084 }; 00085 00086 struct getuid_args { 00087 register_t dummy; 00088 }; 00089 00090 struct getgid_args { 00091 register_t dummy; 00092 }; 00093 struct close_args { 00094 char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; 00095 }; 00096 00097 struct mmap_args { 00098 char addr_l_[PADL_(caddr_t)]; caddr_t addr; char addr_r_[PADR_(caddr_t)]; 00099 char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; 00100 char prot_l_[PADL_(int)]; int prot; char prot_r_[PADR_(int)]; 00101 char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; 00102 char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; 00103 char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; 00104 char pos_l_[PADL_(off_t)]; off_t pos; char pos_r_[PADR_(off_t)]; 00105 }; 00106 00107 struct obreak_args { 00108 char nsize_l_[PADL_(char *)];char * nsize;char nsize_r_[PADR_(char *)]; 00109 }; 00110 00111 struct sigaction_args { 00112 char sig_l_[PADL_(int)]; int sig; char sig_r_[PADR_(int)]; 00113 char act_l_[PADL_(const struct sigaction *)]; const struct sigaction * act; char act_r_[PADR_(const struct sigaction *)]; 00114 char oact_l_[PADL_(struct sigaction *)]; struct sigaction * oact; char oact_r_[PADR_(struct sigaction *)]; 00115 }; 00116 00117 struct getdtablesize_args { 00118 register_t dummy; 00119 }; 00120 00121 struct munmap_args { 00122 char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)]; 00123 char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; 00124 }; 00125 00126 struct sigprocmask_args { 00127 char how_l_[PADL_(int)]; int how; char how_r_[PADR_(int)]; 00128 char set_l_[PADL_(const sigset_t *)]; const sigset_t * set; char set_r_[PADR_(const sigset_t *)]; 00129 char oset_l_[PADL_(sigset_t *)]; sigset_t * oset; char oset_r_[PADR_(sigset_t *)]; 00130 }; 00131 struct gettimeofday_args { 00132 char tp_l_[PADL_(struct timeval *)]; struct timeval * tp; char tp_r_[PADR_(struct timeval *)]; 00133 char tzp_l_[PADL_(struct timezone *)]; struct timezone * tzp; char tzp_r_[PADR_(struct timezone *)]; 00134 }; 00135 struct fstat_args { 00136 char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; 00137 char sb_l_[PADL_(struct stat *)]; struct stat * sb; char sb_r_[PADR_(struct stat *)]; 00138 }; 00139 struct ioctl_args { 00140 char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; 00141 char com_l_[PADL_(u_long)]; u_long com; char com_r_[PADR_(u_long)]; 00142 char data_l_[PADL_(caddr_t)]; caddr_t data; char data_r_[PADR_(caddr_t)]; 00143 }; 00144 struct open_args { 00145 char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; 00146 char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; 00147 char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)]; 00148 }; 00149 struct read_args { 00150 char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; 00151 char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)]; 00152 char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)]; 00153 }; 00154 00155 00156 #endif 00157 00158 /*** 00159 END 00160 ***/ 00161