arp_impl.h revision e11c3f44f531fdff80941ce57c065d2ae861cefc
/*
* 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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _ARP_IMPL_H
#define _ARP_IMPL_H
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _KERNEL
#include <sys/netstack.h>
/* ARP kernel hash size; used for mdb support */
#define ARP_HASH_SIZE 256
/* Named Dispatch Parameter Management Structure */
typedef struct arpparam_s {
char *arp_param_name;
} arpparam_t;
/* ARL Structure, one per link level device */
typedef struct arl_s {
} arl_t;
/*
* There is no field to get from an arl_t to an arp_stack_t, but this
* macro does it.
*/
/* ARL physical info structure, one per physical link level device */
typedef struct arlphy_s {
} arlphy_t;
/* ARP Cache Entry */
typedef struct ace_s {
int ace_xmit_count;
} ace_t;
#define ARPHOOK_INTERESTED_PHYSICAL_IN(as) \
#define ARPHOOK_INTERESTED_PHYSICAL_OUT(as) \
\
if ((_hook).he_interested) { \
\
} \
} else { \
} \
}
\
if ((_hook).he_interested) { \
\
} \
} else { \
} \
}
#define ACE_EXTERNAL_FLAGS_MASK \
/*
* ARP stack instances
*/
struct arp_stack {
void *as_head; /* AR Instance Data List Head */
/* ARP Cache Entry Hash Table */
/*
* With the introduction of netinfo (neti kernel module),
* it is now possible to access data structures in the ARP module
* without the code being executed in the context of the IP module,
* thus there is no locking being enforced through the use of STREAMS.
* as_arl_lock is used to protect as_arl_head list.
*/
/* arp_neti.c */
/*
* Hooks for ARP
*/
};
typedef struct arp_stack arp_stack_t;
#define ARL_F_NOARP 0x01
#define ARL_F_IPMP 0x02
#define ARL_S_DOWN 0x00
#define ARL_S_PENDING 0x01
#define ARL_S_UP 0x02
/* AR Structure, one per upper stream */
typedef struct ar_s {
} ar_t;
extern void arp_hook_init(arp_stack_t *);
extern void arp_hook_destroy(arp_stack_t *);
extern void arp_net_shutdown(arp_stack_t *);
extern void arp_net_destroy(arp_stack_t *);
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _ARP_IMPL_H */