ip_if.h revision 309fa1740d090ebe5cd183c34c7bc282f94856fa
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1990 Mentat Inc. */
#ifndef _INET_IP_IF_H
#define _INET_IP_IF_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#define PREFIX_INFINITY 0xffffffffUL
#define IP_MAX_HW_LEN 40
/* DLPI SAPs are in host byte order for all systems */
#define IP_DL_SAP 0x0800
#define IP6_DL_SAP 0x86dd
#ifdef _KERNEL
/*
* Interface flags actually represent the state/properties of 3 different
* abstractions of interfaces in IP. Interface flags are set using
* SIOCS[L]IFFLAGS ioctl. The three abstractions are :
*
* 1) Physical interface (phyint) : There is one phyint allocated common
* to both IPv4 and IPv6 physical interface instance.
*
* 2) Physical interface instance (ill) : This encompasses all the state
* that is common across all IP addresses assigned to a physical
* interface but different between the IPv4 and IPv6 instance.
*
* 3) Logical interface (ipif) : This has state about a single IP address.
*
* Values for the various states are derived from the same name space
* as applications querying the state using SIOCGIFFLAGS/SIOCGLIFFLAGS
* see only one state returned in lifr_flags which is a union of all
* the above states/properties. Thus deriving the values from the common
* name space makes implementation easier. All these values are stored in
* uint64_ts.
*
* As we maintain the interface flags in 3 different flags namely
* phyint_flags, ill_flags, ipif_flags we define the following flag values
* to be used within the kernel to reduce potential errors. The ones
* starting with PHYI_ are supposed to be used with phyint_flags, the ones
* starting with ILLF_ are supposed to be used with ill_flags and the ones
* starting with IPIF_ are supposed to be used with ipif_flags. If you see
* any code with a mismatch i.e phyint_flags & IPIF_UP - it is wrong. Only
* PHYI_XXX can be used with phyint_flags.
*
* NOTE : For EVERY FLAG in if.h, there should be a corresponding value
* defined HERE and this is the one that should be USED within IP. We
* use IFF_ flags within IP only when we examine lifr_flags.
*/
/* Source selection values for ipif_select_source_v6 */
ipsq_func_t, int *);
extern void ill_ipif_cache_delete(ire_t *, char *);
extern void ill_delete(ill_t *);
extern void ill_delete_tail(ill_t *);
extern void ill_fastpath_nack(ill_t *);
extern int ill_nominate_mcast_rcv(ill_group_t *);
extern void ill_lock_ills(ill_t **, int);
extern void ill_unlock_ills(ill_t **, int);
extern void ill_lock_ills(ill_t **, int);
extern void ill_refhold(ill_t *);
extern void ill_refhold_locked(ill_t *);
extern int ill_check_and_refhold(ill_t *);
extern void ill_refrele(ill_t *);
extern void ill_waiter_dcr(ill_t *);
extern void ill_trace_ref(ill_t *);
extern void ill_untrace_ref(ill_t *);
extern void ill_capability_probe(ill_t *);
extern void ill_capability_reset(ill_t *);
extern void ill_mtu_change(ire_t *, char *);
extern void ill_group_cleanup(ill_t *);
extern char *ipif_get_name(const ipif_t *, char *, int);
extern void ipif_init(void);
mblk_t *, ipsq_func_t, int *);
ipif_t **);
ipif_t **);
extern void ipif_refhold(ipif_t *);
extern void ipif_refhold_locked(ipif_t *);
extern void ipif_refrele(ipif_t *);
extern void ipif_multicast_up(ipif_t *);
extern void ipif_ndp_down(ipif_t *);
extern int ipif_up_done(ipif_t *);
extern int ipif_up_done_v6(ipif_t *);
extern void ill_update_source_selection(ill_t *);
extern int ipif_setlinklocal(ipif_t *);
mblk_t *, ipsq_func_t, int *);
ill_t *);
ipsq_func_t, int, boolean_t);
mblk_t *, int);
int, boolean_t);
cmd_info_t *, ipsq_func_t);
struct rtsa_s *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
mblk_t *, ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
mblk_t *, ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
ip_ioctl_cmd_t *, void *);
mblk_t *, ip_ioctl_cmd_t *, void *);
mblk_t *, ip_ioctl_cmd_t *, void *);
mblk_t *, ip_ioctl_cmd_t *, void *);
mblk_t *, ip_ioctl_cmd_t *, void *);
mblk_t *, ip_ioctl_cmd_t *, void *);
mblk_t *, ip_ioctl_cmd_t *, void *);
mblk_t *, ip_ioctl_cmd_t *, void *);
mblk_t *, ip_ioctl_cmd_t *, void *);
mblk_t *, ip_ioctl_cmd_t *, void *);
mblk_t *, ip_ioctl_cmd_t *, void *);
mblk_t *, ip_ioctl_cmd_t *, void *);
extern ip_ioctl_cmd_t *ip_sioctl_lookup(int);
ip_ioctl_cmd_t *, void *);
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _INET_IP_IF_H */