xref: /titanic_41/usr/src/uts/common/inet/ip_if.h (revision 5aefb6555731130ca4fd295960123d71f2d21fe8)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 /* Copyright (c) 1990 Mentat Inc. */
27 
28 #ifndef	_INET_IP_IF_H
29 #define	_INET_IP_IF_H
30 
31 #pragma ident	"%Z%%M%	%I%	%E% SMI"
32 
33 #ifdef	__cplusplus
34 extern "C" {
35 #endif
36 
37 #define	PREFIX_INFINITY	0xffffffffUL
38 #define	IP_MAX_HW_LEN	40
39 
40 #define	IP_LOOPBACK_MTU	(8*1024)
41 
42 /* DLPI SAPs are in host byte order for all systems */
43 #define	IP_DL_SAP	0x0800
44 #define	IP6_DL_SAP	0x86dd
45 
46 #ifdef	_KERNEL
47 /*
48  * Interface flags actually represent the state/properties of 3 different
49  * abstractions of interfaces in IP. Interface flags are set using
50  * SIOCS[L]IFFLAGS ioctl. The three abstractions are :
51  *
52  * 1) Physical interface (phyint) : There is one phyint allocated common
53  *    to both IPv4 and IPv6 physical interface instance.
54  *
55  * 2) Physical interface instance (ill) : This encompasses all the state
56  *    that is common across all IP addresses assigned to a physical
57  *    interface but different between the IPv4 and IPv6 instance.
58  *
59  * 3) Logical interface (ipif) : This has state about a single IP address.
60  *
61  * Values for the various states are derived from the same name space
62  * as applications querying the state using SIOCGIFFLAGS/SIOCGLIFFLAGS
63  * see only one state returned in lifr_flags which is a union of all
64  * the above states/properties. Thus deriving the values from the common
65  * name space makes implementation easier. All these values are stored in
66  * uint64_t and any other structure/code using these flags should use
67  * uint64_ts.
68  *
69  * As we maintain the interface flags in 3 different flags namely
70  * phyint_flags, ill_flags, ipif_flags we define the following flag values
71  * to be used within the kernel to reduce potential errors. The ones
72  * starting with PHYI_ are supposed to be used with phyint_flags, the ones
73  * starting with ILLF_ are supposed to be used with ill_flags and the ones
74  * starting with IPIF_ are supposed to be used with ipif_flags. If you see
75  * any code with a mismatch i.e phyint_flags & IPIF_UP - it is wrong. Only
76  * PHYI_XXX can be used with phyint_flags.
77  *
78  * NOTE : For EVERY FLAG in if.h, there should be a corresponding value
79  * defined HERE and this is the one that should be USED within IP. We
80  * use IFF_ flags within IP only when we examine lifr_flags.
81  */
82 #define	IFF_PHYINT_FLAGS	(IFF_LOOPBACK|IFF_RUNNING|IFF_PROMISC| \
83     IFF_ALLMULTI|IFF_INTELLIGENT|IFF_MULTI_BCAST|IFF_FAILED|IFF_STANDBY| \
84     IFF_INACTIVE|IFF_OFFLINE|IFF_VIRTUAL)
85 
86 #define	IFF_PHYINTINST_FLAGS	(IFF_DEBUG|IFF_NOTRAILERS|IFF_NOARP| \
87     IFF_MULTICAST|IFF_ROUTER|IFF_NONUD|IFF_NORTEXCH|IFF_IPV4|IFF_IPV6| \
88     IFF_XRESOLV|IFF_COS_ENABLED)
89 
90 #define	IFF_LOGINT_FLAGS	(IFF_UP|IFF_BROADCAST|IFF_POINTOPOINT| \
91     IFF_UNNUMBERED|IFF_DHCPRUNNING|IFF_PRIVATE|IFF_NOXMIT|IFF_NOLOCAL| \
92     IFF_DEPRECATED|IFF_ADDRCONF|IFF_ANYCAST|IFF_MIPRUNNING|IFF_NOFAILOVER| \
93     IFF_PREFERRED|IFF_TEMPORARY|IFF_FIXEDMTU)
94 
95 #define	IPIF_REPL_CHECK(to_ipif, failback_cmd)				\
96 	(((to_ipif)->ipif_replace_zero) || ((failback_cmd) &&		\
97 	!(to_ipif)->ipif_isv6 && !((to_ipif)->ipif_flags & IPIF_UP) &&	\
98 	(to_ipif)->ipif_lcl_addr == INADDR_ANY))
99 
100 #define	PHYI_LOOPBACK		IFF_LOOPBACK	/* is a loopback net */
101 #define	PHYI_RUNNING		IFF_RUNNING	/* resources allocated */
102 #define	PHYI_PROMISC		IFF_PROMISC	/* receive all packets */
103 #define	PHYI_ALLMULTI		IFF_ALLMULTI	/* receive all multi packets */
104 #define	PHYI_INTELLIGENT	IFF_INTELLIGENT	/* protocol code on board */
105 #define	PHYI_MULTI_BCAST	IFF_MULTI_BCAST	/* multicast using broadcast */
106 #define	PHYI_FAILED		IFF_FAILED	/* NIC has failed */
107 #define	PHYI_STANDBY		IFF_STANDBY	/* Standby NIC  */
108 #define	PHYI_INACTIVE		IFF_INACTIVE	/* Standby active or not ? */
109 #define	PHYI_OFFLINE		IFF_OFFLINE	/* NIC has been offlined */
110 #define	PHYI_VIRTUAL		IFF_VIRTUAL	/* Will not send or recv pkts */
111 
112 #define	ILLF_DEBUG		IFF_DEBUG	/* turn on debugging */
113 #define	ILLF_NOTRAILERS		IFF_NOTRAILERS	/* avoid use of trailers */
114 #define	ILLF_NOARP		IFF_NOARP	/* no ARP for this interface */
115 #define	ILLF_MULTICAST		IFF_MULTICAST	/* supports multicast */
116 #define	ILLF_ROUTER		IFF_ROUTER	/* router on this interface */
117 #define	ILLF_NONUD		IFF_NONUD	/* No NUD on this interface */
118 #define	ILLF_NORTEXCH		IFF_NORTEXCH	/* No routing info exchange */
119 #define	ILLF_IPV4		IFF_IPV4	/* IPv4 interface */
120 #define	ILLF_IPV6		IFF_IPV6	/* IPv6 interface */
121 #define	ILLF_XRESOLV		IFF_XRESOLV	/* IPv6 external resolver */
122 #define	ILLF_COS_ENABLED	IFF_COS_ENABLED	/* Is CoS marking supported */
123 
124 #define	IPIF_UP			IFF_UP		/* interface is up */
125 #define	IPIF_BROADCAST		IFF_BROADCAST	/* broadcast address valid */
126 #define	IPIF_POINTOPOINT	IFF_POINTOPOINT	/* point-to-point link */
127 #define	IPIF_UNNUMBERED		IFF_UNNUMBERED	/* non-unique address */
128 #define	IPIF_DHCPRUNNING	IFF_DHCPRUNNING	/* DHCP controlled interface */
129 #define	IPIF_PRIVATE		IFF_PRIVATE	/* do not advertise */
130 #define	IPIF_NOXMIT		IFF_NOXMIT	/* Do not transmit packets */
131 #define	IPIF_NOLOCAL		IFF_NOLOCAL	/* Just on-link subnet */
132 #define	IPIF_DEPRECATED		IFF_DEPRECATED	/* address deprecated */
133 #define	IPIF_ADDRCONF		IFF_ADDRCONF	/* stateless addrconf */
134 #define	IPIF_ANYCAST		IFF_ANYCAST	/* Anycast address */
135 #define	IPIF_MIPRUNNING		IFF_MIPRUNNING	/* Mobip Controlled interface */
136 #define	IPIF_NOFAILOVER		IFF_NOFAILOVER	/* No failover on NIC failure */
137 #define	IPIF_PREFERRED		IFF_PREFERRED	/* Prefer as source address */
138 #define	IPIF_TEMPORARY		IFF_TEMPORARY	/* RFC3041 */
139 #define	IPIF_FIXEDMTU		IFF_FIXEDMTU	/* set with SIOCSLIFMTU */
140 
141 extern	ill_t	*illgrp_scheduler(ill_t *);
142 extern	mblk_t	*ill_arp_alloc(ill_t *, uchar_t *, caddr_t);
143 extern	void	ill_dlpi_done(ill_t *, t_uscalar_t);
144 extern	void	ill_dlpi_send(ill_t *, mblk_t *);
145 extern	mblk_t	*ill_dlur_gen(uchar_t *, uint_t, t_uscalar_t, t_scalar_t);
146 extern  ill_t	*ill_lookup_on_ifindex(uint_t, boolean_t, queue_t *, mblk_t *,
147     ipsq_func_t, int *);
148 extern	ill_t	*ill_lookup_on_name(char *, boolean_t,
149     boolean_t, queue_t *, mblk_t *, ipsq_func_t, int *, boolean_t *);
150 extern	void	ill_ipif_cache_delete(ire_t *, char *);
151 extern	void	ill_delete(ill_t *);
152 extern	void	ill_delete_tail(ill_t *);
153 extern	int	ill_dl_phys(ill_t *, ipif_t *, mblk_t *, queue_t *);
154 extern	int	ill_dls_info(struct sockaddr_dl *, ipif_t *);
155 extern	void	ill_fastpath_ack(ill_t *, mblk_t *);
156 extern	void	ill_fastpath_nack(ill_t *);
157 extern	int	ill_fastpath_probe(ill_t *, mblk_t *);
158 extern	void	ill_frag_prune(ill_t *, uint_t);
159 extern	void	ill_frag_free_pkts(ill_t *, ipfb_t *, ipf_t *, int);
160 extern	time_t	ill_frag_timeout(ill_t *, time_t);
161 extern	int	ill_init(queue_t *, ill_t *);
162 extern	int	ill_nominate_mcast_rcv(ill_group_t *);
163 extern	boolean_t	ill_setdefaulttoken(ill_t *);
164 
165 extern void	ill_lock_ills(ill_t **, int);
166 extern mblk_t	*ill_pending_mp_get(ill_t *, conn_t **, uint_t);
167 extern boolean_t ill_pending_mp_add(ill_t *, conn_t *, mblk_t *);
168 extern	boolean_t ill_is_quiescent(ill_t *ill);
169 extern	void	ill_unlock_ills(ill_t **, int);
170 extern	void	ill_lock_ills(ill_t **, int);
171 extern	void	ill_refhold(ill_t *);
172 extern	void	ill_refhold_locked(ill_t *);
173 extern	int	ill_check_and_refhold(ill_t *);
174 extern	void	ill_refrele(ill_t *);
175 extern	boolean_t ill_waiter_inc(ill_t *);
176 extern	void	ill_waiter_dcr(ill_t *);
177 extern	void	ill_trace_ref(ill_t *);
178 extern	void	ill_untrace_ref(ill_t *);
179 extern	boolean_t ill_down_start(queue_t *, mblk_t *);
180 extern	ill_t	*ill_lookup_group_v6(const in6_addr_t *, zoneid_t);
181 extern	void	ill_capability_ack(ill_t *, mblk_t *);
182 extern	void	ill_capability_probe(ill_t *);
183 extern	void	ill_capability_reset(ill_t *);
184 extern	void	ill_mtu_change(ire_t *, char *);
185 extern void	ill_group_cleanup(ill_t *);
186 extern int	ill_up_ipifs(ill_t *, queue_t *, mblk_t *);
187 extern	boolean_t ill_is_probeonly(ill_t *);
188 
189 extern	char	*ipif_get_name(ipif_t *, char *, int);
190 extern	void	ipif_init(void);
191 extern	ipif_t	*ipif_lookup_addr(ipaddr_t, ill_t *, zoneid_t, queue_t *,
192     mblk_t *, ipsq_func_t, int *);
193 extern	ipif_t	*ipif_lookup_addr_v6(const in6_addr_t *, ill_t *, zoneid_t,
194     queue_t *, mblk_t *, ipsq_func_t, int *);
195 extern	ipif_t	*ipif_lookup_group(ipaddr_t, zoneid_t);
196 extern	ipif_t	*ipif_lookup_group_v6(const in6_addr_t *, zoneid_t);
197 extern  ipif_t	*ipif_lookup_interface(ipaddr_t, ipaddr_t,
198     queue_t *, mblk_t *, ipsq_func_t, int *);
199 extern	ipif_t	*ipif_lookup_remote(ill_t *, ipaddr_t, zoneid_t);
200 extern	ipif_t	*ipif_lookup_onlink_addr(ipaddr_t, zoneid_t);
201 extern	ipif_t	*ipif_lookup_seqid(ill_t *, uint_t);
202 extern	boolean_t	ipif_lookup_zoneid(ill_t *, zoneid_t, int,
203     ipif_t **);
204 extern	boolean_t	ipif_lookup_zoneid_group(ill_t *, zoneid_t, int,
205     ipif_t **);
206 extern	ipif_t	*ipif_select_source(ill_t *, ipaddr_t, zoneid_t);
207 extern	boolean_t	ipif_usesrc_avail(ill_t *, zoneid_t);
208 extern	void	ipif_refhold(ipif_t *);
209 extern	void	ipif_refhold_locked(ipif_t *);
210 extern	void		ipif_refrele(ipif_t *);
211 extern	boolean_t	ipif_ire_active(ipif_t *);
212 extern	void	ipif_all_down_tail(ipsq_t *, queue_t *, mblk_t *, void *);
213 extern	int	ipif_resolver_up(ipif_t *, boolean_t);
214 extern	int	ipif_arp_setup_multicast(ipif_t *, mblk_t **);
215 extern	int	ipif_down(ipif_t *, queue_t *, mblk_t *);
216 extern	void	ipif_multicast_up(ipif_t *);
217 extern	void	ipif_ndp_down(ipif_t *);
218 extern	int	ipif_ndp_up(ipif_t *, const in6_addr_t *, boolean_t);
219 extern	int	ipif_ndp_setup_multicast(ipif_t *, struct nce_s **);
220 extern	int	ipif_up_done(ipif_t *);
221 extern	int	ipif_up_done_v6(ipif_t *);
222 extern	void	ipif_update_other_ipifs_v6(ipif_t *, ill_group_t *);
223 extern	void	ipif_recreate_interface_routes_v6(ipif_t *, ipif_t *);
224 extern	void	ill_update_source_selection(ill_t *);
225 extern	ipif_t	*ipif_select_source_v6(ill_t *, const in6_addr_t *, boolean_t,
226     uint32_t, zoneid_t);
227 extern	boolean_t	ipif_cant_setlinklocal(ipif_t *);
228 extern	int	ipif_setlinklocal(ipif_t *);
229 extern	void	ipif_set_tun_llink(ill_t *, struct iftun_req *);
230 extern	ipif_t	*ipif_lookup_on_ifindex(uint_t, boolean_t, zoneid_t, queue_t *,
231     mblk_t *, ipsq_func_t, int *);
232 extern	ipif_t	*ipif_get_next_ipif(ipif_t *curr, ill_t *ill);
233 extern	void	ipif_ill_refrele_tail(ill_t *ill);
234 extern	void	ipif_arp_down(ipif_t *ipif);
235 
236 extern	int	illgrp_insert(ill_group_t **, ill_t *, char *, ill_group_t *,
237     boolean_t);
238 
239 extern	void	ipsq_enq(ipsq_t *, queue_t *, mblk_t *, ipsq_func_t, int,
240     ill_t *);
241 extern	boolean_t ipsq_enter(ill_t *, boolean_t);
242 extern	ipsq_t	*ipsq_try_enter(ipif_t *, ill_t *, queue_t *, mblk_t *,
243     ipsq_func_t, int, boolean_t);
244 extern	void	ipsq_exit(ipsq_t *, boolean_t, boolean_t);
245 extern mblk_t	*ipsq_pending_mp_get(ipsq_t *, conn_t **);
246 extern boolean_t ipsq_pending_mp_add(conn_t *, ipif_t *, queue_t *,
247     mblk_t *, int);
248 extern	void qwriter_ip(ipif_t *, ill_t *, queue_t *, mblk_t *, ipsq_func_t,
249     int, boolean_t);
250 
251 extern	int	ip_extract_lifreq_cmn(queue_t *, mblk_t *, int, int,
252     cmd_info_t *, ipsq_func_t);
253 extern  int	ip_extract_tunreq(queue_t *, mblk_t *, ipif_t **, ipsq_func_t);
254 extern	int	ip_addr_availability_check(ipif_t *new_ipif);
255 extern	int	ip_ill_report(queue_t *, mblk_t *, caddr_t, cred_t *);
256 extern	int	ip_ipif_report(queue_t *, mblk_t *, caddr_t, cred_t *);
257 extern	void	ip_ll_subnet_defaults(ill_t *, mblk_t *);
258 extern	int	ip_rt_add(ipaddr_t, ipaddr_t, ipaddr_t, ipaddr_t, int,
259     ipif_t *, ipif_t *, ire_t **, boolean_t, queue_t *, mblk_t *, ipsq_func_t);
260 extern	int	ip_mrtun_rt_add(ipaddr_t, int, ipif_t *, ipif_t *, ire_t **,
261     queue_t *, mblk_t *, ipsq_func_t);
262 extern	int	ip_rt_add_v6(const in6_addr_t *, const in6_addr_t *,
263     const in6_addr_t *, const in6_addr_t *, int, ipif_t *, ire_t **,
264     queue_t *, mblk_t *, ipsq_func_t);
265 extern	int	ip_rt_delete(ipaddr_t, ipaddr_t, ipaddr_t, uint_t, int,
266     ipif_t *, ipif_t *, boolean_t, queue_t *, mblk_t *, ipsq_func_t);
267 extern	int	ip_mrtun_rt_delete(ipaddr_t, ipif_t *);
268 
269 extern	int	ip_rt_delete_v6(const in6_addr_t *, const in6_addr_t *,
270     const in6_addr_t *, uint_t, int, ipif_t *, queue_t *, mblk_t *,
271     ipsq_func_t);
272 extern int ip_siocdelndp_v6(ipif_t *, sin_t *, queue_t *, mblk_t *,
273     ip_ioctl_cmd_t *, void *);
274 extern int ip_siocqueryndp_v6(ipif_t *, sin_t *, queue_t *, mblk_t *,
275     ip_ioctl_cmd_t *, void *);
276 extern int ip_siocsetndp_v6(ipif_t *, sin_t *, queue_t *, mblk_t *,
277     ip_ioctl_cmd_t *, void *);
278 
279 extern int ip_siocaddrt(ipif_t *, sin_t *, queue_t *, mblk_t *,
280     ip_ioctl_cmd_t *, void *);
281 extern int ip_siocdelrt(ipif_t *, sin_t *, queue_t *, mblk_t *,
282     ip_ioctl_cmd_t *, void *);
283 
284 extern int ip_sioctl_addr(ipif_t *, sin_t *, queue_t *, mblk_t *,
285     ip_ioctl_cmd_t *, void *);
286 extern int ip_sioctl_addr_restart(ipif_t *, sin_t *, queue_t *, mblk_t *,
287     ip_ioctl_cmd_t *, void *);
288 extern int ip_sioctl_get_addr(ipif_t *, sin_t *, queue_t *, mblk_t *,
289     ip_ioctl_cmd_t *, void *);
290 
291 extern int ip_sioctl_dstaddr(ipif_t *, sin_t *, queue_t *, mblk_t *,
292     ip_ioctl_cmd_t *, void *);
293 extern int ip_sioctl_dstaddr_restart(ipif_t *, sin_t *, queue_t *, mblk_t *,
294     ip_ioctl_cmd_t *, void *);
295 extern int ip_sioctl_get_dstaddr(ipif_t *, sin_t *, queue_t *, mblk_t *,
296     ip_ioctl_cmd_t *, void *);
297 
298 extern int ip_sioctl_flags(ipif_t *, sin_t *, queue_t *, mblk_t *,
299     ip_ioctl_cmd_t *, void *);
300 extern int ip_sioctl_flags_restart(ipif_t *, sin_t *, queue_t *, mblk_t *,
301     ip_ioctl_cmd_t *, void *);
302 extern int ip_sioctl_get_flags(ipif_t *, sin_t *, queue_t *, mblk_t *,
303     ip_ioctl_cmd_t *, void *);
304 
305 extern int ip_sioctl_mtu(ipif_t *, sin_t *, queue_t *, mblk_t *,
306     ip_ioctl_cmd_t *, void *);
307 extern int ip_sioctl_get_mtu(ipif_t *, sin_t *, queue_t *, mblk_t *,
308     ip_ioctl_cmd_t *, void *);
309 
310 extern int ip_sioctl_get_ifconf(ipif_t *, sin_t *, queue_t *, mblk_t *,
311     ip_ioctl_cmd_t *, void *);
312 extern int ip_sioctl_get_lifconf(ipif_t *, sin_t *, queue_t *, mblk_t *,
313     ip_ioctl_cmd_t *, void *);
314 extern int ip_sioctl_get_ifnum(ipif_t *, sin_t *, queue_t *, mblk_t *,
315     ip_ioctl_cmd_t *, void *);
316 extern int ip_sioctl_get_lifnum(ipif_t *, sin_t *, queue_t *, mblk_t *,
317     ip_ioctl_cmd_t *, void *);
318 
319 extern int ip_sioctl_token(ipif_t *, sin_t *, queue_t *, mblk_t *,
320     ip_ioctl_cmd_t *, void *);
321 extern int ip_sioctl_get_token(ipif_t *, sin_t *, queue_t *, mblk_t *,
322     ip_ioctl_cmd_t *, void *);
323 
324 extern int if_unitsel(ipif_t *, sin_t *, queue_t *, mblk_t *,
325     ip_ioctl_cmd_t *, void *);
326 extern int if_unitsel_restart(ipif_t *, sin_t *, queue_t *, mblk_t *,
327     ip_ioctl_cmd_t *, void *);
328 
329 extern int ip_sioctl_sifname(ipif_t *, sin_t *, queue_t *, mblk_t *,
330     ip_ioctl_cmd_t *, void *);
331 
332 extern int ip_sioctl_slifname(ipif_t *, sin_t *, queue_t *, mblk_t *,
333     ip_ioctl_cmd_t *, void *);
334 extern int ip_sioctl_slifname_restart(ipif_t *, sin_t *, queue_t *,
335     mblk_t *, ip_ioctl_cmd_t *, void *);
336 
337 extern int ip_sioctl_slifindex(ipif_t *, sin_t *, queue_t *, mblk_t *,
338     ip_ioctl_cmd_t *, void *);
339 extern int ip_sioctl_get_lifindex(ipif_t *, sin_t *, queue_t *, mblk_t *,
340     ip_ioctl_cmd_t *, void *);
341 
342 extern int ip_sioctl_brdaddr(ipif_t *, sin_t *, queue_t *, mblk_t *,
343     ip_ioctl_cmd_t *, void *);
344 extern int ip_sioctl_get_brdaddr(ipif_t *, sin_t *, queue_t *, mblk_t *,
345     ip_ioctl_cmd_t *, void *);
346 
347 extern int ip_sioctl_get_muxid(ipif_t *, sin_t *, queue_t *, mblk_t *,
348     ip_ioctl_cmd_t *, void *);
349 extern int ip_sioctl_muxid(ipif_t *, sin_t *, queue_t *, mblk_t *,
350     ip_ioctl_cmd_t *, void *);
351 
352 extern int ip_sioctl_netmask(ipif_t *, sin_t *, queue_t *, mblk_t *,
353     ip_ioctl_cmd_t *, void *);
354 extern int ip_sioctl_get_netmask(ipif_t *, sin_t *, queue_t *, mblk_t *,
355     ip_ioctl_cmd_t *, void *);
356 extern int ip_sioctl_netmask_restart(ipif_t *, sin_t *, queue_t *, mblk_t *,
357     ip_ioctl_cmd_t *, void *);
358 
359 extern int ip_sioctl_subnet(ipif_t *, sin_t *, queue_t *, mblk_t *,
360     ip_ioctl_cmd_t *, void *);
361 extern int ip_sioctl_subnet_restart(ipif_t *, sin_t *, queue_t *, mblk_t *,
362     ip_ioctl_cmd_t *, void *);
363 extern int ip_sioctl_get_subnet(ipif_t *, sin_t *, queue_t *, mblk_t *,
364     ip_ioctl_cmd_t *, void *);
365 
366 extern int ip_sioctl_lnkinfo(ipif_t *, sin_t *, queue_t *, mblk_t *,
367     ip_ioctl_cmd_t *, void *);
368 extern int ip_sioctl_get_lnkinfo(ipif_t *, sin_t *, queue_t *, mblk_t *,
369     ip_ioctl_cmd_t *, void *);
370 
371 extern int ip_sioctl_metric(ipif_t *, sin_t *, queue_t *, mblk_t *,
372     ip_ioctl_cmd_t *, void *);
373 extern int ip_sioctl_get_metric(ipif_t *, sin_t *, queue_t *, mblk_t *,
374     ip_ioctl_cmd_t *, void *);
375 
376 extern int ip_sioctl_arp(ipif_t *, sin_t *, queue_t *, mblk_t *,
377     ip_ioctl_cmd_t *, void *);
378 extern int ip_sioctl_xarp(ipif_t *, sin_t *, queue_t *,
379     mblk_t *, ip_ioctl_cmd_t *, void *);
380 
381 extern int ip_sioctl_addif(ipif_t *, sin_t *, queue_t *, mblk_t *,
382     ip_ioctl_cmd_t *, void *);
383 extern int ip_sioctl_removeif(ipif_t *, sin_t *, queue_t *, mblk_t *,
384     ip_ioctl_cmd_t *, void *);
385 extern int ip_sioctl_removeif_restart(ipif_t *, sin_t *, queue_t *, mblk_t *,
386     ip_ioctl_cmd_t *, void *);
387 
388 extern int ip_sioctl_tonlink(ipif_t *, sin_t *, queue_t *, mblk_t *,
389     ip_ioctl_cmd_t *, void *);
390 extern int ip_sioctl_tmysite(ipif_t *, sin_t *, queue_t *, mblk_t *,
391     ip_ioctl_cmd_t *, void *);
392 extern int ip_sioctl_tmyaddr(ipif_t *, sin_t *, queue_t *, mblk_t *,
393     ip_ioctl_cmd_t *, void *);
394 
395 extern int ip_sioctl_tunparam(ipif_t *, sin_t *, queue_t *, mblk_t *,
396     ip_ioctl_cmd_t *, void *);
397 
398 extern int ip_sioctl_groupname(ipif_t *, sin_t *, queue_t *,
399     mblk_t *, ip_ioctl_cmd_t *, void *);
400 extern int ip_sioctl_get_groupname(ipif_t *, sin_t *, queue_t *,
401     mblk_t *, ip_ioctl_cmd_t *, void *);
402 extern int ip_sioctl_slifoindex(ipif_t *, sin_t *, queue_t *,
403     mblk_t *, ip_ioctl_cmd_t *, void *);
404 extern int ip_sioctl_get_oindex(ipif_t *, sin_t *, queue_t *,
405     mblk_t *, ip_ioctl_cmd_t *, void *);
406 
407 extern int ip_sioctl_get_lifzone(ipif_t *, sin_t *, queue_t *,
408     mblk_t *, ip_ioctl_cmd_t *, void *);
409 extern int ip_sioctl_slifzone(ipif_t *, sin_t *, queue_t *,
410     mblk_t *, ip_ioctl_cmd_t *, void *);
411 extern int ip_sioctl_slifzone_restart(ipif_t *, sin_t *, queue_t *,
412     mblk_t *, ip_ioctl_cmd_t *, void *);
413 
414 extern int ip_sioctl_get_lifusesrc(ipif_t *, sin_t *, queue_t *,
415     mblk_t *, ip_ioctl_cmd_t *, void *);
416 extern int ip_sioctl_slifusesrc(ipif_t *, sin_t *, queue_t *,
417     mblk_t *, ip_ioctl_cmd_t *, void *);
418 extern int ip_sioctl_get_lifsrcof(ipif_t *, sin_t *, queue_t *,
419     mblk_t *, ip_ioctl_cmd_t *, void *);
420 extern int ip_sioctl_set_ipmpfailback(ipif_t *, sin_t *, queue_t *,
421     mblk_t *, ip_ioctl_cmd_t *, void *);
422 
423 extern	void	ip_sioctl_copyin_resume(ipsq_t *, queue_t *, mblk_t *, void *);
424 extern	void	ip_sioctl_copyin_setup(queue_t *, mblk_t *);
425 extern	void	ip_sioctl_iocack(queue_t *, mblk_t *);
426 extern	ip_ioctl_cmd_t *ip_sioctl_lookup(int);
427 extern int ip_sioctl_move(ipif_t *, sin_t *, queue_t *, mblk_t *,
428     ip_ioctl_cmd_t *, void *);
429 
430 extern	void	conn_delete_ire(conn_t *, caddr_t);
431 
432 #endif /* _KERNEL */
433 
434 #ifdef	__cplusplus
435 }
436 #endif
437 
438 #endif	/* _INET_IP_IF_H */
439