Netsocketc

struct file_operations socket_file_ops = { .owner = THIS_MODULE,

.llseek = no_llseek,

.aio_read = sock_aio_read,

.aio_write = sock_aio_write, .poll = sock_poll,

.unlocked_ioctl = sock_ioctl, .compat_ioctl = compat_sock_ioctl, .mmap = sock_mmap,

.open = sock_no_open, /* special open code to disallow open via /proc */

.release = sock_close,

.fasync = sock_fasync,

.sendpage = sock_sendpage,

.splice_write = generic_splice_sendpage,

The sock_ functions are simple wrapper routines that invoke a sock_operations routine as shown in the following example of sock_mmap:

Continue reading here: The socketcall System Call

Was this article helpful?

0 0