xref: /dflybsd-src/sys/sys/kern_syscall.h (revision 126930838c73dbde9fa69a103e6372d95507d840)
15969a6f1SDavid P. Reese, Jr. /*
25969a6f1SDavid P. Reese, Jr.  * KERN_SYSCALL.H	- Split syscall prototypes
35969a6f1SDavid P. Reese, Jr.  *
45969a6f1SDavid P. Reese, Jr.  * Copyright (c) 2003 David P. Reese, Jr. <daver@gomerbud.com>
55969a6f1SDavid P. Reese, Jr.  * All rights reserved.
65969a6f1SDavid P. Reese, Jr.  *
75969a6f1SDavid P. Reese, Jr.  * Redistribution and use in source and binary forms, with or without
85969a6f1SDavid P. Reese, Jr.  * modification, are permitted provided that the following conditions
95969a6f1SDavid P. Reese, Jr.  * are met:
105969a6f1SDavid P. Reese, Jr.  * 1. Redistributions of source code must retain the above copyright
115969a6f1SDavid P. Reese, Jr.  *    notice, this list of conditions and the following disclaimer.
125969a6f1SDavid P. Reese, Jr.  * 2. Redistributions in binary form must reproduce the above copyright
135969a6f1SDavid P. Reese, Jr.  *    notice, this list of conditions and the following disclaimer in the
145969a6f1SDavid P. Reese, Jr.  *    documentation and/or other materials provided with the distribution.
155969a6f1SDavid P. Reese, Jr.  *
165969a6f1SDavid P. Reese, Jr.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
175969a6f1SDavid P. Reese, Jr.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
185969a6f1SDavid P. Reese, Jr.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
195969a6f1SDavid P. Reese, Jr.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
205969a6f1SDavid P. Reese, Jr.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
215969a6f1SDavid P. Reese, Jr.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
225969a6f1SDavid P. Reese, Jr.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
235969a6f1SDavid P. Reese, Jr.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
245969a6f1SDavid P. Reese, Jr.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
255969a6f1SDavid P. Reese, Jr.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
265969a6f1SDavid P. Reese, Jr.  * SUCH DAMAGE.
275969a6f1SDavid P. Reese, Jr.  *
28*12693083SMatthew Dillon  * $DragonFly: src/sys/sys/kern_syscall.h,v 1.21 2004/11/18 13:09:53 dillon Exp $
295969a6f1SDavid P. Reese, Jr.  */
305969a6f1SDavid P. Reese, Jr. 
315969a6f1SDavid P. Reese, Jr. #ifndef _SYS_KERN_SYSCALL_H_
325969a6f1SDavid P. Reese, Jr. #define _SYS_KERN_SYSCALL_H_
335969a6f1SDavid P. Reese, Jr. 
34dda4b42bSDavid P. Reese, Jr. enum dup_type {DUP_FIXED, DUP_VARIABLE};
35dda4b42bSDavid P. Reese, Jr. union fcntl_dat;
362bd9d75cSDavid P. Reese, Jr. struct image_args;
373e1837ceSDavid P. Reese, Jr. struct mbuf;
3835fbb1d9SDavid P. Reese, Jr. struct msghdr;
3921739618SMatthew Dillon struct namecache;
4021739618SMatthew Dillon struct nlookupdata;
419697c509SDavid P. Reese, Jr. struct rlimit;
429697c509SDavid P. Reese, Jr. struct rusage;
4365957d54SDavid P. Reese, Jr. struct sigaction;
4465957d54SDavid P. Reese, Jr. struct sigaltstack;
4565957d54SDavid P. Reese, Jr. struct __sigset;
4675a872f8SDavid P. Reese, Jr. struct sf_hdtr;
473e1837ceSDavid P. Reese, Jr. struct sockaddr;
4875a872f8SDavid P. Reese, Jr. struct socket;
49201305adSDavid P. Reese, Jr. struct sockopt;
5065957d54SDavid P. Reese, Jr. struct stat;
519697c509SDavid P. Reese, Jr. struct statfs;
529697c509SDavid P. Reese, Jr. struct timeval;
53ba023347SDavid P. Reese, Jr. struct uio;
5475a872f8SDavid P. Reese, Jr. struct vnode;
555969a6f1SDavid P. Reese, Jr. 
56ba023347SDavid P. Reese, Jr. /*
57ba023347SDavid P. Reese, Jr.  * Prototypes for syscalls in kern/kern_descrip.c
58ba023347SDavid P. Reese, Jr.  */
59ba023347SDavid P. Reese, Jr. int kern_dup(enum dup_type type, int old, int new, int *res);
60ba023347SDavid P. Reese, Jr. int kern_fcntl(int fd, int cmd, union fcntl_dat *dat);
618f6f8622SDavid P. Reese, Jr. int kern_fstat(int fd, struct stat *st);
62ba023347SDavid P. Reese, Jr. 
63ba023347SDavid P. Reese, Jr. /*
642bd9d75cSDavid P. Reese, Jr.  * Prototypes for syscalls in kern/kern_exec.c
652bd9d75cSDavid P. Reese, Jr.  */
66fad57d0eSMatthew Dillon int kern_execve(struct nlookupdata *nd, struct image_args *args);
672bd9d75cSDavid P. Reese, Jr. 
682bd9d75cSDavid P. Reese, Jr. /*
699697c509SDavid P. Reese, Jr.  * Prototypes for syscalls in kern/kern_exit.c
709697c509SDavid P. Reese, Jr.  */
719697c509SDavid P. Reese, Jr. int kern_wait(pid_t pid, int *status, int options, struct rusage *rusage,
729697c509SDavid P. Reese, Jr. 	int *res);
739697c509SDavid P. Reese, Jr. 
749697c509SDavid P. Reese, Jr. /*
7565957d54SDavid P. Reese, Jr.  * Prototypes for syscalls in kern/kern_sig.c
7665957d54SDavid P. Reese, Jr.  */
7765957d54SDavid P. Reese, Jr. int kern_sigaction(int sig, struct sigaction *act, struct sigaction *oact);
7865957d54SDavid P. Reese, Jr. int kern_sigprocmask(int how, struct __sigset *set, struct __sigset *oset);
7965957d54SDavid P. Reese, Jr. int kern_sigpending(struct __sigset *set);
8065957d54SDavid P. Reese, Jr. int kern_sigsuspend(struct __sigset *mask);
8165957d54SDavid P. Reese, Jr. int kern_sigaltstack(struct sigaltstack *ss, struct sigaltstack *oss);
8265957d54SDavid P. Reese, Jr. int kern_kill(int sig, int id);
8365957d54SDavid P. Reese, Jr. 
8465957d54SDavid P. Reese, Jr. /*
85ba023347SDavid P. Reese, Jr.  * Prototypes for syscalls in kern/sys_generic.c
86ba023347SDavid P. Reese, Jr.  */
87ba023347SDavid P. Reese, Jr. int kern_readv(int fd, struct uio *auio, int flags, int *res);
88ba023347SDavid P. Reese, Jr. int kern_writev(int fd, struct uio *auio, int flags, int *res);
89ba023347SDavid P. Reese, Jr. 
90ba023347SDavid P. Reese, Jr. /*
919697c509SDavid P. Reese, Jr.  * Prototypes for syscalls in kern/kern_resource.c
929697c509SDavid P. Reese, Jr.  */
939697c509SDavid P. Reese, Jr. int kern_setrlimit(u_int which, struct rlimit *limp);
949697c509SDavid P. Reese, Jr. int kern_getrlimit(u_int which, struct rlimit *limp);
959697c509SDavid P. Reese, Jr. 
969697c509SDavid P. Reese, Jr. /*
97ba023347SDavid P. Reese, Jr.  * Prototypes for syscalls in kern/uipc_syscalls.c
98ba023347SDavid P. Reese, Jr.  */
995969a6f1SDavid P. Reese, Jr. int kern_accept(int s, struct sockaddr **name, int *namelen, int *res);
1005969a6f1SDavid P. Reese, Jr. int kern_bind(int s, struct sockaddr *sa);
1015969a6f1SDavid P. Reese, Jr. int kern_connect(int s, struct sockaddr *sa);
1025969a6f1SDavid P. Reese, Jr. int kern_listen(int s, int backlog);
1035969a6f1SDavid P. Reese, Jr. int kern_getpeername(int s, struct sockaddr **name, int *namelen);
104201305adSDavid P. Reese, Jr. int kern_getsockopt(int s, struct sockopt *sopt);
1055969a6f1SDavid P. Reese, Jr. int kern_getsockname(int s, struct sockaddr **name, int *namelen);
1063e1837ceSDavid P. Reese, Jr. int kern_recvmsg(int s, struct sockaddr **sa, struct uio *auio,
1073e1837ceSDavid P. Reese, Jr. 	struct mbuf **control, int *flags, int *res);
10875a872f8SDavid P. Reese, Jr. int kern_shutdown(int s, int how);
10975a872f8SDavid P. Reese, Jr. int kern_sendfile(struct vnode *vp, int s, off_t offset, size_t nbytes,
11030eeba44SJeffrey Hsu 	struct mbuf *mheader, off_t *sbytes, int flags);
1113e1837ceSDavid P. Reese, Jr. int kern_sendmsg(int s, struct sockaddr *sa, struct uio *auio,
1123e1837ceSDavid P. Reese, Jr. 	struct mbuf *control, int flags, int *res);
113201305adSDavid P. Reese, Jr. int kern_setsockopt(int s, struct sockopt *sopt);
11475a872f8SDavid P. Reese, Jr. int kern_socket(int domain, int type, int protocol, int *res);
1155969a6f1SDavid P. Reese, Jr. int kern_socketpair(int domain, int type, int protocol, int *sockv);
1165969a6f1SDavid P. Reese, Jr. 
1178f6f8622SDavid P. Reese, Jr. /*
1188f6f8622SDavid P. Reese, Jr.  * Prototypes for syscalls in kern/vfs_syscalls.c
1198f6f8622SDavid P. Reese, Jr.  */
120fad57d0eSMatthew Dillon int kern_access(struct nlookupdata *nd, int aflags);
12121739618SMatthew Dillon int kern_chdir(struct nlookupdata *nd);
122fad57d0eSMatthew Dillon int kern_chmod(struct nlookupdata *nd, int mode);
123fad57d0eSMatthew Dillon int kern_chown(struct nlookupdata *nd, int uid, int gid);
12421739618SMatthew Dillon /*int kern_chroot(struct namecache *ncp);*/
1259697c509SDavid P. Reese, Jr. int kern_fstatfs(int fd, struct statfs *buf);
1268f6f8622SDavid P. Reese, Jr. int kern_ftruncate(int fd, off_t length);
1279697c509SDavid P. Reese, Jr. int kern_futimes(int fd, struct timeval *tptr);
1289697c509SDavid P. Reese, Jr. int kern_getdirentries(int fd, char *buf, u_int count, long *basep, int *res);
129fad57d0eSMatthew Dillon int kern_link(struct nlookupdata *nd, struct nlookupdata *linknd);
1305a3fe67dSMatthew Dillon int kern_lseek(int fd, off_t offset, int whence, off_t *res);
131fad57d0eSMatthew Dillon int kern_mkdir(struct nlookupdata *nd, int mode);
132fad57d0eSMatthew Dillon int kern_mkfifo(struct nlookupdata *nd, int mode);
133fad57d0eSMatthew Dillon int kern_mknod(struct nlookupdata *nd, int mode, int dev);
134fad57d0eSMatthew Dillon int kern_open(struct nlookupdata *nd, int flags, int mode, int *res);
135*12693083SMatthew Dillon int kern_close(int fd);
136fad57d0eSMatthew Dillon int kern_readlink(struct nlookupdata *nd, char *buf, int count, int *res);
137fad57d0eSMatthew Dillon int kern_rename(struct nlookupdata *fromnd, struct nlookupdata *tond);
138fad57d0eSMatthew Dillon int kern_rmdir(struct nlookupdata *nd);
13921739618SMatthew Dillon int kern_stat(struct nlookupdata *nd, struct stat *st);
140fad57d0eSMatthew Dillon int kern_statfs(struct nlookupdata *nd, struct statfs *buf);
141fad57d0eSMatthew Dillon int kern_symlink(struct nlookupdata *nd, char *path, int mode);
142fad57d0eSMatthew Dillon int kern_truncate(struct nlookupdata *nd, off_t length);
143fad57d0eSMatthew Dillon int kern_unlink(struct nlookupdata *nd);
144fad57d0eSMatthew Dillon int kern_utimes(struct nlookupdata *nd, struct timeval *tptr);
1458f6f8622SDavid P. Reese, Jr. 
146a0ff68c9SDavid P. Reese, Jr. /*
14763f58b90SEirik Nygaard  * Prototypes for syscalls in kern/vfs_cache.c
14863f58b90SEirik Nygaard  */
14902680f1bSMatthew Dillon char *kern_getcwd(char *, size_t, int *);
15063f58b90SEirik Nygaard 
15163f58b90SEirik Nygaard /*
152a0ff68c9SDavid P. Reese, Jr.  * Prototypes for syscalls in vm/vm_mmap.c
153a0ff68c9SDavid P. Reese, Jr.  */
154a0ff68c9SDavid P. Reese, Jr. int kern_mmap(caddr_t addr, size_t len, int prot, int flags, int fd,
155a0ff68c9SDavid P. Reese, Jr. 	off_t pos, void **res);
156a0ff68c9SDavid P. Reese, Jr. 
1575969a6f1SDavid P. Reese, Jr. #endif /* !_SYS_KERN_SYSCALL_H_ */
158