ip_multi.h revision 11042:2d6e217af1b4
1193323Sed/* 2193323Sed * CDDL HEADER START 3193323Sed * 4193323Sed * The contents of this file are subject to the terms of the 5193323Sed * Common Development and Distribution License (the "License"). 6193323Sed * You may not use this file except in compliance with the License. 7193323Sed * 8193323Sed * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9193323Sed * or http://www.opensolaris.org/os/licensing. 10193323Sed * See the License for the specific language governing permissions 11193323Sed * and limitations under the License. 12193323Sed * 13193323Sed * When distributing Covered Code, include this CDDL HEADER in each 14193323Sed * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15193323Sed * If applicable, add the following below this CDDL HEADER, with the 16193323Sed * fields enclosed by brackets "[]" replaced with your own identifying 17193323Sed * information: Portions Copyright [yyyy] [name of copyright owner] 18193323Sed * 19210299Sed * CDDL HEADER END 20210299Sed */ 21210299Sed/* 22193323Sed * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 23193323Sed * Use is subject to license terms. 24193323Sed */ 25193323Sed/* Copyright (c) 1990 Mentat Inc. */ 26193323Sed 27193323Sed#ifndef _INET_IP_MULTI_H 28199481Srdivacky#define _INET_IP_MULTI_H 29193323Sed 30193323Sed#ifdef __cplusplus 31193323Sedextern "C" { 32193323Sed#endif 33193323Sed 34193323Sed#if defined(_KERNEL) 35193323Sed 36193323Sed#define INFINITY 0xffffffffU 37193323Sed/* 38193323Sed * Enum used to pass ilg status to ip_addmulti() and friends. There 39221345Sdim * are three possibilities: the group is being joined from within ip, 40193323Sed * in which case there is no associated ilg; the group is being joined 41193323Sed * from an upper layer with an associated ilg that's been newly created 42193323Sed * by this join; or the upper layer is changing its group membership 43193323Sed * state (the ilg existed before this call). 44193323Sed */ 45193323Sedtypedef enum { 46193323Sed ILGSTAT_NONE, 47193323Sed ILGSTAT_NEW, 48193323Sed ILGSTAT_CHANGE 49193323Sed} ilg_stat_t; 50193323Sed 51193323Sed/* 52193323Sed * Extern functions 53193323Sed */ 54193323Sedextern mblk_t *igmp_input(mblk_t *, ip_recv_attr_t *); 55218893Sdimextern void igmp_joingroup(ilm_t *); 56194612Sedextern void igmp_leavegroup(ilm_t *); 57193323Sedextern void igmp_slowtimo(void *); 58193323Sedextern void igmp_timeout_handler(void *); 59193323Sedextern void igmp_statechange(ilm_t *, mcast_record_t, slist_t *); 60193323Sed 61218893Sdimextern void mld_joingroup(ilm_t *); 62193323Sedextern void mld_leavegroup(ilm_t *); 63199481Srdivackyextern void mld_statechange(ilm_t *, mcast_record_t, slist_t *); 64207618Srdivackyextern void mld_slowtimo(void *); 65218893Sdim 66210299Sedextern void ilg_delete_all(conn_t *connp); 67207618Srdivackyextern boolean_t conn_hasmembers_ill_withsrc_v4(conn_t *, ipaddr_t, 68193323Sed ipaddr_t, ill_t *); 69218893Sdimextern boolean_t conn_hasmembers_ill_withsrc_v6(conn_t *, 70218893Sdim const in6_addr_t *, const in6_addr_t *, ill_t *); 71193323Sed 72218893Sdimextern void ill_leave_multicast(ill_t *); 73193323Sedextern void ill_recover_multicast(ill_t *); 74193323Sedextern void ip_dlur_to_mhi(ill_t *, mblk_t *, 75193323Sed struct mac_header_info_s *); 76218893Sdim 77193323Sed/* These make up the data path interface used by ip_output and ip_input */ 78193323Sedextern boolean_t ill_hasmembers_v4(ill_t *, ipaddr_t); 79193323Sedextern boolean_t ill_hasmembers_v6(ill_t *, const in6_addr_t *); 80198090Srdivackyextern boolean_t ill_hasmembers_otherzones_v4(ill_t *, ipaddr_t, 81193323Sed zoneid_t); 82218893Sdimextern boolean_t ill_hasmembers_otherzones_v6(ill_t *, 83218893Sdim const in6_addr_t *, zoneid_t); 84218893Sdimextern zoneid_t ill_hasmembers_nextzone_v4(ill_t *, ipaddr_t, zoneid_t); 85193323Sedextern zoneid_t ill_hasmembers_nextzone_v6(ill_t *, const in6_addr_t *, 86193323Sed zoneid_t); 87193323Sed 88193323Sedextern ilm_t *ip_addmulti(const in6_addr_t *, ill_t *, zoneid_t, 89218893Sdim int *); 90218893Sdimextern int ip_delmulti(ilm_t *); 91218893Sdimextern int ip_mforward(mblk_t *, ip_recv_attr_t *); 92218893Sdimextern void ip_mroute_decap(mblk_t *, ip_recv_attr_t *); 93218893Sdimextern int ill_join_allmulti(ill_t *); 94218893Sdimextern void ill_leave_allmulti(ill_t *); 95218893Sdimextern int ip_join_allmulti(uint_t, boolean_t, ip_stack_t *); 96218893Sdimextern int ip_leave_allmulti(uint_t, boolean_t, ip_stack_t *); 97218893Sdimextern void ip_purge_allmulti(ill_t *); 98218893Sdimextern int ip_mroute_mrt(mblk_t *, ip_stack_t *); 99218893Sdimextern int ip_mroute_stats(mblk_t *, ip_stack_t *); 100218893Sdimextern int ip_mroute_vif(mblk_t *, ip_stack_t *); 101193323Sedextern int ip_mrouter_done(ip_stack_t *); 102193323Sedextern int ip_mrouter_get(int, conn_t *, uchar_t *); 103199481Srdivackyextern int ip_mrouter_set(int, conn_t *, int, uchar_t *, int); 104193323Sedextern void ip_mrouter_stack_init(ip_stack_t *); 105193323Sedextern void ip_mrouter_stack_destroy(ip_stack_t *); 106193323Sed 107193323Sedextern int ip_opt_add_group(conn_t *, boolean_t, 108193323Sed const in6_addr_t *, ipaddr_t, uint_t, mcast_record_t, const in6_addr_t *); 109193323Sedextern int ip_opt_delete_group(conn_t *, boolean_t, 110193323Sed const in6_addr_t *, ipaddr_t, uint_t, mcast_record_t, const in6_addr_t *); 111212904Sdim 112218893Sdimextern int mrt_ioctl(ipif_t *, sin_t *, queue_t *, mblk_t *, 113193323Sed ip_ioctl_cmd_t *, void *); 114193323Sedextern int ip_sioctl_msfilter(ipif_t *, sin_t *, queue_t *, 115193323Sed mblk_t *, ip_ioctl_cmd_t *, void *); 116193323Sedextern int ip_copyin_msfilter(queue_t *, mblk_t *); 117193323Sed 118193323Sedextern mblk_t *pim_input(mblk_t *, ip_recv_attr_t *); 119193323Sedextern void update_conn_ill(ill_t *, ip_stack_t *); 120193323Sedextern void reset_mrt_ill(ill_t *); 121193323Sedextern void reset_mrt_vif_ipif(ipif_t *); 122193323Sedextern void igmp_start_timers(unsigned, ip_stack_t *); 123193323Sedextern void mld_start_timers(unsigned, ip_stack_t *); 124193323Sedextern void ilm_inactive(ilm_t *); 125193323Sed 126193323Sed#endif /* _KERNEL */ 127193323Sed 128199481Srdivacky#ifdef __cplusplus 129193323Sed} 130193323Sed#endif 131193323Sed 132193323Sed#endif /* _INET_IP_MULTI_H */ 133193323Sed