06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

Return Value<br />

IP Level Options<br />

level must be set to IPPROTO_IP for IP protocol level operations. The argument<br />

optname can have one of the following values:<br />

IP_HDRINCL Specifies that the IP Header will be included in the output<br />

packets. The following fields will be set by pNA+ if they are<br />

set to 0 in the included IP header: IP identification number<br />

and IP source address. The fragmentation offset and<br />

checksum fields are always computed by pNA+. The rest<br />

of the IP header fields must be set appropriately.<br />

IP_MULTICAST_IF Specifies the outgoing interface for multicast packets. For<br />

this option, optval is a pointer to struct in_addr. If<br />

set to INADDR_ANY then the routing table will be used to<br />

select an appropriate interface.<br />

IP_MULTICAST_INTF Specifies the outgoing interface for multicast packets. The<br />

outgoing interface is defined by its interface number. The<br />

optval is a pointer to a long. If set to -1 then the routing<br />

table will be used to select an appropriate interface,<br />

which is also the default case.<br />

IP_MULTICAST_LOOP Specifies whether or not to loopback multicast packets.<br />

optval is a pointer to an unsigned char. By default the<br />

packets are looped back<br />

(IP_DEFAULT_MULTICAST_LOOP.) A value of 0 disables<br />

loopback.<br />

IP_MULTICAST_TTL Specifies the time-to-live for outgoing IP multicast datagrams.<br />

optval is a pointer to an unsigned char. The default<br />

is IP_DEFAULT_MULTICAST_TTL.<br />

This system call returns 0 if successful, otherwise it returns -1.<br />

4-20 <strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong>

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

Saved successfully!

Ooh no, something went wrong!