diff options
Diffstat (limited to 'share/man/man4')
-rw-r--r-- | share/man/man4/Makefile | 4 | ||||
-rw-r--r-- | share/man/man4/multicast.4 | 100 | ||||
-rw-r--r-- | share/man/man4/pim.4 | 232 |
3 files changed, 6 insertions, 330 deletions
diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index f56ea52fada..175df43bfea 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.646 2016/12/07 15:53:05 mikeb Exp $ +# $OpenBSD: Makefile,v 1.647 2016/12/22 11:04:44 rzalamena Exp $ MAN= aac.4 ac97.4 acphy.4 \ acpi.4 acpiac.4 acpials.4 acpiasus.4 acpibat.4 \ @@ -46,7 +46,7 @@ MAN= aac.4 ac97.4 acphy.4 \ pair.4 pcagpio.4 pcaled.4 pcdisplay.4 pchb.4 pchtemp.4 pci.4 pcib.4 \ pcfadc.4 pcfiic.4 pcfrtc.4 pciide.4 pckbc.4 pckbd.4 pcmcia.4 pcn.4 \ pcppi.4 \ - pcscp.4 pf.4 pflog.4 pflow.4 pfsync.4 pgt.4 piixpm.4 pim.4 pipex.4 \ + pcscp.4 pf.4 pflog.4 pflow.4 pfsync.4 pgt.4 piixpm.4 pipex.4 \ pms.4 ppb.4 ppp.4 pppoe.4 pppx.4 pty.4 puc.4 pvbus.4 pwdog.4 \ qla.4 qle.4 qlw.4 qsphy.4 radio.4 \ ral.4 random.4 rdomain.4 rd.4 rdac.4 re.4 rdcphy.4 rgephy.4 ricohrtc.4 \ diff --git a/share/man/man4/multicast.4 b/share/man/man4/multicast.4 index 0f7e7112974..46b932aeb3f 100644 --- a/share/man/man4/multicast.4 +++ b/share/man/man4/multicast.4 @@ -24,10 +24,10 @@ .\" DEALINGS IN THE SOFTWARE. .\" .\" $FreeBSD: src/share/man/man4/multicast.4,v 1.4 2004/07/09 09:22:36 ru Exp $ -.\" $OpenBSD: multicast.4,v 1.10 2015/02/16 16:38:54 naddy Exp $ +.\" $OpenBSD: multicast.4,v 1.11 2016/12/22 11:04:44 rzalamena Exp $ .\" $NetBSD: multicast.4,v 1.3 2004/09/12 13:12:26 wiz Exp $ .\" -.Dd $Mdocdate: February 16 2015 $ +.Dd $Mdocdate: December 22 2016 $ .Dt MULTICAST 4 .Os .\" @@ -65,10 +65,8 @@ All multicast-capable routers must run a common multicast routing protocol. The Distance Vector Multicast Routing Protocol (DVMRP) was the first developed multicast routing protocol. -Later, other protocols such as Multicast Extensions to OSPF (MOSPF), -Core Based Trees (CBT), -Protocol Independent Multicast \- Sparse Mode (PIM-SM), -and Protocol Independent Multicast \- Dense Mode (PIM-DM) +Later, other protocols such as Multicast Extensions to OSPF (MOSPF) and +Core Based Trees (CBT) were developed as well. .Pp To start multicast routing, @@ -150,12 +148,6 @@ setsockopt(mrouter_s6, IPPROTO_ICMPV6, ICMP6_FILTER, (void *)&filter, sizeof(filter)); .Ed .Pp -After multicast forwarding is enabled, the multicast routing socket -can be used to enable PIM processing in the kernel if either PIM-SM or -PIM-DM are being used -(see -.Xr pim 4 ) . -.Pp For each network interface (e.g., physical or a virtual tunnel) that would be used for multicast forwarding, a corresponding multicast interface must be added to the kernel: @@ -582,9 +574,6 @@ flag is used to explicitly disable the .Dv IGMPMSG_WRONGVIF kernel signal at the (S,G) granularity if a multicast data packet arrives on the wrong interface. -Usually this signal is used to -complete the shortest-path switch for PIM-SM multicast routing, -or to trigger a PIM assert message. However, it should not be delivered for interfaces that are not set in the outgoing interface, and that are not expecting to become an incoming interface. @@ -595,88 +584,8 @@ interfaces, then a data packet that arrives on that interface for that MFC entry will NOT trigger a WRONGVIF signal. If that flag is not set, then a signal is triggered (the default action). .Pp -The -.Dv MRT_MFC_FLAGS_BORDER_VIF -flag is used to specify whether the Border-bit in PIM -Register messages should be set (when the Register encapsulation -is performed inside the kernel). -If it is set for the special PIM Register kernel virtual interface -(see -.Xr pim 4 ) , -the Border-bit in the Register messages sent to the RP will be set. -.Pp -The remaining six bits are reserved for future usage. -.Pp -The -.Va mfcc_rp -field is used to specify the RP address (for PIM-SM multicast routing) -for a multicast -group G if we want to perform kernel-level PIM Register encapsulation. -The -.Va mfcc_rp -field is used only if the -.Dv MRT_MFC_RP -advanced API flag/capability has been successfully set by -.Fn setsockopt MRT_API_CONFIG . -.Pp -.\" -.\" 3. Kernel-level PIM Register encapsulation -.\" -If the -.Dv MRT_MFC_RP -flag was successfully set by -.Fn setsockopt MRT_API_CONFIG , -then the kernel will attempt to perform -the PIM Register encapsulation itself instead of sending the -multicast data packets to user level (inside -.Dv IGMPMSG_WHOLEPKT -upcalls) for user-level encapsulation. -The RP address would be taken from the -.Va mfcc_rp -field -inside the new -.Vt "struct mfcctl2" . -However, even if the -.Dv MRT_MFC_RP -flag was successfully set, if the -.Va mfcc_rp -field was set to -.Dv INADDR_ANY , -then the -kernel will still deliver an -.Dv IGMPMSG_WHOLEPKT -upcall with the -multicast data packet to the user-level process. -.Pp -In addition, if the multicast data packet is too large to fit within -a single IP packet after the PIM Register encapsulation (e.g., if -its size was on the order of 65500 bytes), the data packet will be -fragmented, and then each of the fragments will be encapsulated -separately. -Note that typically a multicast data packet can be that -large only if it was originated locally from the same hosts that -performs the encapsulation; otherwise the transmission of the -multicast data packet over Ethernet for example would have -fragmented it into much smaller pieces. -.\" -.\" Note that if this code is ported to IPv6, we may need the kernel to -.\" perform MTU discovery to the RP, and keep those discoveries inside -.\" the kernel so the encapsulating router may send back ICMP -.\" Fragmentation Required if the size of the multicast data packet is -.\" too large (see "Encapsulating data packets in the Register Tunnel" -.\" in Section 4.4.1 in the PIM-SM spec -.\" draft-ietf-pim-sm-v2-new-05.{txt,ps}). -.\" For IPv4 we may be able to get away without it, but for IPv6 we need -.\" that. -.\" -.\" 4. Mechanism for "multicast bandwidth monitoring and upcalls". -.\" -.Pp Typically, a multicast routing user-level process would need to know the forwarding bandwidth for some data flow. -For example, the multicast routing process may want to time out idle MFC -entries, or for PIM-SM it can initiate (S,G) shortest-path switch if -the bandwidth rate is above a threshold for example. .Pp The original solution for measuring the bandwidth of a dataflow was that a user-level process would periodically @@ -947,7 +856,6 @@ after the previous upcall. .Xr intro 4 , .Xr ip 4 , .Xr ip6 4 , -.Xr pim 4 , .Xr mrouted 8 , .Xr sysctl 8 .\" diff --git a/share/man/man4/pim.4 b/share/man/man4/pim.4 deleted file mode 100644 index 6b4e8f7c17f..00000000000 --- a/share/man/man4/pim.4 +++ /dev/null @@ -1,232 +0,0 @@ -.\" Copyright (c) 2001-2003 International Computer Science Institute -.\" -.\" Permission is hereby granted, free of charge, to any person obtaining a -.\" copy of this software and associated documentation files (the "Software"), -.\" to deal in the Software without restriction, including without limitation -.\" the rights to use, copy, modify, merge, publish, distribute, sublicense, -.\" and/or sell copies of the Software, and to permit persons to whom the -.\" Software is furnished to do so, subject to the following conditions: -.\" -.\" The above copyright notice and this permission notice shall be included in -.\" all copies or substantial portions of the Software. -.\" -.\" The names and trademarks of copyright holders may not be used in -.\" advertising or publicity pertaining to the software without specific -.\" prior permission. Title to copyright in this software and any associated -.\" documentation will at all times remain with the copyright holders. -.\" -.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -.\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -.\" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -.\" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -.\" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -.\" DEALINGS IN THE SOFTWARE. -.\" -.\" $FreeBSD: src/share/man/man4/pim.4,v 1.2 2004/07/09 09:22:36 ru Exp $ -.\" $OpenBSD: pim.4,v 1.8 2012/08/24 08:54:32 jmc Exp $ -.\" $NetBSD: pim.4,v 1.2 2004/09/12 13:06:14 wiz Exp $ -.\" -.Dd $Mdocdate: August 24 2012 $ -.Dt PIM 4 -.Os -.\" -.Sh NAME -.Nm pim -.Nd Protocol Independent Multicast -.\" -.Sh SYNOPSIS -.Cd "options MROUTING" -.Cd "options PIM" -.Pp -.In sys/types.h -.In sys/socket.h -.In netinet/in.h -.In netinet/ip_mroute.h -.In netinet/pim.h -.Ft int -.Fn getsockopt "int s" IPPROTO_IP MRT_PIM "void *optval" "socklen_t *optlen" -.Ft int -.Fn setsockopt "int s" IPPROTO_IP MRT_PIM "const void *optval" "socklen_t optlen" -.Ft int -.Fn getsockopt "int s" IPPROTO_IPV6 MRT6_PIM "void *optval" "socklen_t *optlen" -.Ft int -.Fn setsockopt "int s" IPPROTO_IPV6 MRT6_PIM "const void *optval" "socklen_t optlen" -.Sh DESCRIPTION -.Tn PIM -is the common name for two multicast routing protocols: -Protocol Independent Multicast \- Sparse Mode (PIM-SM) and -Protocol Independent Multicast \- Dense Mode (PIM-DM). -.Pp -PIM-SM is a multicast routing protocol that can use the underlying -unicast routing information base or a separate multicast-capable -routing information base. -It builds unidirectional shared trees rooted at a Rendezvous -Point (RP) per group, -and optionally creates shortest-path trees per source. -.Pp -PIM-DM is a multicast routing protocol that uses the underlying -unicast routing information base to flood multicast datagrams -to all multicast routers. -Prune messages are used to prevent future datagrams from propagating -to routers with no group membership information. -.Pp -Both PIM-SM and PIM-DM are fairly complex protocols, -though PIM-SM is much more complex. -To enable PIM-SM or PIM-DM multicast routing in a router, -the user must enable multicast forwarding via the -.Va net.inet.ip.mforwarding -.Xr sysctl 8 -and PIM processing in the kernel -(see -.Sx SYNOPSIS -for the correct kernel configuration option). -The user must also run a PIM-SM or PIM-DM capable user-level process. -From a developer's point of view, -the programming guide described in the -.Sx "Programming Guide" -section should be used to control the PIM processing in the kernel. -.\" -.Ss Programming Guide -After a multicast routing socket is open and multicast forwarding -is enabled in the kernel -(see -.Xr multicast 4 ) , -one of the following socket options should be used to enable or disable -PIM processing in the kernel. -Note that those options require certain privilege -(i.e., root privilege): -.Bd -literal -offset 4n -/* IPv4 */ -int v = 1; /* 1 to enable, or 0 to disable */ -setsockopt(mrouter_s4, IPPROTO_IP, MRT_PIM, (void *)&v, sizeof(v)); -.Ed -.Bd -literal -offset 4n -/* IPv6 */ -int v = 1; /* 1 to enable, or 0 to disable */ -setsockopt(mrouter_s6, IPPROTO_IPV6, MRT6_PIM, (void *)&v, sizeof(v)); -.Ed -.Pp -After PIM processing is enabled, the multicast-capable interfaces -should be added -(see -.Xr multicast 4 ) . -For PIM-SM, the PIM-Register virtual interface must be added -as well. -This can be accomplished by using the following options: -.Bd -literal -offset indent -/* IPv4 */ -struct vifctl vc; -memset(&vc, 0, sizeof(vc)); -/* Assign all vifctl fields as appropriate */ -\&... -if (is_pim_register_vif) - vc.vifc_flags |= VIFF_REGISTER; -setsockopt(mrouter_s4, IPPROTO_IP, MRT_ADD_VIF, (void *)&vc, - sizeof(vc)); -.Ed -.Bd -literal -offset indent -/* IPv6 */ -struct mif6ctl mc; -memset(&mc, 0, sizeof(mc)); -/* Assign all mif6ctl fields as appropriate */ -\&... -if (is_pim_register_vif) - mc.mif6c_flags |= MIFF_REGISTER; -setsockopt(mrouter_s6, IPPROTO_IPV6, MRT6_ADD_MIF, (void *)&mc, - sizeof(mc)); -.Ed -.Pp -Sending or receiving of PIM packets can be accomplished by -first opening a -.Dq raw socket -(see -.Xr socket 2 ) , -with protocol value of -.Dv IPPROTO_PIM : -.Bd -literal -offset indent -/* IPv4 */ -int pim_s4; -pim_s4 = socket(AF_INET, SOCK_RAW, IPPROTO_PIM); -.Ed -.Bd -literal -offset indent -/* IPv6 */ -int pim_s6; -pim_s6 = socket(AF_INET6, SOCK_RAW, IPPROTO_PIM); -.Ed -.Pp -Then the following system calls can be used to send or receive PIM -packets: -.Xr sendto 2 , -.Xr sendmsg 2 , -.Xr recvfrom 2 , -and -.Xr recvmsg 2 . -.\" -.Sh SEE ALSO -.Xr getsockopt 2 , -.Xr recvfrom 2 , -.Xr recvmsg 2 , -.Xr sendmsg 2 , -.Xr sendto 2 , -.Xr setsockopt 2 , -.Xr socket 2 , -.Xr inet 4 , -.Xr intro 4 , -.Xr ip 4 , -.Xr multicast 4 , -.Xr sysctl 8 -.\" -.Sh STANDARDS -.Rs -.%A A. Adams -.%A J. Nicholas -.%A W. Siadak -.%D January 2005 -.%R RFC 3973 -.%T Protocol Independent Multicast \(en Dense Mode (PIM-DM): Protocol Specification (Revised) -.Re -.Pp -.Rs -.%A B. Fenner -.%A M. Handley -.%A H. Holbrook -.%A I. Kouvelas -.%D August 2006 -.%R RFC 4601 -.%T Protocol Independent Multicast \(en Sparse Mode (PIM-SM): Protocol Specification (Revised) -.Re -.Pp -.Rs -.%A N. Bhaskar -.%A A. Gall -.%A J. Lingard -.%A S. Venaas -.%D January 2008 -.%R RFC 5059 -.%T Bootstrap Router (BSR) Mechanism for Protocol Independent Multicast (PIM) -.Re -.\" -.Sh AUTHORS -.An -nosplit -The original IPv4 PIM kernel support for IRIX and SunOS-4.x was -implemented by -.An Ahmed Helmy -(USC and SGI). -Later the code was ported to various -.Bx -flavors and modified by -.An George Edmond Eddy -(Rusty) (ISI), -.An Hitoshi Asaeda -(WIDE Project), and -.An Pavlin Radoslavov -(USC/ISI and ICSI). -.Pp -The IPv6 PIM kernel support was implemented by the KAME project -.Pq Lk http://www.kame.net , -and was based on the IPv4 PIM kernel support. -.Pp -This manual page was written by -.An Pavlin Radoslavov -(ICSI). |