Next: INET Domain Sockets, Previous: General Sockets, Up: Networking

### 14.3 Socket Options

A subset of socket options are supported, using a fairly general framework which should make it simple to add more as required - see `SYS:CONTRIB;SB-BSD-SOCKETS:SOCKOPT.LISP` for details. The name mapping from C is fairly straightforward: `SO_RCVLOWAT` becomes `sockopt-receive-low-water` and `(setf sockopt-receive-low-water)`.

— Function: sb-bsd-sockets:sockopt-reuse-address socket

> Return the value of the `so-reuseaddr` socket option for `socket`. This can also be updated with `setf`.

— Function: sb-bsd-sockets:sockopt-keep-alive socket

> Return the value of the `so-keepalive` socket option for `socket`. This can also be updated with `setf`.

— Function: sb-bsd-sockets:sockopt-oob-inline socket

> Return the value of the `so-oobinline` socket option for `socket`. This can also be updated with `setf`.

— Function: sb-bsd-sockets:sockopt-bsd-compatible socket

> Return the value of the `so-bsdcompat` socket option for `socket`. This can also be updated with `setf`. Available only on Linux.

— Function: sb-bsd-sockets:sockopt-pass-credentials socket

> Return the value of the `so-passcred` socket option for `socket`. This can also be updated with `setf`. Available only on Linux.

— Function: sb-bsd-sockets:sockopt-debug socket

> Return the value of the `so-debug` socket option for `socket`. This can also be updated with `setf`.

— Function: sb-bsd-sockets:sockopt-dont-route socket

> Return the value of the `so-dontroute` socket option for `socket`. This can also be updated with `setf`.

— Function: sb-bsd-sockets:sockopt-broadcast socket

> Return the value of the `so-broadcast` socket option for `socket`. This can also be updated with `setf`.

— Function: sb-bsd-sockets:sockopt-tcp-nodelay socket

> Return the value of the `tcp-nodelay` socket option for `socket`. This can also be updated with `setf`.