Replace "<>&" with "\*[Lt]\*[Gt]\*[Am]".

This commit is contained in:
wiz 2004-09-12 13:06:14 +00:00
parent cd95d7a583
commit 6d8640263f
2 changed files with 98 additions and 98 deletions

View File

@ -24,7 +24,7 @@
.\" DEALINGS IN THE SOFTWARE. .\" DEALINGS IN THE SOFTWARE.
.\" .\"
.\" $FreeBSD: src/share/man/man4/multicast.4,v 1.4 2004/07/09 09:22:36 ru Exp $ .\" $FreeBSD: src/share/man/man4/multicast.4,v 1.4 2004/07/09 09:22:36 ru Exp $
.\" $NetBSD: multicast.4,v 1.1 2004/09/04 23:54:51 manu Exp $ .\" $NetBSD: multicast.4,v 1.2 2004/09/12 13:06:14 wiz Exp $
.\" .\"
.Dd September 4, 2003 .Dd September 4, 2003
.Dt MULTICAST 4 .Dt MULTICAST 4
@ -130,17 +130,17 @@ or disable multicast forwarding in the kernel:
.Bd -literal .Bd -literal
/* IPv4 */ /* IPv4 */
int v = 1; /* 1 to enable, or 0 to disable */ int v = 1; /* 1 to enable, or 0 to disable */
setsockopt(mrouter_s4, IPPROTO_IP, MRT_INIT, (void *)&v, sizeof(v)); setsockopt(mrouter_s4, IPPROTO_IP, MRT_INIT, (void *)\*[Am]v, sizeof(v));
.Ed .Ed
.Bd -literal .Bd -literal
/* IPv6 */ /* IPv6 */
int v = 1; /* 1 to enable, or 0 to disable */ int v = 1; /* 1 to enable, or 0 to disable */
setsockopt(mrouter_s6, IPPROTO_IPV6, MRT6_INIT, (void *)&v, sizeof(v)); setsockopt(mrouter_s6, IPPROTO_IPV6, MRT6_INIT, (void *)\*[Am]v, sizeof(v));
\&... \&...
/* If necessary, filter all ICMPv6 messages */ /* If necessary, filter all ICMPv6 messages */
struct icmp6_filter filter; struct icmp6_filter filter;
ICMP6_FILTER_SETBLOCKALL(&filter); ICMP6_FILTER_SETBLOCKALL(\*[Am]filter);
setsockopt(mrouter_s6, IPPROTO_ICMPV6, ICMP6_FILTER, (void *)&filter, setsockopt(mrouter_s6, IPPROTO_ICMPV6, ICMP6_FILTER, (void *)\*[Am]filter,
sizeof(filter)); sizeof(filter));
.Ed .Ed
.Pp .Pp
@ -156,17 +156,17 @@ multicast interface must be added to the kernel:
.Bd -literal .Bd -literal
/* IPv4 */ /* IPv4 */
struct vifctl vc; struct vifctl vc;
memset(&vc, 0, sizeof(vc)); memset(\*[Am]vc, 0, sizeof(vc));
/* Assign all vifctl fields as appropriate */ /* Assign all vifctl fields as appropriate */
vc.vifc_vifi = vif_index; vc.vifc_vifi = vif_index;
vc.vifc_flags = vif_flags; vc.vifc_flags = vif_flags;
vc.vifc_threshold = min_ttl_threshold; vc.vifc_threshold = min_ttl_threshold;
vc.vifc_rate_limit = max_rate_limit; vc.vifc_rate_limit = max_rate_limit;
memcpy(&vc.vifc_lcl_addr, &vif_local_address, sizeof(vc.vifc_lcl_addr)); memcpy(\*[Am]vc.vifc_lcl_addr, \*[Am]vif_local_address, sizeof(vc.vifc_lcl_addr));
if (vc.vifc_flags & VIFF_TUNNEL) if (vc.vifc_flags \*[Am] VIFF_TUNNEL)
memcpy(&vc.vifc_rmt_addr, &vif_remote_address, memcpy(\*[Am]vc.vifc_rmt_addr, \*[Am]vif_remote_address,
sizeof(vc.vifc_rmt_addr)); sizeof(vc.vifc_rmt_addr));
setsockopt(mrouter_s4, IPPROTO_IP, MRT_ADD_VIF, (void *)&vc, setsockopt(mrouter_s4, IPPROTO_IP, MRT_ADD_VIF, (void *)\*[Am]vc,
sizeof(vc)); sizeof(vc));
.Ed .Ed
.Pp .Pp
@ -198,12 +198,12 @@ contains the remote IP address in case of DVMRP multicast tunnels.
.Bd -literal .Bd -literal
/* IPv6 */ /* IPv6 */
struct mif6ctl mc; struct mif6ctl mc;
memset(&mc, 0, sizeof(mc)); memset(\*[Am]mc, 0, sizeof(mc));
/* Assign all mif6ctl fields as appropriate */ /* Assign all mif6ctl fields as appropriate */
mc.mif6c_mifi = mif_index; mc.mif6c_mifi = mif_index;
mc.mif6c_flags = mif_flags; mc.mif6c_flags = mif_flags;
mc.mif6c_pifi = pif_index; mc.mif6c_pifi = pif_index;
setsockopt(mrouter_s6, IPPROTO_IPV6, MRT6_ADD_MIF, (void *)&mc, setsockopt(mrouter_s6, IPPROTO_IPV6, MRT6_ADD_MIF, (void *)\*[Am]mc,
sizeof(mc)); sizeof(mc));
.Ed .Ed
.Pp .Pp
@ -224,13 +224,13 @@ A multicast interface is deleted by:
.Bd -literal .Bd -literal
/* IPv4 */ /* IPv4 */
vifi_t vifi = vif_index; vifi_t vifi = vif_index;
setsockopt(mrouter_s4, IPPROTO_IP, MRT_DEL_VIF, (void *)&vifi, setsockopt(mrouter_s4, IPPROTO_IP, MRT_DEL_VIF, (void *)\*[Am]vifi,
sizeof(vifi)); sizeof(vifi));
.Ed .Ed
.Bd -literal .Bd -literal
/* IPv6 */ /* IPv6 */
mifi_t mifi = mif_index; mifi_t mifi = mif_index;
setsockopt(mrouter_s6, IPPROTO_IPV6, MRT6_DEL_MIF, (void *)&mifi, setsockopt(mrouter_s6, IPPROTO_IPV6, MRT6_DEL_MIF, (void *)\*[Am]mifi,
sizeof(mifi)); sizeof(mifi));
.Ed .Ed
.Pp .Pp
@ -293,27 +293,27 @@ An MFC entry is added by:
.Bd -literal .Bd -literal
/* IPv4 */ /* IPv4 */
struct mfcctl mc; struct mfcctl mc;
memset(&mc, 0, sizeof(mc)); memset(\*[Am]mc, 0, sizeof(mc));
memcpy(&mc.mfcc_origin, &source_addr, sizeof(mc.mfcc_origin)); memcpy(\*[Am]mc.mfcc_origin, \*[Am]source_addr, sizeof(mc.mfcc_origin));
memcpy(&mc.mfcc_mcastgrp, &group_addr, sizeof(mc.mfcc_mcastgrp)); memcpy(\*[Am]mc.mfcc_mcastgrp, \*[Am]group_addr, sizeof(mc.mfcc_mcastgrp));
mc.mfcc_parent = iif_index; mc.mfcc_parent = iif_index;
for (i = 0; i < maxvifs; i++) for (i = 0; i \*[Lt] maxvifs; i++)
mc.mfcc_ttls[i] = oifs_ttl[i]; mc.mfcc_ttls[i] = oifs_ttl[i];
setsockopt(mrouter_s4, IPPROTO_IP, MRT_ADD_MFC, setsockopt(mrouter_s4, IPPROTO_IP, MRT_ADD_MFC,
(void *)&mc, sizeof(mc)); (void *)\*[Am]mc, sizeof(mc));
.Ed .Ed
.Bd -literal .Bd -literal
/* IPv6 */ /* IPv6 */
struct mf6cctl mc; struct mf6cctl mc;
memset(&mc, 0, sizeof(mc)); memset(\*[Am]mc, 0, sizeof(mc));
memcpy(&mc.mf6cc_origin, &source_addr, sizeof(mc.mf6cc_origin)); memcpy(\*[Am]mc.mf6cc_origin, \*[Am]source_addr, sizeof(mc.mf6cc_origin));
memcpy(&mc.mf6cc_mcastgrp, &group_addr, sizeof(mf6cc_mcastgrp)); memcpy(\*[Am]mc.mf6cc_mcastgrp, \*[Am]group_addr, sizeof(mf6cc_mcastgrp));
mc.mf6cc_parent = iif_index; mc.mf6cc_parent = iif_index;
for (i = 0; i < maxvifs; i++) for (i = 0; i \*[Lt] maxvifs; i++)
if (oifs_ttl[i] > 0) if (oifs_ttl[i] \*[Gt] 0)
IF_SET(i, &mc.mf6cc_ifset); IF_SET(i, \*[Am]mc.mf6cc_ifset);
setsockopt(mrouter_s4, IPPROTO_IPV6, MRT6_ADD_MFC, setsockopt(mrouter_s4, IPPROTO_IPV6, MRT6_ADD_MFC,
(void *)&mc, sizeof(mc)); (void *)\*[Am]mc, sizeof(mc));
.Ed .Ed
.Pp .Pp
The The
@ -339,20 +339,20 @@ An MFC entry is deleted by:
.Bd -literal .Bd -literal
/* IPv4 */ /* IPv4 */
struct mfcctl mc; struct mfcctl mc;
memset(&mc, 0, sizeof(mc)); memset(\*[Am]mc, 0, sizeof(mc));
memcpy(&mc.mfcc_origin, &source_addr, sizeof(mc.mfcc_origin)); memcpy(\*[Am]mc.mfcc_origin, \*[Am]source_addr, sizeof(mc.mfcc_origin));
memcpy(&mc.mfcc_mcastgrp, &group_addr, sizeof(mc.mfcc_mcastgrp)); memcpy(\*[Am]mc.mfcc_mcastgrp, \*[Am]group_addr, sizeof(mc.mfcc_mcastgrp));
setsockopt(mrouter_s4, IPPROTO_IP, MRT_DEL_MFC, setsockopt(mrouter_s4, IPPROTO_IP, MRT_DEL_MFC,
(void *)&mc, sizeof(mc)); (void *)\*[Am]mc, sizeof(mc));
.Ed .Ed
.Bd -literal .Bd -literal
/* IPv6 */ /* IPv6 */
struct mf6cctl mc; struct mf6cctl mc;
memset(&mc, 0, sizeof(mc)); memset(\*[Am]mc, 0, sizeof(mc));
memcpy(&mc.mf6cc_origin, &source_addr, sizeof(mc.mf6cc_origin)); memcpy(\*[Am]mc.mf6cc_origin, \*[Am]source_addr, sizeof(mc.mf6cc_origin));
memcpy(&mc.mf6cc_mcastgrp, &group_addr, sizeof(mf6cc_mcastgrp)); memcpy(\*[Am]mc.mf6cc_mcastgrp, \*[Am]group_addr, sizeof(mf6cc_mcastgrp));
setsockopt(mrouter_s4, IPPROTO_IPV6, MRT6_DEL_MFC, setsockopt(mrouter_s4, IPPROTO_IPV6, MRT6_DEL_MFC,
(void *)&mc, sizeof(mc)); (void *)\*[Am]mc, sizeof(mc));
.Ed .Ed
.Pp .Pp
The following method can be used to get various statistics per The following method can be used to get various statistics per
@ -361,18 +361,18 @@ packets per source and group address):
.Bd -literal .Bd -literal
/* IPv4 */ /* IPv4 */
struct sioc_sg_req sgreq; struct sioc_sg_req sgreq;
memset(&sgreq, 0, sizeof(sgreq)); memset(\*[Am]sgreq, 0, sizeof(sgreq));
memcpy(&sgreq.src, &source_addr, sizeof(sgreq.src)); memcpy(\*[Am]sgreq.src, \*[Am]source_addr, sizeof(sgreq.src));
memcpy(&sgreq.grp, &group_addr, sizeof(sgreq.grp)); memcpy(\*[Am]sgreq.grp, \*[Am]group_addr, sizeof(sgreq.grp));
ioctl(mrouter_s4, SIOCGETSGCNT, &sgreq); ioctl(mrouter_s4, SIOCGETSGCNT, \*[Am]sgreq);
.Ed .Ed
.Bd -literal .Bd -literal
/* IPv6 */ /* IPv6 */
struct sioc_sg_req6 sgreq; struct sioc_sg_req6 sgreq;
memset(&sgreq, 0, sizeof(sgreq)); memset(\*[Am]sgreq, 0, sizeof(sgreq));
memcpy(&sgreq.src, &source_addr, sizeof(sgreq.src)); memcpy(\*[Am]sgreq.src, \*[Am]source_addr, sizeof(sgreq.src));
memcpy(&sgreq.grp, &group_addr, sizeof(sgreq.grp)); memcpy(\*[Am]sgreq.grp, \*[Am]group_addr, sizeof(sgreq.grp));
ioctl(mrouter_s6, SIOCGETSGCNT_IN6, &sgreq); ioctl(mrouter_s6, SIOCGETSGCNT_IN6, \*[Am]sgreq);
.Ed .Ed
.Pp .Pp
The following method can be used to get various statistics per The following method can be used to get various statistics per
@ -381,16 +381,16 @@ packets per interface):
.Bd -literal .Bd -literal
/* IPv4 */ /* IPv4 */
struct sioc_vif_req vreq; struct sioc_vif_req vreq;
memset(&vreq, 0, sizeof(vreq)); memset(\*[Am]vreq, 0, sizeof(vreq));
vreq.vifi = vif_index; vreq.vifi = vif_index;
ioctl(mrouter_s4, SIOCGETVIFCNT, &vreq); ioctl(mrouter_s4, SIOCGETVIFCNT, \*[Am]vreq);
.Ed .Ed
.Bd -literal .Bd -literal
/* IPv6 */ /* IPv6 */
struct sioc_mif_req6 mreq; struct sioc_mif_req6 mreq;
memset(&mreq, 0, sizeof(mreq)); memset(\*[Am]mreq, 0, sizeof(mreq));
mreq.mifi = vif_index; mreq.mifi = vif_index;
ioctl(mrouter_s6, SIOCGETMIFCNT_IN6, &mreq); ioctl(mrouter_s6, SIOCGETMIFCNT_IN6, \*[Am]mreq);
.Ed .Ed
.Ss Advanced Multicast API Programming Guide .Ss Advanced Multicast API Programming Guide
If we want to add new features in the kernel, it becomes difficult If we want to add new features in the kernel, it becomes difficult
@ -451,7 +451,7 @@ and
Example: Example:
.Bd -literal .Bd -literal
uint32_t v; uint32_t v;
getsockopt(sock, IPPROTO_IP, MRT_API_SUPPORT, (void *)&v, sizeof(v)); getsockopt(sock, IPPROTO_IP, MRT_API_SUPPORT, (void *)\*[Am]v, sizeof(v));
.Ed .Ed
.Pp .Pp
would set in would set in
@ -476,11 +476,11 @@ would fail.
To modify the API, and to set some specific feature in the kernel, then: To modify the API, and to set some specific feature in the kernel, then:
.Bd -literal .Bd -literal
uint32_t v = MRT_MFC_FLAGS_DISABLE_WRONGVIF; uint32_t v = MRT_MFC_FLAGS_DISABLE_WRONGVIF;
if (setsockopt(sock, IPPROTO_IP, MRT_API_CONFIG, (void *)&v, sizeof(v)) if (setsockopt(sock, IPPROTO_IP, MRT_API_CONFIG, (void *)\*[Am]v, sizeof(v))
!= 0) { != 0) {
return (ERROR); return (ERROR);
} }
if (v & MRT_MFC_FLAGS_DISABLE_WRONGVIF) if (v \*[Am] MRT_MFC_FLAGS_DISABLE_WRONGVIF)
return (OK); /* Success */ return (OK); /* Success */
else else
return (ERROR); return (ERROR);
@ -496,7 +496,7 @@ The return value in
is the actual (sub)set of features that were enabled in the kernel. is the actual (sub)set of features that were enabled in the kernel.
To obtain later the same set of features that were enabled, then: To obtain later the same set of features that were enabled, then:
.Bd -literal .Bd -literal
getsockopt(sock, IPPROTO_IP, MRT_API_CONFIG, (void *)&v, sizeof(v)); getsockopt(sock, IPPROTO_IP, MRT_API_CONFIG, (void *)\*[Am]v, sizeof(v));
.Ed .Ed
.Pp .Pp
The set of enabled features is global. The set of enabled features is global.
@ -507,15 +507,15 @@ should be called right after
.Pp .Pp
Currently, the following set of new features is defined: Currently, the following set of new features is defined:
.Bd -literal .Bd -literal
#define MRT_MFC_FLAGS_DISABLE_WRONGVIF (1 << 0) /* disable WRONGVIF signals */ #define MRT_MFC_FLAGS_DISABLE_WRONGVIF (1 \*[Lt]\*[Lt] 0) /* disable WRONGVIF signals */
#define MRT_MFC_FLAGS_BORDER_VIF (1 << 1) /* border vif */ #define MRT_MFC_FLAGS_BORDER_VIF (1 \*[Lt]\*[Lt] 1) /* border vif */
#define MRT_MFC_RP (1 << 8) /* enable RP address */ #define MRT_MFC_RP (1 \*[Lt]\*[Lt] 8) /* enable RP address */
#define MRT_MFC_BW_UPCALL (1 << 9) /* enable bw upcalls */ #define MRT_MFC_BW_UPCALL (1 \*[Lt]\*[Lt] 9) /* enable bw upcalls */
.Ed .Ed
.\" .Pp .\" .Pp
.\" In the future there might be: .\" In the future there might be:
.\" .Bd -literal .\" .Bd -literal
.\" #define MRT_MFC_GROUP_SPECIFIC (1 << 10) /* allow (*,G) MFC entries */ .\" #define MRT_MFC_GROUP_SPECIFIC (1 \*[Lt]\*[Lt] 10) /* allow (*,G) MFC entries */
.\" .Ed .\" .Ed
.\" .Pp .\" .Pp
.\" to allow (*,G) MFC entries (i.e., group-specific entries) in the kernel. .\" to allow (*,G) MFC entries (i.e., group-specific entries) in the kernel.
@ -566,8 +566,8 @@ field is used to set various flags per
interface per (S,G) entry. interface per (S,G) entry.
Currently, the defined flags are: Currently, the defined flags are:
.Bd -literal .Bd -literal
#define MRT_MFC_FLAGS_DISABLE_WRONGVIF (1 << 0) /* disable WRONGVIF signals */ #define MRT_MFC_FLAGS_DISABLE_WRONGVIF (1 \*[Lt]\*[Lt] 0) /* disable WRONGVIF signals */
#define MRT_MFC_FLAGS_BORDER_VIF (1 << 1) /* border vif */ #define MRT_MFC_FLAGS_BORDER_VIF (1 \*[Lt]\*[Lt] 1) /* border vif */
.Ed .Ed
.Pp .Pp
The The
@ -693,14 +693,14 @@ There can be
more than one filter per (S,G). more than one filter per (S,G).
.It .It
Instead of supporting all possible comparison operations Instead of supporting all possible comparison operations
(i.e., < <= == != > >= ), there is support only for the (i.e., \*[Lt] \*[Lt]= == != \*[Gt] \*[Gt]= ), there is support only for the
<= and >= operations, \*[Lt]= and \*[Gt]= operations,
because this makes the kernel-level implementation simpler, because this makes the kernel-level implementation simpler,
and because practically we need only those two. and because practically we need only those two.
Further, the missing operations can be simulated by secondary Further, the missing operations can be simulated by secondary
user-level filtering of those <= and >= filters. user-level filtering of those \*[Lt]= and \*[Gt]= filters.
For example, to simulate !=, then we need to install filter For example, to simulate !=, then we need to install filter
.Dq bw <= 0xffffffff , .Dq bw \*[Lt]= 0xffffffff ,
and after an and after an
upcall is received, we need to check whether upcall is received, we need to check whether
.Dq measured_bw != expected_bw . .Dq measured_bw != expected_bw .
@ -740,14 +740,14 @@ the following:
* *
* Measurement works as follows: * Measurement works as follows:
* *
* For >= measurements: * For \*[Gt]= measurements:
* The first packet marks the start of a measurement interval. * The first packet marks the start of a measurement interval.
* During an interval we count packets and bytes, and when we * During an interval we count packets and bytes, and when we
* pass the threshold we deliver an upcall and we are done. * pass the threshold we deliver an upcall and we are done.
* The first packet after the end of the interval resets the * The first packet after the end of the interval resets the
* count and restarts the measurement. * count and restarts the measurement.
* *
* For <= measurement: * For \*[Lt]= measurement:
* We start a timer to fire at the end of the interval, and * We start a timer to fire at the end of the interval, and
* then for each incoming packet we count packets and bytes. * then for each incoming packet we count packets and bytes.
* When the timer fires, we compare the value with the threshold, * When the timer fires, we compare the value with the threshold,
@ -765,11 +765,11 @@ struct bw_upcall {
struct in_addr bu_src; /* source address */ struct in_addr bu_src; /* source address */
struct in_addr bu_dst; /* destination address */ struct in_addr bu_dst; /* destination address */
uint32_t bu_flags; /* misc flags (see below) */ uint32_t bu_flags; /* misc flags (see below) */
#define BW_UPCALL_UNIT_PACKETS (1 << 0) /* threshold (in packets) */ #define BW_UPCALL_UNIT_PACKETS (1 \*[Lt]\*[Lt] 0) /* threshold (in packets) */
#define BW_UPCALL_UNIT_BYTES (1 << 1) /* threshold (in bytes) */ #define BW_UPCALL_UNIT_BYTES (1 \*[Lt]\*[Lt] 1) /* threshold (in bytes) */
#define BW_UPCALL_GEQ (1 << 2) /* upcall if bw >= threshold */ #define BW_UPCALL_GEQ (1 \*[Lt]\*[Lt] 2) /* upcall if bw \*[Gt]= threshold */
#define BW_UPCALL_LEQ (1 << 3) /* upcall if bw <= threshold */ #define BW_UPCALL_LEQ (1 \*[Lt]\*[Lt] 3) /* upcall if bw \*[Lt]= threshold */
#define BW_UPCALL_DELETE_ALL (1 << 4) /* delete all upcalls for s,d*/ #define BW_UPCALL_DELETE_ALL (1 \*[Lt]\*[Lt] 4) /* delete all upcalls for s,d*/
struct bw_data bu_threshold; /* the bw threshold */ struct bw_data bu_threshold; /* the bw threshold */
struct bw_data bu_measured; /* the measured bw */ struct bw_data bu_measured; /* the measured bw */
}; };
@ -796,19 +796,19 @@ argument,
and that filter will trigger an upcall according to the following and that filter will trigger an upcall according to the following
pseudo-algorithm: pseudo-algorithm:
.Bd -literal .Bd -literal
if (bw_upcall_oper IS ">=") { if (bw_upcall_oper IS "\*[Gt]=") {
if (((bw_upcall_unit & PACKETS == PACKETS) && if (((bw_upcall_unit \*[Am] PACKETS == PACKETS) \*[Am]\*[Am]
(measured_packets >= threshold_packets)) || (measured_packets \*[Gt]= threshold_packets)) ||
((bw_upcall_unit & BYTES == BYTES) && ((bw_upcall_unit \*[Am] BYTES == BYTES) \*[Am]\*[Am]
(measured_bytes >= threshold_bytes))) (measured_bytes \*[Gt]= threshold_bytes)))
SEND_UPCALL("measured bandwidth is >= threshold"); SEND_UPCALL("measured bandwidth is \*[Gt]= threshold");
} }
if (bw_upcall_oper IS "<=" && measured_interval >= threshold_interval) { if (bw_upcall_oper IS "\*[Lt]=" \*[Am]\*[Am] measured_interval \*[Gt]= threshold_interval) {
if (((bw_upcall_unit & PACKETS == PACKETS) && if (((bw_upcall_unit \*[Am] PACKETS == PACKETS) \*[Am]\*[Am]
(measured_packets <= threshold_packets)) || (measured_packets \*[Lt]= threshold_packets)) ||
((bw_upcall_unit & BYTES == BYTES) && ((bw_upcall_unit \*[Am] BYTES == BYTES) \*[Am]\*[Am]
(measured_bytes <= threshold_bytes))) (measured_bytes \*[Lt]= threshold_bytes)))
SEND_UPCALL("measured bandwidth is <= threshold"); SEND_UPCALL("measured bandwidth is \*[Lt]= threshold");
} }
.Ed .Ed
.Pp .Pp
@ -817,27 +817,27 @@ In the same
the unit can be specified in both BYTES and PACKETS. the unit can be specified in both BYTES and PACKETS.
However, the GEQ and LEQ flags are mutually exclusive. However, the GEQ and LEQ flags are mutually exclusive.
.Pp .Pp
Basically, an upcall is delivered if the measured bandwidth is >= or Basically, an upcall is delivered if the measured bandwidth is \*[Gt]= or
<= the threshold bandwidth (within the specified measurement \*[Lt]= the threshold bandwidth (within the specified measurement
interval). interval).
For practical reasons, the smallest value for the measurement For practical reasons, the smallest value for the measurement
interval is 3 seconds. interval is 3 seconds.
If smaller values are allowed, then the bandwidth If smaller values are allowed, then the bandwidth
estimation may be less accurate, or the potentially very high frequency estimation may be less accurate, or the potentially very high frequency
of the generated upcalls may introduce too much overhead. of the generated upcalls may introduce too much overhead.
For the >= operation, the answer may be known before the end of For the \*[Gt]= operation, the answer may be known before the end of
.Va threshold_interval , .Va threshold_interval ,
therefore the upcall may be delivered earlier. therefore the upcall may be delivered earlier.
For the <= operation however, we must wait For the \*[Lt]= operation however, we must wait
until the threshold interval has expired to know the answer. until the threshold interval has expired to know the answer.
.Pp .Pp
Example of usage: Example of usage:
.Bd -literal .Bd -literal
struct bw_upcall bw_upcall; struct bw_upcall bw_upcall;
/* Assign all bw_upcall fields as appropriate */ /* Assign all bw_upcall fields as appropriate */
memset(&bw_upcall, 0, sizeof(bw_upcall)); memset(\*[Am]bw_upcall, 0, sizeof(bw_upcall));
memcpy(&bw_upcall.bu_src, &source, sizeof(bw_upcall.bu_src)); memcpy(\*[Am]bw_upcall.bu_src, \*[Am]source, sizeof(bw_upcall.bu_src));
memcpy(&bw_upcall.bu_dst, &group, sizeof(bw_upcall.bu_dst)); memcpy(\*[Am]bw_upcall.bu_dst, \*[Am]group, sizeof(bw_upcall.bu_dst));
bw_upcall.bu_threshold.b_data = threshold_interval; bw_upcall.bu_threshold.b_data = threshold_interval;
bw_upcall.bu_threshold.b_packets = threshold_packets; bw_upcall.bu_threshold.b_packets = threshold_packets;
bw_upcall.bu_threshold.b_bytes = threshold_bytes; bw_upcall.bu_threshold.b_bytes = threshold_bytes;
@ -857,7 +857,7 @@ do {
return (ERROR); return (ERROR);
} while (0); } while (0);
setsockopt(mrouter_s4, IPPROTO_IP, MRT_ADD_BW_UPCALL, setsockopt(mrouter_s4, IPPROTO_IP, MRT_ADD_BW_UPCALL,
(void *)&bw_upcall, sizeof(bw_upcall)); (void *)\*[Am]bw_upcall, sizeof(bw_upcall));
.Ed .Ed
.Pp .Pp
To delete a single filter, then use To delete a single filter, then use
@ -905,10 +905,10 @@ the particular intervals are measured, the user should be careful how
is used. is used.
For example, if the For example, if the
filter is installed to trigger an upcall if the number of packets filter is installed to trigger an upcall if the number of packets
is >= 1, then is \*[Gt]= 1, then
.Va bu_measured .Va bu_measured
may have a value of zero in the upcalls after the may have a value of zero in the upcalls after the
first one, because the measured interval for >= filters is first one, because the measured interval for \*[Gt]= filters is
.Dq clocked .Dq clocked
by the forwarded packets. by the forwarded packets.
Hence, this upcall mechanism should not be used for measuring Hence, this upcall mechanism should not be used for measuring
@ -925,7 +925,7 @@ Note that the upcalls for a filter are delivered until the specific
filter is deleted, but no more frequently than once per filter is deleted, but no more frequently than once per
.Va bu_threshold.b_time . .Va bu_threshold.b_time .
For example, if the filter is specified to For example, if the filter is specified to
deliver a signal if bw >= 1 packet, the first packet will trigger a deliver a signal if bw \*[Gt]= 1 packet, the first packet will trigger a
signal, but the next upcall will be triggered no earlier than signal, but the next upcall will be triggered no earlier than
.Va bu_threshold.b_time .Va bu_threshold.b_time
after the previous upcall. after the previous upcall.

