Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages


home | help
INET6(4)		 BSD Kernel Interfaces Manual		      INET6(4)

     inet6 -- Internet protocol	version	6 family

     #include <sys/types.h>
     #include <netinet/in.h>

     implements	Internet Protocol version 4, inet6 implements Internet Proto-
     col version 6.

     inet6 is a	collection of protocols	layered	atop the Internet Protocol
     The inet6 family provides protocol	support	for the	SOCK_STREAM,
     SOCK_DGRAM, and SOCK_RAW socket types; the	SOCK_RAW interface provides
     access to the IPv6	protocol.

     criminated	union.

     Sockets bound to the inet6	family utilize the following addressing	struc-

	   struct sockaddr_in6 {
		   uint8_t	   sin6_len;
		   sa_family_t	   sin6_family;
		   in_port_t	   sin6_port;
		   uint32_t	   sin6_flowinfo;
		   struct in6_addr sin6_addr;
		   uint32_t	   sin6_scope_id;

     Sockets may be created with the local address "::"	(which is equal	to
     IPv6 address 0:0:0:0:0:0:0:0) to affect "wildcard"	matching on incoming

     specified without a scope identifier.  To manipulate scoped addresses
     RFC2292.  A compact description of	the advanced API is available in
     of	view.

     The KAME implementation supports an extended numeric IPv6 address nota-
     tion for link-local addresses, like "fe80::1%de0" to specify "fe80::1 on
     de0 interface".  This notation is supported by getaddrinfo(3) and
     option to disambiguate scoped addresses.

     tures like	routing	tables or interface structures,	a scoped address will
     have its interface	index embedded into the	address.  Therefore, the ad-
     dress in some kernel structures is	not the	same as	that on	the wire.  The
     embedded index will become	visible	through	a PF_ROUTE socket, kernel mem-
     ory accesses via kvm(3) and on some other occasions.  HOWEVER, users
     should never use the embedded form.  For details please consult
     IMPLEMENTATION supplied with KAME kit.

     trol Message Protocol version 6 (ICMPv6), Transmission Control Protocol
     SOCK_STREAM abstraction while UDP is used to support the SOCK_DGRAM ab-
     interface to IPv6 is available by creating	an Internet socket of type

   MIB Variables
     A number of variables are implemented in the net.inet6 branch of the
     following general variables are defined:

			     ing of IPv6 packets.  Also, identify if the node
			     is	acting as a router.  Defaults to off.

			     ICMPv6 redirects in response to unforwardable
			     IPv6 packets.  This option	is ignored unless the
			     node is routing IPv6 packets, and should normally
			     be	enabled	on all systems.	 Defaults to on.

			     use for outgoing IPv6 packets.  This value	ap-
			     plies to all the transport	protocols on top of
			     IPv6.  There are APIs to override the value.

     IPV6CTL_MAXFRAGPACKETS  (ip6.maxfragpackets) Integer: default maximum
			     number of fragmented packets the node will	ac-
			     cept.  0 means that the node will not accept any
			     fragmented	packets.  -1 means that	the node will
			     accept as many fragmented packets as it receives.
			     The flag is provided basically for	avoiding pos-
			     sible DoS attacks.

     IPV6CTL_ACCEPT_RTADV    (ip6.accept_rtadv)	Boolean: enable/disable	re-
			     ceiving of	ICMPv6 router advertisement packets,
			     and autoconfiguration of address prefixes and de-
			     fault routers.  The node must be a	host (not a
			     router) for the option to be meaningful.  De-
			     faults to off.

     IPV6CTL_KEEPFAITH	     (ip6.keepfaith) Boolean: enable/disable "FAITH"
			     TCP relay IPv6-to-IPv4 translator code in the
			     kernel.  Refer faith(4) and faithd(8) for detail.
			     Defaults to off.

     IPV6CTL_LOG_INTERVAL    (ip6.log_interval)	Integer: default interval be-
			     tween IPv6	packet forwarding engine log output
			     (in seconds).

     IPV6CTL_HDRNESTLIMIT    (ip6.hdrnestlimit)	Integer: default number	of the
			     maximum IPv6 extension headers permitted on in-
			     coming IPv6 packets.  If set to 0,	the node will
			     accept as many extension headers as possible.

     IPV6CTL_DAD_COUNT	     (ip6.dad_count) Integer: default number of	IPv6
			     DAD (duplicated address detection)	probe packets.
			     The packets will be generated when	IPv6 interface
			     addresses are configured.

     IPV6CTL_AUTO_FLOWLABEL  (ip6.auto_flowlabel) Boolean: enable/disable au-
			     tomatic filling of	IPv6 flowlabel field, for out-
			     standing connected	transport protocol packets.
			     The field might be	used by	intermediate routers
			     to	identify packet	flows.	Defaults to on.

     IPV6CTL_DEFMCASTHLIM    (ip6.defmcasthlim)	Integer: default hop limit
			     value for an IPv6 multicast packet	sourced	by the
			     node.  This value applies to all the transport
			     protocols on top of IPv6.	There are APIs to
			     override the value	as documented in ip6(4).

     IPV6CTL_GIF_HLIM	     (ip6.gifhlim) Integer: default maximum hop	limit
			     nel interface.

     IPV6CTL_KAME_VERSION    (ip6.kame_version)	String:	identifies the version
			     of	KAME IPv6 stack	implemented in the kernel.

     IPV6CTL_USE_DEPRECATED  (ip6.use_deprecated) Boolean: enable/disable use
			     of	deprecated address, specified in RFC2462
			     5.5.4.  Defaults to on.

     IPV6CTL_RR_PRUNE	     (ip6.rr_prune) Integer: default interval between
			     IPv6 router renumbering prefix babysitting, in

     IPV6CTL_V6ONLY	     (ip6.v6only) Boolean: enable/disable the prohib-
			     ited use of IPv4 mapped address on	AF_INET6 sock-
			     ets.  Defaults to on.

     IPV6CTL_RTEXPIRE	     (ip6.rtexpire) Integer: lifetime in seconds of
			     protocol-cloned IP	routes after the last refer-
			     ence drops	(default one hour).

     IPV6CTL_RTMINEXPIRE     (ip6.rtminexpire) Integer:	minimum	value of
			     ip.rtexpire (default ten seconds).

     IPV6CTL_RTMAXCACHE	     (ip6.rtmaxcache) Integer: trigger level of
			     cached, unreferenced, protocol-cloned routes
			     which initiates dynamic adaptation	(default 128).

   Interaction between IPv4/v6 sockets
     By	default, FreeBSD does not route	IPv4 traffic to	AF_INET6 sockets.  The
     default behavior intentionally violates RFC2553 for security reasons.
     tion, however, it is not recommended to do	so.  Consult ip6(4) for	de-

     cally, it says this:
	 fied) should accept IPv6 traffic to that address only.
     +o	 If you	perform	a wildcard bind	on an AF_INET6 socket (bind(2) to IPv6
	 mapped	address.
     +o	 If there are both a wildcard bind AF_INET socket and a	wildcard bind
	 IPv4 traffic should be	routed to the AF_INET socket and IPv6 should
	 be routed to the AF_INET6 socket.

     However, RFC2553 does not define the ordering constraint between calls to

     take care handling	connections from IPv4 mapped address to	AF_INET6 sock-


     June 2000,	work in	progress material.

     The inet6 protocol	interfaces are defined in RFC2553 and RFC2292.	The
     implementation described herein appeared in the WIDE/KAME project.

     Users should not depend on	details	of the current implementation, but
     rather the	services exported.

     Users are suggested to implement "version independent" code as much as

BSD			       January 29, 1999				   BSD


Want to link to this manual page? Use this URL:

home | help