Code Introduction (IPv6 Multicasting)

The KAME implementation of IPv6 multicasting supports both the host and the router aspects of the protocols. Figure 2-17 provides an overview of the architecture of the KAME multicast implementation.

The host aspect of the MLD protocol is implemented in the kernel. User applications access the host services related to IPv6 multicasting through the Basic Socket API as defined in [RFC3493].

FIGURE 2-17

FIGURE 2-17

Multicast packet forwarding, which is an essential function of a multicast router, is also implemented in the kernel. The router aspect of MLD is part of the PIM-DM and PIM-SM routing daemons, pim6dd and pim6sd, respectively.

The pim6sd daemon was developed based on pimd, a reference implementation of the IPv4 PIM-SM daemon developed by the University of Southern California (USC). This USC implementation of PIM-SM included a special API to process PIM Register messages. The KAME’s implementation in this part was also derived from USC’s implementation. The pim6sd daemon was first ported from pimd by a separate individual developer, Mickael Hoerdt, who contributed the implementation to the KAME project. The KAME project then maintained pim6sd with bug fixes and function enhancements. In August 2005, the development effort was transfered to the mcast-tools project of SourceForge,1 and has continued in mcast-tools since then.


In the following sections, we will describe in detail the kernel side of the KAME implementation on MLD, multicast forwarding, and some parts of the PIM protocol processing. We will refer to the files listed in Table 2-4 throughout the discussion.

TABLE 2-4

File name

Description

netinet/icmp6.h

Definitions of the MLD header and protocol constants

netinet6/in6_var.h

MLD listener structure

netinet6/mld6.c

MLD protocol processing functions

netinet6/pim6.h

PIM header definition

netinet6/pim6_var.h

Additional structure definitions and sysctl objects

netinet6/ip6_mroute.h

Internal data structure definitions for IPv6 multicasting routing

netinet6/ip6_mrouter.c

IPv6 multicast routing functions

TABLE 2-5

icmp6_ifstat{} member

SNMP variable

Description

ifs6_in_mldquery

ipv6IfIcmpInGroupMembQueries

# of input MLD queries

ifs6_in_mldreport

ipv6IfIcmpInGroupMembResponses

# of input Report messages

ifs6_in_mlddone

ipv6IfIcmpInGroupMembReductions

# of input Done messages

ifs6_out_mldquery

ipv6IfIcmpOutGroupMembQueries

# of output Query messages

ifs6_out_mldreport

ipv6IfIcmpOutGroupMembResponses

# of output Report messages

ifs6_out_mlddone

ipv6IfIcmpOutGroupMembReductions

# of output Done messages

Statistics

ICMPv6 MIB [RFC2466] contains statistics variables for incoming and outgoing MLD messages a; shown in Table 2-5. ifs6_in_xxx variables are actually incremented in the icmp6_input() function, and do not appear in this topic.

These variables can be seen by the netstat -p icmp6 -s command with the -I command line option specifying the interface. The following is an example output for interface named fxp0:

tmp39164_thumb

[RFC3019] defines MIB variables specific to the MLD protocol, but this implementation currently does not support any of the MIB variables.

Next post:

Previous post: