Lines Matching defs:to

7  * as defined in and that are subject to the Apple Public Source License
9 * compliance with the License. The rights granted to you under the License
10 * may not be used to create, or enable the creation or redistribution of,
11 * unlawful or unlicensed copies of an Apple operating system, or to
41 * 3. The name of the author may not be used to endorse or promote
116 * XXX: Both carp and pf need to use the legacy (*,G) KPIs in_addmulti()
273 * Initialize an in_mfilter structure to a known state at t0, t1
286 * Resize the ip_moptions vector to the next power-of-two minus 1.
455 struct ip_moptions *to;
461 to = inp_findmoptions(to_inp);
462 if (to == NULL) {
468 IMO_LOCK(to);
470 to->imo_multicast_ifp = from->imo_multicast_ifp;
471 to->imo_multicast_vif = from->imo_multicast_vif;
472 to->imo_multicast_ttl = from->imo_multicast_ttl;
473 to->imo_multicast_loop = from->imo_multicast_loop;
479 for (i = 0; i < to->imo_num_memberships; ++i) {
482 imf = to->imo_mfilters ? &to->imo_mfilters[i] : NULL;
486 (void) in_leavegroup(to->imo_membership[i], imf);
491 INM_REMREF(to->imo_membership[i]);
492 to->imo_membership[i] = NULL;
494 to->imo_num_memberships = 0;
496 VERIFY(to->imo_max_memberships != 0 && from->imo_max_memberships != 0);
497 if (to->imo_max_memberships < from->imo_max_memberships) {
502 err = imo_grow(to, from->imo_max_memberships);
506 VERIFY(to->imo_max_memberships >= from->imo_max_memberships);
509 * Source filtering doesn't apply to OpenTransport socket,
513 to->imo_membership[i] =
516 if (to->imo_membership[i] == NULL)
518 to->imo_num_memberships++;
520 VERIFY(to->imo_num_memberships == from->imo_num_memberships);
523 IMO_UNLOCK(to);
524 IMO_REMREF(to);
532 * Find and return a reference to an in_multi record for (ifp, group),
534 * If one does not exist, try to allocate it, and update link-layer multicast
535 * filters on ifp to listen for group.
579 * See comments in inm_remref() for access to ifma_protospec.
610 * the inm referring to the ifma has been detached, thus we
611 * reattach it back to the in_multihead list and return the
627 * We DO NOT perform an IGMP join as the in_ layer may need to
628 * push an initial source list down to IGMP to support SSM.
647 * Pending state-changes per group are subject to a bounds check.
694 * naddr is the address of the source to record in network-byte order.
697 * lazy-allocate a source node in response to an SG query.
699 * with the trade-off that the source will not be reported to the
742 * Return a pointer to an in_msource owned by an in_mfilter,
750 * Caller is expected to be holding imo_lock.
793 * Return the pointer to the new node, otherwise return NULL.
795 * Caller is expected to be holding imo_lock.
824 * Caller is expected to be holding imo_lock.
844 * Revert socket-layer filter set deltas at t1 to t0 state.
846 * Caller is expected to be holding imo_lock.
860 /* revert change to existing source at t1 */
876 * Caller is expected to be holding imo_lock.
894 * Caller is expected to be holding imo_lock.
912 * Caller is expected to be holding imo_lock.
935 * Caller is expected to be holding imo_lock.
957 * inm is the group descriptor to work with.
958 * haddr is the host-byte-order IPv4 address to look up.
959 * noalloc may be non-zero to suppress allocation of sources.
960 * *pims will be set to the address of the retrieved or allocated source.
999 * Helper function to derive the filter mode on a source entry
1088 * used to work out if we transition into ASM mode or not.
1132 IGMP_PRINTF(("%s: imf transition %d to %d\n",
1161 IGMP_PRINTF(("%s: transition to EX\n", __func__));
1164 IGMP_PRINTF(("%s: transition to IN\n", __func__));
1167 IGMP_PRINTF(("%s: transition to UNDEF\n", __func__));
1180 /* Increment ASM listener count on transition to ASM mode. */
1186 IGMP_PRINTF(("%s: merged imf %p to inm %p\n", __func__, imf, inm));
1262 * NOTE: imf argument cannot be const due to sys/tree.h limitations.
1300 IGMP_PRINTF(("%s: failed to merge inm state\n", __func__));
1307 IGMP_PRINTF(("%s: failed to update source\n", __func__));
1364 * to be allocated, and there is no opportunity to roll back
1370 KASSERT(error == 0, ("%s: failed to merge inm state\n", __func__));
1411 * Leave an IPv4 multicast group, assumed to be in exclusive (*,G) mode.
1425 * The delta-based API applies only to exclusive-mode memberships.
1545 * Attempting to use the delta-based API on an
1556 * Asked to block, but already blocked; or
1557 * Asked to unblock, but nothing to unblock.
1593 IGMP_PRINTF(("%s: failed to merge inm state\n", __func__));
1761 * entries to userland gracefully.
1764 * buffer really needs to be.
1839 * Return the IP multicast options in response to user getsockopt().
1964 * Look up the ifnet to use for a multicast group membership,
1967 * This routine exists to support legacy multicast applications
1968 * which do not understand that multicast memberships are scoped to
1970 * to join link-scope groups before IPv4 addresses are configured.
1972 * If inp is non-NULL and is bound to an interface, use this socket's
1975 * If the route lookup fails, attempt to use the first non-loopback
1978 * this in order to allow groups to be joined when the routing
2039 * NB: sopt->sopt_val might point to the kernel address space. This means that
2040 * we were called by the IPv6 stack due to the presence of an IPv6 v4 mapped
2041 * address. In this scenario, sopt_p points to kernproc and sooptcopyin() will
2079 * ip_mreq_source to avoid using two instances.
2184 * it just adds the source to the filter list.
2216 * to preserve 4.4BSD API idempotence, and
2217 * avoid tedious detour to code below.
2221 * an error; if you want to change filter mode,
2303 IGMP_PRINTF(("%s: failed to merge inm state\n",
2345 * NB: sopt->sopt_val might point to the kernel address space. Refer to the
2405 * Attempt to look up hinted ifp from interface address.
2406 * Fallthrough with null ifp iff lookup fails, to
2491 * If we were instructed only to leave a given source, do so.
2523 * Give up the multicast address record to which
2533 IGMP_PRINTF(("%s: failed to merge inm state\n",
2577 * may be passed to this socket option. An address of INADDR_ANY or an
2578 * interface index of 0 is used to remove a previous selection.
2755 * allows us to deal with page faults up-front.
2786 * will set it to INCLUDE.
2799 * difference like loop to avoid walking from root
2831 IGMP_PRINTF(("%s: failed to merge inm state\n", __func__));
2860 * Set the IP multicast options in response to user setsockopt().
2864 * it is not possible to merge the duplicate code, because the idempotence
2869 * is refactored to no longer use vifs.
2940 * Index 0 is used to remove a previous selection.
2953 /* Don't need to check is ifindex is < 0 since it's unsigned */
2987 * Set the IP time-to-live for outgoing multicast packets.
3091 * Expose IGMP's multicast filter mode and source list(s) to userland,
3192 * The whole multicast option thing needs to be re-thought.
3193 * Several of these options are equally applicable to non-multicast
3211 /* Don't need to check is ifindex is < 0 since it's unsigned */
3337 panic("%s: Attempt to attach an already attached inm=%p",
3341 panic("%s: Attempt to reattach a detached inm=%p",
3384 panic("%s: Attempt to detach an unattached record inm=%p",
3458 * the only way to find this inm is via ifma_protospec. To avoid
3461 * In order to avoid violating the lock order, we must drop inm_lock
3493 /* Release reference held to the underlying ifmultiaddr */
3618 * Dump an in_multi structure to the console.