| @@ -14,27 +14,27 @@ | | | @@ -14,27 +14,27 @@ |
14 | .\" advertising or publicity pertaining to the software without specific | | 14 | .\" advertising or publicity pertaining to the software without specific |
15 | .\" prior permission. Title to copyright in this software and any associated | | 15 | .\" prior permission. Title to copyright in this software and any associated |
16 | .\" documentation will at all times remain with the copyright holders. | | 16 | .\" documentation will at all times remain with the copyright holders. |
17 | .\" | | 17 | .\" |
18 | .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | | 18 | .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
19 | .\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | | 19 | .\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
20 | .\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | | 20 | .\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
21 | .\" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | | 21 | .\" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
22 | .\" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | | 22 | .\" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
23 | .\" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | | 23 | .\" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
24 | .\" DEALINGS IN THE SOFTWARE. | | 24 | .\" DEALINGS IN THE SOFTWARE. |
25 | .\" | | 25 | .\" |
26 | .\" $FreeBSD: src/share/man/man4/multicast.4,v 1.4 2004/07/09 09:22:36 ru Exp $ | | 26 | .\" $FreeBSD: src/share/man/man4/multicast.4,v 1.4 2004/07/09 09:22:36 ru Exp $ |
27 | .\" $NetBSD: multicast.4,v 1.4 2010/03/22 18:58:31 joerg Exp $ | | 27 | .\" $NetBSD: multicast.4,v 1.5 2010/12/23 19:15:55 njoly Exp $ |
28 | .\" | | 28 | .\" |
29 | .Dd September 4, 2003 | | 29 | .Dd September 4, 2003 |
30 | .Dt MULTICAST 4 | | 30 | .Dt MULTICAST 4 |
31 | .Os | | 31 | .Os |
32 | .\" | | 32 | .\" |
33 | .Sh NAME | | 33 | .Sh NAME |
34 | .Nm multicast | | 34 | .Nm multicast |
35 | .Nd Multicast Routing | | 35 | .Nd Multicast Routing |
36 | .\" | | 36 | .\" |
37 | .Sh SYNOPSIS | | 37 | .Sh SYNOPSIS |
38 | .Cd "options MROUTING" | | 38 | .Cd "options MROUTING" |
39 | .Pp | | 39 | .Pp |
40 | .In sys/types.h | | 40 | .In sys/types.h |
| @@ -68,35 +68,35 @@ Later, other protocols such as Multicast | | | @@ -68,35 +68,35 @@ Later, other protocols such as Multicast |
68 | Core Based Trees (CBT), | | 68 | Core Based Trees (CBT), |
69 | Protocol Independent Multicast - Sparse Mode (PIM-SM), | | 69 | Protocol Independent Multicast - Sparse Mode (PIM-SM), |
70 | and Protocol Independent Multicast - Dense Mode (PIM-DM) | | 70 | and Protocol Independent Multicast - Dense Mode (PIM-DM) |
71 | were developed as well. | | 71 | were developed as well. |
72 | .Pp | | 72 | .Pp |
73 | To start multicast routing, | | 73 | To start multicast routing, |
74 | the user must enable multicast forwarding in the kernel | | 74 | the user must enable multicast forwarding in the kernel |
75 | (see | | 75 | (see |
76 | .Sx SYNOPSIS | | 76 | .Sx SYNOPSIS |
77 | about the kernel configuration options), | | 77 | about the kernel configuration options), |
78 | and must run a multicast routing capable user-level process. | | 78 | and must run a multicast routing capable user-level process. |
79 | From developer's point of view, | | 79 | From developer's point of view, |
80 | the programming guide described in the | | 80 | the programming guide described in the |
81 | .Sx "Programming Guide" | | 81 | .Sx Programming Guide |
82 | section should be used to control the multicast forwarding in the kernel. | | 82 | section should be used to control the multicast forwarding in the kernel. |
83 | .\" | | 83 | .\" |
84 | .Ss Programming Guide | | 84 | .Ss Programming Guide |
85 | This section provides information about the basic multicast routing API. | | 85 | This section provides information about the basic multicast routing API. |
86 | The so-called | | 86 | The so-called |
87 | .Dq advanced multicast API | | 87 | .Dq advanced multicast API |
88 | is described in the | | 88 | is described in the |
89 | .Sx "Advanced Multicast API Programming Guide" | | 89 | .Sx Advanced Multicast API Programming Guide |
90 | section. | | 90 | section. |
91 | .Pp | | 91 | .Pp |
92 | First, a multicast routing socket must be open. | | 92 | First, a multicast routing socket must be open. |
93 | That socket would be used | | 93 | That socket would be used |
94 | to control the multicast forwarding in the kernel. | | 94 | to control the multicast forwarding in the kernel. |
95 | Note that most operations below require certain privilege | | 95 | Note that most operations below require certain privilege |
96 | (i.e., root privilege): | | 96 | (i.e., root privilege): |
97 | .Bd -literal | | 97 | .Bd -literal |
98 | /* IPv4 */ | | 98 | /* IPv4 */ |
99 | int mrouter_s4; | | 99 | int mrouter_s4; |
100 | mrouter_s4 = socket(AF_INET, SOCK_RAW, IPPROTO_IGMP); | | 100 | mrouter_s4 = socket(AF_INET, SOCK_RAW, IPPROTO_IGMP); |
101 | .Ed | | 101 | .Ed |
102 | .Bd -literal | | 102 | .Bd -literal |
| @@ -407,27 +407,27 @@ The user-level process tries to enable i | | | @@ -407,27 +407,27 @@ The user-level process tries to enable i |
407 | features (and the corresponding API) it would like to use. | | 407 | features (and the corresponding API) it would like to use. |
408 | .It | | 408 | .It |
409 | The kernel returns the (sub)set of features it knows about | | 409 | The kernel returns the (sub)set of features it knows about |
410 | and is willing to be enabled. | | 410 | and is willing to be enabled. |
411 | .It | | 411 | .It |
412 | The user-level process uses only that set of features | | 412 | The user-level process uses only that set of features |
413 | the kernel has agreed on. | | 413 | the kernel has agreed on. |
414 | .El | | 414 | .El |
415 | .\" | | 415 | .\" |
416 | .Pp | | 416 | .Pp |
417 | To support backward compatibility, if the user-level process does not | | 417 | To support backward compatibility, if the user-level process does not |
418 | ask for any new features, the kernel defaults to the basic | | 418 | ask for any new features, the kernel defaults to the basic |
419 | multicast API (see the | | 419 | multicast API (see the |
420 | .Sx "Programming Guide" | | 420 | .Sx Programming Guide |
421 | section). | | 421 | section). |
422 | .\" XXX: edit as appropriate after the advanced multicast API is | | 422 | .\" XXX: edit as appropriate after the advanced multicast API is |
423 | .\" supported under IPv6 | | 423 | .\" supported under IPv6 |
424 | Currently, the advanced multicast API exists only for IPv4; | | 424 | Currently, the advanced multicast API exists only for IPv4; |
425 | in the future there will be IPv6 support as well. | | 425 | in the future there will be IPv6 support as well. |
426 | .Pp | | 426 | .Pp |
427 | Below is a summary of the expandable API solution. | | 427 | Below is a summary of the expandable API solution. |
428 | Note that all new options and structures are defined | | 428 | Note that all new options and structures are defined |
429 | in | | 429 | in |
430 | .In netinet/ip_mroute.h | | 430 | .In netinet/ip_mroute.h |
431 | and | | 431 | and |
432 | .In netinet6/ip6_mroute.h , | | 432 | .In netinet6/ip6_mroute.h , |
433 | unless stated otherwise. | | 433 | unless stated otherwise. |