06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

pNA+ <strong>System</strong> <strong>Calls</strong> setsockopt<br />

Socket Level Options<br />

level must be set to SOL_SOCKET for socket level operations and the optname<br />

value can be one of the following (defined in ):<br />

SO_BROADCAST Allows broadcast datagrams on a socket.<br />

SO_DONTROUTE Indicates that the outgoing data should not be routed. Packets<br />

directed at unconnected nodes are dropped.<br />

SO_KEEPALIVE Maintains a connection by periodically transmitting a packet<br />

over socket s.<br />

SO_LINGER Controls the action taken when unsent messages are queued on a<br />

socket and a close() is executed. If the socket is a stream<br />

socket and SO_LINGER is set (l_onoff set to 1), the calling task<br />

blocks until it is able to transmit the data or until a timeout occurs.<br />

If SO_LINGER is disabled (l_onoff set to 0), the socket is<br />

deleted immediately. SO_LINGER uses the linger structure,<br />

which is defined in as follows:<br />

struct linger {<br />

int l_onoff; /* on/off option */<br />

int l_linger; /* linger time in seconds */<br />

}<br />

This structure cannot be packed.<br />

SO_OOBINLINE Requests that out-of-band data be placed in the normal data<br />

input queue as it is received; it becomes accessible through<br />

recv() calls without the MSG_OOB flag.<br />

SO_RCVBUF Adjusts the normal allocated input buffer size. The buffer<br />

size can be increased for high-volume connections or decreased<br />

to limit the possible backlog of data. The pNA+ network<br />

manager limits this value to 32 Kbytes.<br />

SO_REUSEADDR Indicates that local addresses can be reused in a bind() call.<br />

SO_REUSEPORT Indicates that local addresses can be reused in a bind()<br />

call. For more information, see section 4.4.3 of the Network<br />

Programming chapter in <strong>pSO<strong>System</strong></strong> <strong>System</strong> Concepts.<br />

SO_SNDBUF Adjusts the normal allocated output buffer size. The buffer<br />

size can be increased for high-volume connections or decreased<br />

to limit the possible backlog of data. The pNA+ network<br />

manager limits this value to 32 Kbytes.<br />

<strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong> 4-67<br />

4

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!