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