ip_arp.h revision a69116193464f859a8b27a2db19ad330ce163a55
/*
* 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
*/
/*
*/
#ifndef _IP_ARP_H
#define _IP_ARP_H
/*
* Data-structures and functions related to the IP STREAMS queue that handles
* packets with the SAP set to 0x806 (ETHERTYPE_ARP).
*/
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _KERNEL
extern struct streamtab dummymodinfo;
struct arl_ill_common_s;
/*
* The arl_s structure tracks the state of the associated ARP stream.
*/
typedef struct arl_s {
struct arl_ill_common_s *arl_common;
int arl_muxid;
char *arl_name;
int arl_name_length;
#define arl_last_mp_to_free arl_detach_mp
int arl_error;
} arl_t;
/*
* The arl_ill_common_t structure is a super-structure that contains pointers
* to a pair of matching ill_t, arl_t structures. Given an arl_t (or
* ill_t) the corresponding ill_t (or arl_t) must be obtained by
* pointer is non-null, not condemned. The arl_ill_common_t is allocated in
* arl_init() and freed only when both the ill_t and the arl_t structures
* become NULL.
* Lock hierarchy: the ai_lock must be take before the ill_lock or arl_lock.
*/
typedef struct arl_ill_common_s {
extern boolean_t arp_no_defense;
extern struct module_info arp_mod_info;
extern int arp_ll_down(ill_t *);
extern int arl_wait_for_info_ack(arl_t *);
extern void arl_set_muxid(ill_t *, int);
extern int arl_get_muxid(ill_t *);
extern void arp_send_replumb_conf(ill_t *);
extern void arp_unbind_complete(ill_t *);
#endif
/* The following are arl_state_flags */
#define ARL_LL_DOWN 0x0080
#ifdef __cplusplus
}
#endif
#endif /* _IP_ARP_H */