Pengetahuan Kernel (21) – Struktur Data Linux (21) – socket

Tiap-tiap struktur data socket menangani informasi tentang soket BSD. Dia tidak akan muncul secara independen, karena merupakan bagian dari struktur data  inode VFS.

[sourcecode language=”cpp”]
struct socket {
short type; /* SOCK_STREAM, … */
socket_state state;
long flags;
struct proto_ops *ops; /* protocols do most everything */
void *data; /* protocol data */
struct socket *conn; /* server socket connected to */
struct socket *iconn; /* incomplete client conn.s */
struct socket *next;
struct wait_queue **wait; /* ptr to place to wait on */
struct inode *inode;
struct fasync_struct *fasync_list; /* Asynchronous wake up list */
struct file *file; /* File back pointer for gc */
Sumber :

Be the first to comment

Leave a Reply

Your email address will not be published.