17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 56226e9d9Sethindra * Common Development and Distribution License (the "License"). 66226e9d9Sethindra * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 217c478bd9Sstevel@tonic-gate /* 22*1b47e080Sdr146992 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate * Use is subject to license terms. 247c478bd9Sstevel@tonic-gate */ 257c478bd9Sstevel@tonic-gate /* Copyright (c) 1990 Mentat Inc. */ 267c478bd9Sstevel@tonic-gate 277c478bd9Sstevel@tonic-gate #ifndef _INET_IP_MULTI_H 287c478bd9Sstevel@tonic-gate #define _INET_IP_MULTI_H 297c478bd9Sstevel@tonic-gate 307c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 317c478bd9Sstevel@tonic-gate 327c478bd9Sstevel@tonic-gate #ifdef __cplusplus 337c478bd9Sstevel@tonic-gate extern "C" { 347c478bd9Sstevel@tonic-gate #endif 357c478bd9Sstevel@tonic-gate 367c478bd9Sstevel@tonic-gate #if defined(_KERNEL) 377c478bd9Sstevel@tonic-gate 387c478bd9Sstevel@tonic-gate #define INFINITY 0xffffffffU 397c478bd9Sstevel@tonic-gate /* 407c478bd9Sstevel@tonic-gate * Enum used to pass ilg status to ip_addmulti() and friends. There 417c478bd9Sstevel@tonic-gate * are three possibilities: the group is being joined from within ip, 427c478bd9Sstevel@tonic-gate * in which case there is no associated ilg; the group is being joined 437c478bd9Sstevel@tonic-gate * from an upper layer with an associated ilg that's been newly created 447c478bd9Sstevel@tonic-gate * by this join; or the upper layer is changing its group membership 457c478bd9Sstevel@tonic-gate * state (the ilg existed before this call). 467c478bd9Sstevel@tonic-gate */ 477c478bd9Sstevel@tonic-gate typedef enum { 487c478bd9Sstevel@tonic-gate ILGSTAT_NONE, 497c478bd9Sstevel@tonic-gate ILGSTAT_NEW, 507c478bd9Sstevel@tonic-gate ILGSTAT_CHANGE 517c478bd9Sstevel@tonic-gate } ilg_stat_t; 527c478bd9Sstevel@tonic-gate 537c478bd9Sstevel@tonic-gate /* 547c478bd9Sstevel@tonic-gate * Extern functions 557c478bd9Sstevel@tonic-gate */ 566226e9d9Sethindra extern mblk_t *igmp_input(queue_t *, mblk_t *, ill_t *); 577c478bd9Sstevel@tonic-gate extern void igmp_joingroup(ilm_t *); 587c478bd9Sstevel@tonic-gate extern void igmp_leavegroup(ilm_t *); 597c478bd9Sstevel@tonic-gate extern void igmp_slowtimo(void *); 607c478bd9Sstevel@tonic-gate extern void igmp_timeout_handler(void *); 617c478bd9Sstevel@tonic-gate extern void igmp_statechange(ilm_t *, mcast_record_t, slist_t *); 627c478bd9Sstevel@tonic-gate 637c478bd9Sstevel@tonic-gate extern void mld_joingroup(ilm_t *); 647c478bd9Sstevel@tonic-gate extern void mld_leavegroup(ilm_t *); 657c478bd9Sstevel@tonic-gate extern void mld_statechange(ilm_t *, mcast_record_t, slist_t *); 667c478bd9Sstevel@tonic-gate extern void mld_slowtimo(void *); 677c478bd9Sstevel@tonic-gate 687c478bd9Sstevel@tonic-gate extern void ilg_delete_all(conn_t *connp); 697c478bd9Sstevel@tonic-gate extern ilg_t *ilg_lookup_ill_v6(conn_t *, const in6_addr_t *, 707c478bd9Sstevel@tonic-gate ill_t *); 717c478bd9Sstevel@tonic-gate extern ilg_t *ilg_lookup_ill_withsrc(conn_t *, ipaddr_t, ipaddr_t, 727c478bd9Sstevel@tonic-gate ill_t *); 737c478bd9Sstevel@tonic-gate extern ilg_t *ilg_lookup_ill_withsrc_v6(conn_t *, const in6_addr_t *, 747c478bd9Sstevel@tonic-gate const in6_addr_t *, ill_t *); 757c478bd9Sstevel@tonic-gate 767c478bd9Sstevel@tonic-gate extern void ill_leave_multicast(ill_t *); 777c478bd9Sstevel@tonic-gate extern void ill_recover_multicast(ill_t *); 78*1b47e080Sdr146992 extern int ip_get_dlpi_mbcast(ill_t *, mblk_t *); 797c478bd9Sstevel@tonic-gate 807c478bd9Sstevel@tonic-gate extern void ilm_free(ipif_t *); 817c478bd9Sstevel@tonic-gate extern ilm_t *ilm_lookup_ill(ill_t *, ipaddr_t, zoneid_t); 827c478bd9Sstevel@tonic-gate extern ilm_t *ilm_lookup_ill_v6(ill_t *, const in6_addr_t *, 837c478bd9Sstevel@tonic-gate zoneid_t); 847c478bd9Sstevel@tonic-gate extern ilm_t *ilm_lookup_ill_index_v6(ill_t *, const in6_addr_t *, 857c478bd9Sstevel@tonic-gate int, zoneid_t); 867c478bd9Sstevel@tonic-gate extern ilm_t *ilm_lookup_ipif(ipif_t *, ipaddr_t); 877c478bd9Sstevel@tonic-gate 887c478bd9Sstevel@tonic-gate extern int ilm_numentries_v6(ill_t *, const in6_addr_t *); 897c478bd9Sstevel@tonic-gate extern int ilm_walk_ipif(ipif_t *); 907c478bd9Sstevel@tonic-gate extern int ilm_walk_ill(ill_t *); 917c478bd9Sstevel@tonic-gate extern void ilm_walker_cleanup(ill_t *); 927c478bd9Sstevel@tonic-gate extern int ip_ll_send_disabmulti_req(ill_t *, const in6_addr_t *); 937c478bd9Sstevel@tonic-gate extern int ip_ll_send_enabmulti_req(ill_t *, const in6_addr_t *); 947c478bd9Sstevel@tonic-gate 957c478bd9Sstevel@tonic-gate extern int ip_addmulti(ipaddr_t, ipif_t *, ilg_stat_t, 967c478bd9Sstevel@tonic-gate mcast_record_t, slist_t *); 977c478bd9Sstevel@tonic-gate extern int ip_addmulti_v6(const in6_addr_t *, ill_t *, int, 987c478bd9Sstevel@tonic-gate zoneid_t, ilg_stat_t, mcast_record_t, slist_t *); 997c478bd9Sstevel@tonic-gate extern int ip_delmulti(ipaddr_t, ipif_t *, boolean_t, boolean_t); 1007c478bd9Sstevel@tonic-gate extern int ip_delmulti_v6(const in6_addr_t *, ill_t *, int, 1017c478bd9Sstevel@tonic-gate zoneid_t, boolean_t, boolean_t); 1027c478bd9Sstevel@tonic-gate extern int ip_join_allmulti(ipif_t *); 1037c478bd9Sstevel@tonic-gate extern int ip_leave_allmulti(ipif_t *); 1047c478bd9Sstevel@tonic-gate extern void ip_multicast_loopback(queue_t *, ill_t *, mblk_t *, 1057c478bd9Sstevel@tonic-gate int, zoneid_t); 1067c478bd9Sstevel@tonic-gate extern int ip_mforward(ill_t *, ipha_t *, mblk_t *); 107f4b3ec61Sdh155122 extern void ip_mroute_decap(queue_t *, mblk_t *, ill_t *); 108f4b3ec61Sdh155122 extern int ip_mroute_mrt(mblk_t *, ip_stack_t *); 109f4b3ec61Sdh155122 extern int ip_mroute_stats(mblk_t *, ip_stack_t *); 110f4b3ec61Sdh155122 extern int ip_mroute_vif(mblk_t *, ip_stack_t *); 111f4b3ec61Sdh155122 extern int ip_mrouter_done(mblk_t *, ip_stack_t *); 1127c478bd9Sstevel@tonic-gate extern int ip_mrouter_get(int, queue_t *, uchar_t *); 1137c478bd9Sstevel@tonic-gate extern int ip_mrouter_set(int, queue_t *, int, uchar_t *, int, 1147c478bd9Sstevel@tonic-gate mblk_t *); 115f4b3ec61Sdh155122 extern void ip_mrouter_stack_init(ip_stack_t *); 116f4b3ec61Sdh155122 extern void ip_mrouter_stack_destroy(ip_stack_t *); 1177c478bd9Sstevel@tonic-gate 1187c478bd9Sstevel@tonic-gate extern int ip_opt_add_group(conn_t *, boolean_t, ipaddr_t, 11998e93c29Smeem ipaddr_t, uint_t *, mcast_record_t, ipaddr_t, mblk_t *); 1207c478bd9Sstevel@tonic-gate extern int ip_opt_delete_group(conn_t *, boolean_t, ipaddr_t, 12198e93c29Smeem ipaddr_t, uint_t *, mcast_record_t, ipaddr_t, mblk_t *); 1227c478bd9Sstevel@tonic-gate extern int ip_opt_add_group_v6(conn_t *, boolean_t, 1237c478bd9Sstevel@tonic-gate const in6_addr_t *, int, mcast_record_t, const in6_addr_t *, mblk_t *); 1247c478bd9Sstevel@tonic-gate extern int ip_opt_delete_group_v6(conn_t *, boolean_t, 1257c478bd9Sstevel@tonic-gate const in6_addr_t *, int, mcast_record_t, const in6_addr_t *, mblk_t *); 1267c478bd9Sstevel@tonic-gate 12798e93c29Smeem extern int mrt_ioctl(ipif_t *, sin_t *, queue_t *, mblk_t *, 12898e93c29Smeem ip_ioctl_cmd_t *, void *); 1297c478bd9Sstevel@tonic-gate extern int ip_sioctl_msfilter(ipif_t *, sin_t *, queue_t *, 1307c478bd9Sstevel@tonic-gate mblk_t *, ip_ioctl_cmd_t *, void *); 13198e93c29Smeem extern int ip_extract_msfilter(queue_t *, mblk_t *, 13298e93c29Smeem const ip_ioctl_cmd_t *, cmd_info_t *, ipsq_func_t); 1337c478bd9Sstevel@tonic-gate extern int ip_copyin_msfilter(queue_t *, mblk_t *); 1347c478bd9Sstevel@tonic-gate 1357c478bd9Sstevel@tonic-gate extern void ip_wput_ctl(queue_t *, mblk_t *); 1367c478bd9Sstevel@tonic-gate 137f4b3ec61Sdh155122 extern int pim_input(queue_t *, mblk_t *, ill_t *); 1387c478bd9Sstevel@tonic-gate extern void reset_conn_ipif(ipif_t *); 1397c478bd9Sstevel@tonic-gate extern void reset_conn_ill(ill_t *); 1407c478bd9Sstevel@tonic-gate extern void reset_mrt_ill(ill_t *); 1417c478bd9Sstevel@tonic-gate extern void reset_mrt_vif_ipif(ipif_t *); 142f4b3ec61Sdh155122 extern void igmp_start_timers(unsigned, ip_stack_t *); 143f4b3ec61Sdh155122 extern void mld_start_timers(unsigned, ip_stack_t *); 1447c478bd9Sstevel@tonic-gate 1457c478bd9Sstevel@tonic-gate #endif /* _KERNEL */ 1467c478bd9Sstevel@tonic-gate 1477c478bd9Sstevel@tonic-gate #ifdef __cplusplus 1487c478bd9Sstevel@tonic-gate } 1497c478bd9Sstevel@tonic-gate #endif 1507c478bd9Sstevel@tonic-gate 1517c478bd9Sstevel@tonic-gate #endif /* _INET_IP_MULTI_H */ 152