network programming and sockets the following options are available for level ipproto_ipoption name value description ip_add_membership ip_mreg ip_drop_membership ip_mreg ip_hdrincl ip_max_memberships ip_multicast_if int int in_addr ip_multicast_loop ip_multicast_ttl , uint ip_options ipopts ip_recvdstaddr , ip_recvopts ip_recvretopts ip_retopts , , , ip_tos ip_ttl int int join multicast group (set onlyip_mreg is packed binary string containing two bit ip addresses (multiaddrlocaladdr)where multiaddr is the multicast address and localaddr is the ip of the local interface being used leave multicast group (set onlyip_mreg is described above ip header included with data maximum number of multicast groups outgoing interface in_addr is packed binary string containing -bit ip address loopback time to live uint is packed binary string containing -byte unsigned char ip header options ipopts is packed binary string of no more than bytes the contents of this string are described in rfc receive ip destination address with datagram receive all ip options with datagram receive ip options with response same as ip_recvoptsleaves the options unprocessed with no timestamp or route record options filled in type of service time to live the following options are available for level ipproto_ipv option name value description ipv _checksum ipv _dontfrag , , ipv _dstopts ip _dest ipv _hoplimit ipv _hopopts int ip _hbh have system compute checksum don' fragment packets if they exceed the mtu size destination options ip _dest is packed binary string of the form (nextlenoptionswhere next is an -bit integer giving the option type of the next headerlen is an -bit integer specifying the length of the header in units of bytesnot including the first bytesand options is the encoded options hop limit hop-by-hop options ip _hbh has the same encoding as ip _dest lib fl ff