This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
dido:public:ra:xapend:xapend.a_glossary:u:unix_domain_scoket [2021/07/26 14:19] murphy |
dido:public:ra:xapend:xapend.a_glossary:u:unix_domain_scoket [2021/10/04 13:40] (current) 50.19.247.197 ↷ Links adapted because of a move operation |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== UNIX Domain Scoket (Socket) ====== | + | ====== UNIX Domain Socket (Socket) ====== |
| - | [[dido:public:ra:xapend:xapend.a_glossary| Return to Glossary ]] | + | [[dido:public:ra:xapend:xapend.a_glossary:start| Return to Glossary ]] |
| - | A **[[dido:public:ra:xapend:xapend.a_glossary:u:unix]] Domain Socket (Socket)** or **Inter-Process Communication Socket (IPC socket)** is a data communications endpoint for exchanging data between processes executing on the same host operating system. Valid socket types in the UNIX domain are: | + | A **[[dido:public:ra:xapend:xapend.a_glossary:u:unix]] Domain Socket (Socket)** or **Inter-Process Communication Socket (IPC socket)** is a data communications [[dido:public:ra:xapend:xapend.a_glossary:e:endpoint|endpoint]] for exchanging data between processes executing on the same host [[dido:public:ra:xapend:xapend.a_glossary:o:os|operating system]]. Valid socket types in the UNIX domain are: |
| * SOCK_STREAM (compare to [[dido:public:ra:xapend:xapend.a_glossary:t:tcp]]) – for a stream-oriented socket | * SOCK_STREAM (compare to [[dido:public:ra:xapend:xapend.a_glossary:t:tcp]]) – for a stream-oriented socket | ||
| Line 12: | Line 12: | ||
| The [[dido:public:ra:xapend:xapend.a_glossary:a:api|API]] for UNIX Domain Sockets is similar to that of an Internet socket, but rather than using an underlying network protocol, all communication occurs entirely within the operating system kernel. UNIX Domain Sockets may use the file system as their address namespace. (Some operating systems, like Linux, offer additional namespaces.) Processes reference UNIX Domain Sockets as file system inodes, so two processes can communicate by opening the same socket. | The [[dido:public:ra:xapend:xapend.a_glossary:a:api|API]] for UNIX Domain Sockets is similar to that of an Internet socket, but rather than using an underlying network protocol, all communication occurs entirely within the operating system kernel. UNIX Domain Sockets may use the file system as their address namespace. (Some operating systems, like Linux, offer additional namespaces.) Processes reference UNIX Domain Sockets as file system inodes, so two processes can communicate by opening the same socket. | ||
| - | In addition to sending data, processes may send file descriptors across a UNIX Domain Socket connection using the ''sendmsg()'' and ''recvmsg()'' system calls. This allows the sending processes to grant the receiving process access to a file descriptor for which the receiving process otherwise does not have access. This can be used to implement a rudimentary form of capability-based security. For example, this allows the Clam AntiVirus scanner to run as an unprivileged daemon on Linux and BSD, yet still read any file sent to the daemon's Unix domain socket. | + | In addition to sending data, processes may send file descriptors across a UNIX Domain Socket connection using the ''sendmsg()'' and ''recvmsg()'' system calls. This allows the sending processes to grant the receiving process access to a file descriptor for which the receiving process otherwise does not have access. This can be used to implement a rudimentary form of capability-based security. For example, this allows the Clam AntiVirus scanner to run as an unprivileged [[dido:public:ra:xapend:xapend.a_glossary:d:daemon|daemon]] on Linux and BSD, yet still read any file sent to the daemon's Unix domain socket. |
| Source: [[URIhttps://en.wikipedia.org/wiki/Unix_domain_socket]] | Source: [[URIhttps://en.wikipedia.org/wiki/Unix_domain_socket]] | ||