-/* $OpenBSD: if_pfsync.c,v 1.213 2014/12/17 09:45:59 mpi Exp $ */
+/* $OpenBSD: if_pfsync.c,v 1.214 2014/12/17 09:57:13 mpi Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff
}
imo->imo_num_memberships++;
imo->imo_ifidx = sc->sc_sync_if->if_index;
- imo->imo_multicast_ttl = PFSYNC_DFLTTL;
- imo->imo_multicast_loop = 0;
+ imo->imo_ttl = PFSYNC_DFLTTL;
+ imo->imo_loop = 0;
}
ip = &sc->sc_template;
-/* $OpenBSD: if_vxlan.c,v 1.18 2014/12/17 09:45:59 mpi Exp $ */
+/* $OpenBSD: if_vxlan.c,v 1.19 2014/12/17 09:57:13 mpi Exp $ */
/*
* Copyright (c) 2013 Reyk Floeter <reyk@openbsd.org>
imo->imo_num_memberships++;
imo->imo_ifidx = mifp->if_index;
if (sc->sc_ttl > 0)
- imo->imo_multicast_ttl = sc->sc_ttl;
+ imo->imo_ttl = sc->sc_ttl;
else
- imo->imo_multicast_ttl = IP_DEFAULT_MULTICAST_TTL;
- imo->imo_multicast_loop = 0;
+ imo->imo_ttl = IP_DEFAULT_MULTICAST_TTL;
+ imo->imo_loop = 0;
/*
* Use interface hooks to track any changes on the interface
-/* $OpenBSD: igmp.c,v 1.47 2014/12/17 09:45:59 mpi Exp $ */
+/* $OpenBSD: igmp.c,v 1.48 2014/12/17 09:57:13 mpi Exp $ */
/* $NetBSD: igmp.c,v 1.15 1996/02/13 23:41:25 christos Exp $ */
/*
m->m_len += sizeof(struct ip);
imo.imo_ifidx = inm->inm_ifidx;
- imo.imo_multicast_ttl = 1;
+ imo.imo_ttl = 1;
/*
* Request loopback of the report if we are acting as a multicast
* router, so that the process-level routing daemon can hear it.
*/
#ifdef MROUTING
- imo.imo_multicast_loop = (ip_mrouter != NULL);
+ imo.imo_loop = (ip_mrouter != NULL);
#else
- imo.imo_multicast_loop = 0;
+ imo.imo_loop = 0;
#endif /* MROUTING */
ip_output(m, router_alert, NULL, IP_MULTICASTOPTS, &imo, NULL, 0);
-/* $OpenBSD: ip_carp.c,v 1.241 2014/12/17 09:45:59 mpi Exp $ */
+/* $OpenBSD: ip_carp.c,v 1.242 2014/12/17 09:57:13 mpi Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff. All rights reserved.
sc->sc_advbase = CARP_DFLTINTV;
sc->sc_naddrs = sc->sc_naddrs6 = 0;
#ifdef INET6
- sc->sc_im6o.im6o_multicast_hlim = CARP_DFLTTL;
+ sc->sc_im6o.im6o_hlim = CARP_DFLTTL;
#endif /* INET6 */
sc->sc_imo.imo_membership = (struct in_multi **)malloc(
(sizeof(struct in_multi *) * IP_MIN_MEMBERSHIPS), M_IPMOPTS,
imo->imo_membership[0] = imm;
imo->imo_num_memberships = 1;
imo->imo_ifidx = sc->sc_if.if_index;
- imo->imo_multicast_ttl = CARP_DFLTTL;
- imo->imo_multicast_loop = 0;
+ imo->imo_ttl = CARP_DFLTTL;
+ imo->imo_loop = 0;
return (0);
}
-/* $OpenBSD: ip_mroute.c,v 1.73 2014/12/17 09:45:59 mpi Exp $ */
+/* $OpenBSD: ip_mroute.c,v 1.74 2014/12/17 09:57:13 mpi Exp $ */
/* $NetBSD: ip_mroute.c,v 1.85 2004/04/26 01:31:57 matt Exp $ */
/*
struct ip_moptions imo;
imo.imo_ifidx = vifp->v_ifp->if_index;
- imo.imo_multicast_ttl = mtod(m, struct ip *)->ip_ttl - IPTTLDEC;
- imo.imo_multicast_loop = 1;
+ imo.imo_ttl = mtod(m, struct ip *)->ip_ttl - IPTTLDEC;
+ imo.imo_loop = 1;
error = ip_output(m, NULL, NULL,
IP_FORWARDING | IP_MULTICASTOPTS, &imo, NULL, 0);
-/* $OpenBSD: ip_output.c,v 1.275 2014/12/17 09:45:59 mpi Exp $ */
+/* $OpenBSD: ip_output.c,v 1.276 2014/12/17 09:57:13 mpi Exp $ */
/* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */
/*
* See if the caller provided any multicast options
*/
if (imo != NULL)
- ip->ip_ttl = imo->imo_multicast_ttl;
+ ip->ip_ttl = imo->imo_ttl;
else
ip->ip_ttl = IP_DEFAULT_MULTICAST_TTL;
IN_LOOKUP_MULTI(ip->ip_dst, ifp, inm);
if (inm != NULL &&
- (imo == NULL || imo->imo_multicast_loop)) {
+ (imo == NULL || imo->imo_loop)) {
/*
* If we belong to the destination multicast group
* on the outgoing interface, and the caller did not
M_WAITOK|M_ZERO);
*imop = imo;
imo->imo_ifidx = 0;
- imo->imo_multicast_ttl = IP_DEFAULT_MULTICAST_TTL;
- imo->imo_multicast_loop = IP_DEFAULT_MULTICAST_LOOP;
+ imo->imo_ttl = IP_DEFAULT_MULTICAST_TTL;
+ imo->imo_loop = IP_DEFAULT_MULTICAST_LOOP;
imo->imo_num_memberships = 0;
imo->imo_max_memberships = IP_MIN_MEMBERSHIPS;
imo->imo_membership = immp;
error = EINVAL;
break;
}
- imo->imo_multicast_ttl = *(mtod(m, u_char *));
+ imo->imo_ttl = *(mtod(m, u_char *));
break;
case IP_MULTICAST_LOOP:
error = EINVAL;
break;
}
- imo->imo_multicast_loop = loop;
+ imo->imo_loop = loop;
break;
case IP_ADD_MEMBERSHIP:
* If all options have default values, no need to keep the data.
*/
if (imo->imo_ifidx == 0 &&
- imo->imo_multicast_ttl == IP_DEFAULT_MULTICAST_TTL &&
- imo->imo_multicast_loop == IP_DEFAULT_MULTICAST_LOOP &&
+ imo->imo_ttl == IP_DEFAULT_MULTICAST_TTL &&
+ imo->imo_loop == IP_DEFAULT_MULTICAST_LOOP &&
imo->imo_num_memberships == 0) {
free(imo->imo_membership , M_IPMOPTS, 0);
free(*imop, M_IPMOPTS, sizeof(**imop));
ttl = mtod(*mp, u_char *);
(*mp)->m_len = 1;
*ttl = (imo == NULL) ? IP_DEFAULT_MULTICAST_TTL
- : imo->imo_multicast_ttl;
+ : imo->imo_ttl;
return (0);
case IP_MULTICAST_LOOP:
loop = mtod(*mp, u_char *);
(*mp)->m_len = 1;
*loop = (imo == NULL) ? IP_DEFAULT_MULTICAST_LOOP
- : imo->imo_multicast_loop;
+ : imo->imo_loop;
return (0);
default:
-/* $OpenBSD: ip_var.h,v 1.58 2014/12/17 09:45:59 mpi Exp $ */
+/* $OpenBSD: ip_var.h,v 1.59 2014/12/17 09:57:13 mpi Exp $ */
/* $NetBSD: ip_var.h,v 1.16 1996/02/13 23:43:20 christos Exp $ */
/*
struct ip_moptions {
struct in_multi **imo_membership; /* group memberships */
unsigned short imo_ifidx; /* ifp index for outgoing multicasts */
- u_int8_t imo_multicast_ttl; /* TTL for outgoing multicasts */
- u_int8_t imo_multicast_loop; /* 1 => hear sends if a member */
+ u_int8_t imo_ttl; /* TTL for outgoing multicasts */
+ u_int8_t imo_loop; /* 1 => hear sends if a member */
u_int16_t imo_num_memberships; /* no. memberships this socket */
u_int16_t imo_max_memberships; /* max memberships this socket */
};
im6o.im6o_ifidx = ifp->if_index;
/* XXX: ip6_output will override ip6->ip6_hlim */
- im6o.im6o_multicast_hlim = ip6->ip6_hlim;
- im6o.im6o_multicast_loop = 1;
+ im6o.im6o_hlim = ip6->ip6_hlim;
+ im6o.im6o_loop = 1;
error = ip6_output(mb_copy, NULL, &ro, IPV6_FORWARDING, &im6o,
NULL, NULL);
-/* $OpenBSD: ip6_output.c,v 1.164 2014/12/17 09:45:59 mpi Exp $ */
+/* $OpenBSD: ip6_output.c,v 1.165 2014/12/17 09:57:13 mpi Exp $ */
/* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */
/*
ip6->ip6_hlim = opt->ip6po_hlim & 0xff;
else if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) {
if (im6o != NULL)
- ip6->ip6_hlim = im6o->im6o_multicast_hlim;
+ ip6->ip6_hlim = im6o->im6o_hlim;
else
ip6->ip6_hlim = ip6_defmcasthlim;
}
}
IN6_LOOKUP_MULTI(ip6->ip6_dst, ifp, in6m);
if (in6m != NULL &&
- (im6o == NULL || im6o->im6o_multicast_loop)) {
+ (im6o == NULL || im6o->im6o_loop)) {
/*
* If we belong to the destination multicast group
* on the outgoing interface, and the caller did not
return (ENOBUFS);
*im6op = im6o;
im6o->im6o_ifidx = 0;
- im6o->im6o_multicast_hlim = ip6_defmcasthlim;
- im6o->im6o_multicast_loop = IPV6_DEFAULT_MULTICAST_LOOP;
+ im6o->im6o_hlim = ip6_defmcasthlim;
+ im6o->im6o_loop = IPV6_DEFAULT_MULTICAST_LOOP;
LIST_INIT(&im6o->im6o_memberships);
}
if (optval < -1 || optval >= 256)
error = EINVAL;
else if (optval == -1)
- im6o->im6o_multicast_hlim = ip6_defmcasthlim;
+ im6o->im6o_hlim = ip6_defmcasthlim;
else
- im6o->im6o_multicast_hlim = optval;
+ im6o->im6o_hlim = optval;
break;
}
error = EINVAL;
break;
}
- im6o->im6o_multicast_loop = loop;
+ im6o->im6o_loop = loop;
break;
case IPV6_JOIN_GROUP:
* structure.
*/
if (im6o->im6o_ifidx == 0 &&
- im6o->im6o_multicast_hlim == ip6_defmcasthlim &&
- im6o->im6o_multicast_loop == IPV6_DEFAULT_MULTICAST_LOOP &&
+ im6o->im6o_hlim == ip6_defmcasthlim &&
+ im6o->im6o_loop == IPV6_DEFAULT_MULTICAST_LOOP &&
LIST_EMPTY(&im6o->im6o_memberships)) {
free(*im6op, M_IPMOPTS, 0);
*im6op = NULL;
if (im6o == NULL)
*hlim = ip6_defmcasthlim;
else
- *hlim = im6o->im6o_multicast_hlim;
+ *hlim = im6o->im6o_hlim;
return (0);
case IPV6_MULTICAST_LOOP:
if (im6o == NULL)
*loop = ip6_defmcasthlim;
else
- *loop = im6o->im6o_multicast_loop;
+ *loop = im6o->im6o_loop;
return (0);
default:
-/* $OpenBSD: ip6_var.h,v 1.50 2014/12/17 09:45:59 mpi Exp $ */
+/* $OpenBSD: ip6_var.h,v 1.51 2014/12/17 09:57:13 mpi Exp $ */
/* $KAME: ip6_var.h,v 1.33 2000/06/11 14:59:20 jinmei Exp $ */
/*
struct ip6_moptions {
LIST_HEAD(, in6_multi_mship) im6o_memberships;
unsigned short im6o_ifidx; /* ifp index for outgoing multicasts */
- u_char im6o_multicast_hlim; /* hoplimit for outgoing multicasts */
- u_char im6o_multicast_loop; /* 1 >= hear sends if a member */
+ u_char im6o_hlim; /* hoplimit for outgoing multicasts */
+ u_char im6o_loop; /* 1 >= hear sends if a member */
};
/*
-/* $OpenBSD: mld6.c,v 1.40 2014/12/17 09:45:59 mpi Exp $ */
+/* $OpenBSD: mld6.c,v 1.41 2014/12/17 09:57:13 mpi Exp $ */
/* $KAME: mld6.c,v 1.26 2001/02/16 14:50:35 itojun Exp $ */
/*
ip6->ip6_vfc |= IPV6_VERSION;
/* ip6_plen will be set later */
ip6->ip6_nxt = IPPROTO_ICMPV6;
- /* ip6_hlim will be set by im6o.im6o_multicast_hlim */
+ /* ip6_hlim will be set by im6o.im6o_hlim */
ip6->ip6_src = ia6 ? ia6->ia_addr.sin6_addr : in6addr_any;
ip6->ip6_dst = dst ? *dst : in6m->in6m_addr;
/* construct multicast option */
bzero(&im6o, sizeof(im6o));
im6o.im6o_ifidx = ifp->if_index;
- im6o.im6o_multicast_hlim = 1;
+ im6o.im6o_hlim = 1;
/*
* Request loopback of the report if we are acting as a multicast
* router, so that the process-level routing daemon can hear it.
*/
#ifdef MROUTING
- im6o.im6o_multicast_loop = (ip6_mrouter != NULL);
+ im6o.im6o_loop = (ip6_mrouter != NULL);
#endif
/* increment output statictics */
-/* $OpenBSD: nd6_nbr.c,v 1.87 2014/12/17 09:45:59 mpi Exp $ */
+/* $OpenBSD: nd6_nbr.c,v 1.88 2014/12/17 09:57:13 mpi Exp $ */
/* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */
/*
if (daddr6 == NULL || IN6_IS_ADDR_MULTICAST(daddr6)) {
m->m_flags |= M_MCAST;
im6o.im6o_ifidx = ifp->if_index;
- im6o.im6o_multicast_hlim = 255;
- im6o.im6o_multicast_loop = 0;
+ im6o.im6o_hlim = 255;
+ im6o.im6o_loop = 0;
}
icmp6len = sizeof(*nd_ns);
if (IN6_IS_ADDR_MULTICAST(daddr6)) {
m->m_flags |= M_MCAST;
im6o.im6o_ifidx = ifp->if_index;
- im6o.im6o_multicast_hlim = 255;
- im6o.im6o_multicast_loop = 0;
+ im6o.im6o_hlim = 255;
+ im6o.im6o_loop = 0;
}
icmp6len = sizeof(*nd_na);
-/* $OpenBSD: nd6_rtr.c,v 1.93 2014/12/17 09:45:59 mpi Exp $ */
+/* $OpenBSD: nd6_rtr.c,v 1.94 2014/12/17 09:57:13 mpi Exp $ */
/* $KAME: nd6_rtr.c,v 1.97 2001/02/07 11:09:13 itojun Exp $ */
/*
m->m_pkthdr.csum_flags |= M_ICMP_CSUM_OUT;
im6o.im6o_ifidx = ifp->if_index;
- im6o.im6o_multicast_hlim = 255;
- im6o.im6o_multicast_loop = 0;
+ im6o.im6o_hlim = 255;
+ im6o.im6o_loop = 0;
icmp6len = sizeof(*rs);
m->m_pkthdr.len = m->m_len = sizeof(*ip6) + icmp6len;