View File

@ -24,7 +24,7 @@
.\" DEALINGS IN THE SOFTWARE. .\" DEALINGS IN THE SOFTWARE.
.\" .\"
.\" $FreeBSD: src/share/man/man4/pim.4,v 1.2 2004/07/09 09:22:36 ru Exp $ .\" $FreeBSD: src/share/man/man4/pim.4,v 1.2 2004/07/09 09:22:36 ru Exp $
.\" $NetBSD: pim.4,v 1.1 2004/09/04 23:54:51 manu Exp $ .\" $NetBSD: pim.4,v 1.2 2004/09/12 13:06:14 wiz Exp $
.\" .\"
.Dd September 4, 2003 .Dd September 4, 2003
.Dt PIM 4 .Dt PIM 4
@ -95,12 +95,12 @@ Note that those options require certain privilege
.Bd -literal .Bd -literal
/* IPv4 */ /* IPv4 */
int v = 1; /* 1 to enable, or 0 to disable */ int v = 1; /* 1 to enable, or 0 to disable */
setsockopt(mrouter_s4, IPPROTO_IP, MRT_PIM, (void *)&v, sizeof(v)); setsockopt(mrouter_s4, IPPROTO_IP, MRT_PIM, (void *)\*[Am]v, sizeof(v));
.Ed .Ed
.Bd -literal .Bd -literal
/* IPv6 */ /* IPv6 */
int v = 1; /* 1 to enable, or 0 to disable */ int v = 1; /* 1 to enable, or 0 to disable */
setsockopt(mrouter_s6, IPPROTO_IPV6, MRT6_PIM, (void *)&v, sizeof(v)); setsockopt(mrouter_s6, IPPROTO_IPV6, MRT6_PIM, (void *)\*[Am]v, sizeof(v));
.Ed .Ed
.Pp .Pp
After PIM processing is enabled, the multicast-capable interfaces After PIM processing is enabled, the multicast-capable interfaces
@ -113,23 +113,23 @@ This can be accomplished by using the following options:
.Bd -literal .Bd -literal
/* IPv4 */ /* IPv4 */
struct vifctl vc; struct vifctl vc;
memset(&vc, 0, sizeof(vc)); memset(\*[Am]vc, 0, sizeof(vc));
/* Assign all vifctl fields as appropriate */ /* Assign all vifctl fields as appropriate */
\&... \&...
if (is_pim_register_vif) if (is_pim_register_vif)
vc.vifc_flags |= VIFF_REGISTER; vc.vifc_flags |= VIFF_REGISTER;
setsockopt(mrouter_s4, IPPROTO_IP, MRT_ADD_VIF, (void *)&vc, setsockopt(mrouter_s4, IPPROTO_IP, MRT_ADD_VIF, (void *)\*[Am]vc,
sizeof(vc)); sizeof(vc));
.Ed .Ed
.Bd -literal .Bd -literal
/* IPv6 */ /* IPv6 */
struct mif6ctl mc; struct mif6ctl mc;
memset(&mc, 0, sizeof(mc)); memset(\*[Am]mc, 0, sizeof(mc));
/* Assign all mif6ctl fields as appropriate */ /* Assign all mif6ctl fields as appropriate */
\&... \&...
if (is_pim_register_vif) if (is_pim_register_vif)
mc.mif6c_flags |= MIFF_REGISTER; mc.mif6c_flags |= MIFF_REGISTER;
setsockopt(mrouter_s6, IPPROTO_IPV6, MRT6_ADD_MIF, (void *)&mc, setsockopt(mrouter_s6, IPPROTO_IPV6, MRT6_ADD_MIF, (void *)\*[Am]mc,
sizeof(mc)); sizeof(mc));
.Ed .Ed
.Pp .Pp