/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_FIBRE_CHANNEL_ULP_FCIP_H
#define _SYS_FIBRE_CHANNEL_ULP_FCIP_H
/*
*/
#ifdef __cplusplus
extern "C" {
#endif
/*
* Definitions for module_info.
*/
sizeof (fcph_network_hdr_t))
/*
* Per-Stream instance state information.
*
* Each instance is dynamically allocated at open() and free'd
* at close(). Each per-Stream instance points to at most one
* per-device structure using the sl_fcip field. All instances
* are threaded together into one list of active instances
* ordered on minor device number.
*/
struct fcipstr {
};
/* per-stream flags */
/*
* Maximum # of multicast addresses per Stream.
*/
/*
* Full DLSAP address length (in struct dladdr format).
*/
typedef struct fcip_port_info {
int fcipp_fca_pkt_size;
#define FCIP_SUCCESS (0)
/*
* Num ports supported for soft_state_init
*/
/*
* Hash lists
*/
& (FCIP_RT_HASH_ELEMS - 1))
& (FCIP_DEST_HASH_ELEMS - 1))
((state) == FCIP_RT_RETIRED) || \
/*
* Taskq related
*/
/*
* Per-Device instance state information.
*
* Each instance is dynamically allocated on first attach.
*/
struct fcip {
/* hash table of remote dest. ports */
/* hash table of WWN to D_ID maps */
/*
* MIB II variables
*/
/* #ipkts pending call back */
};
/* flags */
/* macro for checking any callback */
/* macro for checking if a port is busy */
/*
* FCIP routing table maintains the FC Layer and the ARP layer
* mapping for a destination port.
*/
struct fcip_routing_table {
};
/*
* Define a fcip_pkt structure. We can stuff information about
* the message block and queue for which the packet was built. We can
* then free up the message once the transport layer has confirmed
* that the packet has been successfully transported.
*/
typedef struct fcip_pkt {
} fcip_pkt_t;
/* fcipp_dma_flags */
/* fcipp_flags */
/*
* For each remote port we have a active session with (logged in and
* having active exchanges) setup a Destination Port structure. Maintain
* a Hash list of destination structures in the fcip structure. Before
* starting a new session with the destination port, lookup the hash
* table to see if we are already having active exchanges with a remote
* port and if yes bump the reference count and continue use the same
* destination port. Hash on Port WWNs.
*/
struct fcip_dest {
};
#define FCIP_PORT_OFFLINE 0
/*
* Private DLPI full dlsap address format.
*/
struct fcipdladdr {
};
typedef struct llc_snap_hdr {
/*
* "Export" a few of the error counters via the kstats mechanism.
*/
struct fcipstat {
/*
* required by kstat for MIB II objects(RFC 1213)
*/
/* MIB - ifInOctets */
/* MIB - ifOutOctets */
/* delivered to upper layer */
/* MIB - ifInNUcastPkts */
/* requested to be sent */
/* MIB - ifOutNUcastPkts */
/* delivered to upper layer */
/* MIB - ifInNUcastPkts */
/* requested to be sent */
/* MIB - ifOutNUcastPkts */
/* MIB - ifInDiscards */
/* MIB - ifOutDiscards */
};
(len), DDI_DEV_AUTOINCR))
(len), DDI_DEV_AUTOINCR))
/* Match address code points */
/* Responder flags */
/*
* Structure for FARP ELS request and Response
*/
typedef struct la_els_farp {
/*
* Linked list of farp responses
*/
struct farp_resp_list {
};
/*
* FCPH Optional network Header
*/
typedef struct network_header {
/*
* InArp request structure
*/
typedef struct fcip_inarp {
} fcip_inarp_t;
/*
* InArp Response list
*/
struct inarp_resp_list {
};
/*
* Structure to define args for esballoc frtn function
*/
struct fcip_esballoc_arg {
};
struct fcip_sendup_elem {
};
/*
* Having TNF probe points can be lethal during reconfiguration boot. Enable
* TNF using a compile time define.
*/
#ifdef __lint
#define FCIP_TNF_ENABLED
#else
#endif
#ifdef FCIP_TNF_ENABLED
extern int tnf_mod_load(void);
extern int tnf_mod_unload(struct modlinkage *e);
#else
#define FCIP_TNF_LOAD()
#define FCIP_TNF_UNLOAD(x)
#define FCIP_TNF_PROBE_0(x)
#define FCIP_TNF_PROBE_1(x)
#define FCIP_TNF_PROBE_2(x)
#define FCIP_TNF_PROBE_3(x)
#define FCIP_TNF_PROBE_4(x)
#define FCIP_TNF_PROBE_5(x)
#endif /* FCIP_TNF_ENABLED */
/*
* Macros to help with complex TNF output
*/
#ifdef FCIP_TNF_ENABLED
{ \
{ \
int i = 0; \
while (i < 32 && i < len) { \
((char *)(barray))[i++] & 0xff); \
strp += 2; \
} \
} \
}
#else
#endif /* FCIP_TNF_ENABLED */
/*
* FC4 type setttings for Name Server registration.
*/
#ifdef __cplusplus
}
#endif
#endif /* !_SYS_FIBRE_CHANNEL_ULP_FCIP_H */