FreeBSD kernel kern code
sys_socket.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/file.h>
#include <sys/filedesc.h>
#include <sys/proc.h>
#include <sys/protosw.h>
#include <sys/sigio.h>
#include <sys/signal.h>
#include <sys/signalvar.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
#include <sys/filio.h>
#include <sys/sockio.h>
#include <sys/stat.h>
#include <sys/uio.h>
#include <sys/ucred.h>
#include <net/if.h>
#include <net/route.h>
#include <net/vnet.h>
#include <security/mac/mac_framework.h>
Include dependency graph for sys_socket.c:

Go to the source code of this file.

Functions

 __FBSDID ("$BSDSUniX$")
 
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_truncate (struct file *fp, off_t length, struct ucred *active_cred, 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_close (struct file *fp, struct thread *td)
 

Variables

struct fileops socketops
 

Function Documentation

__FBSDID ( "$BSDSUniX$"  )
int soo_close ( struct file *  fp,
struct thread *  td 
)

Definition at line 284 of file sys_socket.c.

References badfileops, and soclose().

Here is the call graph for this function:

int soo_ioctl ( struct file *  fp,
u_long  cmd,
void *  data,
struct ucred *  active_cred,
struct thread *  td 
)

Definition at line 120 of file sys_socket.c.

References fgetown(), and fsetown().

Here is the call graph for this function:

int soo_poll ( struct file *  fp,
int  events,
struct ucred *  active_cred,
struct thread *  td 
)

Definition at line 228 of file sys_socket.c.

References sopoll().

Here is the call graph for this function:

int soo_read ( struct file *  fp,
struct uio *  uio,
struct ucred *  active_cred,
int  flags,
struct thread *  td 
)

Definition at line 74 of file sys_socket.c.

References soreceive().

Here is the call graph for this function:

int soo_stat ( struct file *  fp,
struct stat *  ub,
struct ucred *  active_cred,
struct thread *  td 
)

Definition at line 243 of file sys_socket.c.

int soo_truncate ( struct file *  fp,
off_t  length,
struct ucred *  active_cred,
struct thread *  td 
)

Definition at line 112 of file sys_socket.c.

int soo_write ( struct file *  fp,
struct uio *  uio,
struct ucred *  active_cred,
int  flags,
struct thread *  td 
)

Definition at line 91 of file sys_socket.c.

References sosend(), and tdsignal().

Here is the call graph for this function:

Variable Documentation

struct fileops socketops
Initial value:
= {
.fo_read = soo_read,
.fo_write = soo_write,
.fo_truncate = soo_truncate,
.fo_ioctl = soo_ioctl,
.fo_poll = soo_poll,
.fo_kqfilter = soo_kqfilter,
.fo_stat = soo_stat,
.fo_close = soo_close,
.fo_chmod = invfo_chmod,
.fo_chown = invfo_chown,
.fo_flags = DFLAG_PASSABLE
}
int soo_write(struct file *fp, struct uio *uio, struct ucred *active_cred, int flags, struct thread *td)
Definition: sys_socket.c:91
int soo_kqfilter(struct file *fp, struct knote *kn)
Definition: uipc_socket.c:3085
int invfo_chmod(struct file *fp, mode_t mode, struct ucred *active_cred, struct thread *td)
int soo_stat(struct file *fp, struct stat *ub, struct ucred *active_cred, struct thread *td)
Definition: sys_socket.c:243
int soo_truncate(struct file *fp, off_t length, struct ucred *active_cred, struct thread *td)
Definition: sys_socket.c:112
int invfo_chown(struct file *fp, uid_t uid, gid_t gid, struct ucred *active_cred, struct thread *td)
int soo_close(struct file *fp, struct thread *td)
Definition: sys_socket.c:284
int soo_ioctl(struct file *fp, u_long cmd, void *data, struct ucred *active_cred, struct thread *td)
Definition: sys_socket.c:120
int soo_poll(struct file *fp, int events, struct ucred *active_cred, struct thread *td)
Definition: sys_socket.c:228
int soo_read(struct file *fp, struct uio *uio, struct ucred *active_cred, int flags, struct thread *td)
Definition: sys_socket.c:74

Definition at line 58 of file sys_socket.c.

Referenced by kern_accept(), kern_socketpair(), sys_sctp_peeloff(), and sys_socket().