HP-UX Reference (11i v2 03/08) - 5 Miscellaneous Topics, 7 Device (Special) Files, 9 General Information, Index (vol 9)

i
IPv6(7P) IPv6(7P)
new option value specified is used as the hop limit for all subsequent uni-
cast packets sent via that socket. Valid values are in the range 0-255
(both inclusive) and the default value is 64. For example,
int hoplimit = 50;
setsockopt(s, IPPROTO_IPV6, IPV6_UNICAST_HOPS,
&hoplimit, sizeof(hoplimit));
This option can be used with
getsockopt() (see getsockopt (2)) to
determine the hop limit value the system will use for subsequent unicast
packets sent via that socket.
IPV6_MULTICAST_HOPS
(integer) Set or get the hop limit used in outgoing multicast packets.
When this option is set, the new option value specified is used as the hop
limit for all subsequent multicast packets sent via that socket. Valid
values are in the range 0-255 (both inclusive) and the default value is 1.
IPV6_MULTICAST_IF
(integer) Sets the interface to use for outgoing multicast packets. The
option value is the index of the selected outgoing interface. For example,
unsigned int index;
index = if_nametoindex("lan0");
setsockopt(s, IPPROTO_IPV6, IPV6_MULTICAST_IF,
&index, sizeof(index));
IPV6_MULTICAST_LOOP
(boolean) Enables or disables loopback in the IP layer for multicast
datagrams sent through this socket. The value of the variable pointed to
by optval is zero (disable) or non-zero (enable). Default: enabled.
IPV6_JOIN_GROUP (struct ipv6_mreq
) Join a multicast group on a specified local inter-
face. The IPv6 multicast address of the group to join and the index of the
interface on which to join should be specified using
struct
ipv6_mreq which is defined in <netinet/in6.h
> as:
struct ipv6_mreq {
struct in6_addr ipv6mr_multiaddr;
/* IPv6 multicast addr */
unsigned int ipv6mr_interface;
/* interface index */
};
If the interface index is specified as 0 then the default multicast interface
is used.
IPV6_LEAVE_GROUP (
struct ipv6_mreq) Leave a multicast group on a specified local
interface. The IPv6 multicast address of the group to leave and the
interface index should be specified using
struct ipv6_mreq. The
interface index should match the index used while joining the group. Set
index to 0, to specify default interface.
IPV6_CHECKSUM (integer) When this option is set, kernel computes the checksum for
outbound packets and verifies checksum on inbound packets. The option
value is the byte offset of the checksum location in the user data. This
option is not valid for IPPROTO_ICMPV6 since checksum computation is
mandatory for IPPROTO_ICMPV6. The default value is -1 (checksums
not computed nor verified for protocols other than IPPROTO_ICMPV6).
IPV6_RECVPKTINFO (boolean) When this option is enabled, PKTINFO (destination IPv6
address and the arriving interface index) is returned as ancillary data by
recvmsg(). (See recvmsg(2)). The information is returned in struct
HP-UX 11i Version 2: August 2003 − 2 − Hewlett-Packard Company Section 7−−53