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.

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

IP_ADD_MEMBERSHIP_INTF Similar to IP_ADD_MEMBERSHIP above. The<br />

optval is a pointer to the structure<br />

ip_mreq_intf (defined in ). The only<br />

difference is that the interface is defined using<br />

the interface number. If the interface number is<br />

specified as -1 then pNA+ will select the interface<br />

based upon the routing table. This option is useful<br />

for unnumbered links because the IP address<br />

of the interface is not enough to identify the interface.<br />

The structure below is defined in and<br />

used with the IP_ADD_MEMBERSHIP_INTF option.<br />

struct ip_mreq_intf {<br />

struct in_addr imrif_mcastaddr;<br />

/* IP multicast address of group */<br />

long imrif_ifno;<br />

/* local interface number */<br />

};<br />

IP_DROP_MEMBERSHIP Leave a multicast group. optval is a pointer to<br />

the ip_mreq structure (defined in ). The<br />

group multicast address to be dropped must be<br />

specified in imr_mcastaddr. The interface address<br />

could be set to INADDR_ANY unless it specifies<br />

the particular interface for which the group<br />

membership must be dropped.<br />

The structure below is defined in and<br />

used with the IP_DROP_MEMBERSHIP option.<br />

struct ip_mreq {<br />

struct in_addr imr_mcastaddr;<br />

/* IP multicast address of group */<br />

struct in_addr imr_interface;<br />

/* local IP address of interface */<br />

};<br />

4-70 <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!