syscallsubr.h revision 141484
1285163Sdim/*- 2285163Sdim * Copyright (c) 2002 Ian Dowse. All rights reserved. 3285163Sdim * 4285163Sdim * Redistribution and use in source and binary forms, with or without 5285163Sdim * modification, are permitted provided that the following conditions 6285163Sdim * are met: 7285163Sdim * 1. Redistributions of source code must retain the above copyright 8285163Sdim * notice, this list of conditions and the following disclaimer. 9285163Sdim * 2. Redistributions in binary form must reproduce the above copyright 10285163Sdim * notice, this list of conditions and the following disclaimer in the 11341825Sdim * documentation and/or other materials provided with the distribution. 12285163Sdim * 13285163Sdim * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14285163Sdim * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15285163Sdim * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16285163Sdim * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17285163Sdim * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18285163Sdim * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19285163Sdim * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20327952Sdim * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21285163Sdim * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22296417Sdim * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23296417Sdim * SUCH DAMAGE. 24296417Sdim * 25285163Sdim * $FreeBSD: head/sys/sys/syscallsubr.h 141484 2005-02-07 21:46:43Z jhb $ 26285163Sdim */ 27285163Sdim 28285163Sdim#ifndef _SYS_SYSCALLSUBR_H_ 29296417Sdim#define _SYS_SYSCALLSUBR_H_ 30285163Sdim 31285163Sdim#include <sys/signal.h> 32285163Sdim#include <sys/uio.h> 33285163Sdim#include <sys/socket.h> 34285163Sdim#include <sys/mac.h> 35285163Sdim#include <sys/mount.h> 36296417Sdim 37309124Sdimstruct itimerval; 38309124Sdimstruct image_args; 39309124Sdimstruct mbuf; 40296417Sdimstruct msghdr; 41309124Sdimstruct msqid_ds; 42296417Sdimstruct rlimit; 43309124Sdimstruct rusage; 44309124Sdimstruct sockaddr; 45309124Sdimstruct stat; 46296417Sdim 47309124Sdimint kern___getcwd(struct thread *td, u_char *buf, enum uio_seg bufseg, 48296417Sdim u_int buflen); 49296417Sdimint kern_access(struct thread *td, char *path, enum uio_seg pathseg, 50296417Sdim int flags); 51314564Sdimint kern_alternate_path(struct thread *td, const char *prefix, char *path, 52314564Sdim enum uio_seg pathseg, char **pathbuf, int create); 53314564Sdimint kern_bind(struct thread *td, int fd, struct sockaddr *sa); 54296417Sdimint kern_chdir(struct thread *td, char *path, enum uio_seg pathseg); 55314564Sdimint kern_chmod(struct thread *td, char *path, enum uio_seg pathseg, 56314564Sdim int mode); 57296417Sdimint kern_chown(struct thread *td, char *path, enum uio_seg pathseg, int uid, 58314564Sdim int gid); 59285163Sdimint kern_connect(struct thread *td, int fd, struct sockaddr *sa); 60285163Sdimint kern_execve(struct thread *td, struct image_args *args, 61285163Sdim struct mac *mac_p); 62285163Sdimint kern_fcntl(struct thread *td, int fd, int cmd, intptr_t arg); 63285163Sdimint kern_fhstatfs(struct thread *td, fhandle_t fh, struct statfs *buf); 64int kern_fstat(struct thread *td, int fd, struct stat *sbp); 65int kern_fstatfs(struct thread *td, int fd, struct statfs *buf); 66int kern_futimes(struct thread *td, int fd, struct timeval *tptr, 67 enum uio_seg tptrseg); 68int kern_getitimer(struct thread *, u_int, struct itimerval *); 69int kern_getrusage(struct thread *td, int who, struct rusage *rup); 70int kern_getsockopt(struct thread *td, int s, int level, int name, 71 void *optval, enum uio_seg valseg, socklen_t *valsize); 72int kern_lchown(struct thread *td, char *path, enum uio_seg pathseg, 73 int uid, int gid); 74int kern_link(struct thread *td, char *path, char *link, 75 enum uio_seg segflg); 76int kern_lstat(struct thread *td, char *path, enum uio_seg pathseg, 77 struct stat *sbp); 78int kern_lutimes(struct thread *td, char *path, enum uio_seg pathseg, 79 struct timeval *tptr, enum uio_seg tptrseg); 80int kern_mkdir(struct thread *td, char *path, enum uio_seg segflg, 81 int mode); 82int kern_mkfifo(struct thread *td, char *path, enum uio_seg pathseg, 83 int mode); 84int kern_mknod(struct thread *td, char *path, enum uio_seg pathseg, 85 int mode, int dev); 86int kern_msgctl(struct thread *, int, int, struct msqid_ds *); 87int kern_nanosleep(struct thread *td, struct timespec *rqt, 88 struct timespec *rmt); 89int kern_open(struct thread *td, char *path, enum uio_seg pathseg, 90 int flags, int mode); 91int kern_pathconf(struct thread *td, char *path, enum uio_seg pathseg, 92 int name); 93int kern_ptrace(struct thread *td, int req, pid_t pid, void *addr, 94 int data); 95int kern_readlink(struct thread *td, char *path, enum uio_seg pathseg, 96 char *buf, enum uio_seg bufseg, int count); 97int kern_rename(struct thread *td, char *from, char *to, 98 enum uio_seg pathseg); 99int kern_rmdir(struct thread *td, char *path, enum uio_seg pathseg); 100int kern_select(struct thread *td, int nd, fd_set *fd_in, fd_set *fd_ou, 101 fd_set *fd_ex, struct timeval *tvp); 102int kern_sendit(struct thread *td, int s, struct msghdr *mp, int flags, 103 struct mbuf *control, enum uio_seg segflg); 104int kern_setitimer(struct thread *, u_int, struct itimerval *, 105 struct itimerval *); 106int kern_setrlimit(struct thread *, u_int, struct rlimit *); 107int kern_setsockopt(struct thread *td, int s, int level, int name, 108 void *optval, enum uio_seg valseg, socklen_t valsize); 109int kern_shmat(struct thread *td, int shmid, const void *shmaddr, 110 int shmflg); 111int kern_shmctl(struct thread *td, int shmid, int cmd, void *buf, 112 size_t *bufsz); 113int kern_sigaction(struct thread *td, int sig, struct sigaction *act, 114 struct sigaction *oact, int flags); 115int kern_sigaltstack(struct thread *td, stack_t *ss, stack_t *oss); 116int kern_sigprocmask(struct thread *td, int how, 117 sigset_t *set, sigset_t *oset, int old); 118int kern_sigsuspend(struct thread *td, sigset_t mask); 119int kern_stat(struct thread *td, char *path, enum uio_seg pathseg, 120 struct stat *sbp); 121int kern_statfs(struct thread *td, char *path, enum uio_seg pathseg, 122 struct statfs *buf); 123int kern_symlink(struct thread *td, char *path, char *link, 124 enum uio_seg segflg); 125int kern_truncate(struct thread *td, char *path, enum uio_seg pathseg, 126 off_t length); 127int kern_unlink(struct thread *td, char *path, enum uio_seg pathseg); 128int kern_utimes(struct thread *td, char *path, enum uio_seg pathseg, 129 struct timeval *tptr, enum uio_seg tptrseg); 130int kern_wait(struct thread *td, pid_t pid, int *status, int options, 131 struct rusage *rup); 132 133/* flags for kern_sigaction */ 134#define KSA_OSIGSET 0x0001 /* uses osigact_t */ 135#define KSA_FREEBSD4 0x0002 /* uses ucontext4 */ 136 137#endif /* !_SYS_SYSCALLSUBR_H_ */ 138