usr/src/uts/common/sys/idm/idm_conn_sm.h
changeset 9162 b011b0287065
parent 7978 4559e57ec313
child 9373 7ec271bd0968
equal deleted inserted replaced
9161:7dca69f75d8e 9162:b011b0287065
    18  *
    18  *
    19  * CDDL HEADER END
    19  * CDDL HEADER END
    20  */
    20  */
    21 
    21 
    22 /*
    22 /*
    23  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
    23  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
    24  * Use is subject to license terms.
    24  * Use is subject to license terms.
    25  */
    25  */
    26 #ifndef	_IDM_CONN_SM_H_
    26 #ifndef	_IDM_CONN_SM_H_
    27 #define	_IDM_CONN_SM_H_
    27 #define	_IDM_CONN_SM_H_
    28 
    28 
   222 } idm_pdu_event_type_t;
   222 } idm_pdu_event_type_t;
   223 
   223 
   224 typedef enum {
   224 typedef enum {
   225 	CA_TX_PROTOCOL_ERROR,	/* Send "protocol error" to state machine */
   225 	CA_TX_PROTOCOL_ERROR,	/* Send "protocol error" to state machine */
   226 	CA_RX_PROTOCOL_ERROR,	/* Send "protocol error" to state machine */
   226 	CA_RX_PROTOCOL_ERROR,	/* Send "protocol error" to state machine */
   227 	CA_FORWARD,		/* State machine event and foward to client */
   227 	CA_FORWARD,		/* State machine event and forward to client */
   228 	CA_DROP			/* Drop PDU */
   228 	CA_DROP			/* Drop PDU */
   229 } idm_pdu_event_action_t;
   229 } idm_pdu_event_action_t;
   230 
   230 
   231 typedef struct {
   231 typedef struct {
   232 	struct idm_conn_s	*iec_ic;
   232 	struct idm_conn_s	*iec_ic;
   233 	idm_conn_event_t	iec_event;
   233 	idm_conn_event_t	iec_event;
   234 	uintptr_t		iec_info;
   234 	uintptr_t		iec_info;
   235 	idm_pdu_event_type_t	iec_pdu_event_type;
   235 	idm_pdu_event_type_t	iec_pdu_event_type;
       
   236 	boolean_t		iec_pdu_forwarded;
   236 } idm_conn_event_ctx_t;
   237 } idm_conn_event_ctx_t;
   237 
   238 
   238 idm_status_t
   239 idm_status_t
   239 idm_conn_sm_init(struct idm_conn_s *ic);
   240 idm_conn_sm_init(struct idm_conn_s *ic);
   240 
   241 
   246     uintptr_t data);
   247     uintptr_t data);
   247 
   248 
   248 void
   249 void
   249 idm_conn_event(struct idm_conn_s *ic, idm_conn_event_t event, uintptr_t data);
   250 idm_conn_event(struct idm_conn_s *ic, idm_conn_event_t event, uintptr_t data);
   250 
   251 
       
   252 void
       
   253 idm_conn_event(struct idm_conn_s *ic, idm_conn_event_t event, uintptr_t data);
       
   254 
       
   255 void
       
   256 idm_conn_event_locked(struct idm_conn_s *ic, idm_conn_event_t event,
       
   257     uintptr_t event_info, idm_pdu_event_type_t pdu_event_type);
       
   258 
   251 idm_status_t
   259 idm_status_t
   252 idm_conn_reinstate_event(struct idm_conn_s *old_ic, struct idm_conn_s *new_ic);
   260 idm_conn_reinstate_event(struct idm_conn_s *old_ic, struct idm_conn_s *new_ic);
   253 
   261 
   254 void
   262 void
   255 idm_conn_tx_pdu_event(struct idm_conn_s *ic, idm_conn_event_t event,
   263 idm_conn_tx_pdu_event(struct idm_conn_s *ic, idm_conn_event_t event,