diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index 21aa343c7939..48ba50ded34d 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -107,8 +107,6 @@ u_int sf_buf_alloc_want; #define COMPAT_OLDSOCK #endif -extern struct fileops socketops; - /* * MPSAFE */ diff --git a/sys/sys/file.h b/sys/sys/file.h index 77344d095eb0..5161b83d5b64 100644 --- a/sys/sys/file.h +++ b/sys/sys/file.h @@ -161,6 +161,20 @@ int fget_write(struct thread *td, int fd, struct file **fpp); int fdrop(struct file *fp, struct thread *td); int fdrop_locked(struct file *fp, struct thread *td); +/* + * The socket operations are used a couple of places. + * XXX: This is wrong, they should go through the operations vector for + * XXX: sockets instead of going directly for the individual functions. /phk + */ +fo_rdwr_t soo_read; +fo_rdwr_t soo_write; +fo_ioctl_t soo_ioctl; +fo_poll_t soo_poll; +fo_kqfilter_t soo_kqfilter; +fo_stat_t soo_stat; +fo_close_t soo_close; +extern struct fileops socketops; + /* Lock a file. */ #define FILE_LOCK(f) mtx_lock((f)->f_mtxp) #define FILE_UNLOCK(f) mtx_unlock((f)->f_mtxp) diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h index 20cb365c5990..7046c450d6a9 100644 --- a/sys/sys/socketvar.h +++ b/sys/sys/socketvar.h @@ -338,31 +338,11 @@ extern u_long sb_max; extern struct uma_zone *socket_zone; extern so_gen_t so_gencnt; -struct file; -struct filedesc; -struct knote; struct mbuf; struct sockaddr; -struct stat; struct ucred; struct uio; -/* - * File operations on sockets. - */ -int soo_read(struct file *fp, struct uio *uio, struct ucred *active_cred, - int flags, struct thread *td); -int soo_write(struct file *fp, struct uio *uio, - struct ucred *active_cred, int flags, struct thread *td); -int soo_close(struct file *fp, struct thread *td); -int soo_ioctl(struct file *fp, u_long cmd, void *data, - struct ucred *active_cred, struct thread *td); -int soo_poll(struct file *fp, int events, struct ucred *active_cred, - struct thread *td); -int soo_stat(struct file *fp, struct stat *ub, struct ucred *active_cred, - struct thread *td); -int soo_kqfilter(struct file *fp, struct knote *kn); - /* * From uipc_socket and friends */