#ifndef _SRPT_STP_H
#define _SRPT_STP_H
#ifdef __cplusplus
extern "C" {
#endif
int srpt_stp_start_srp(srpt_target_port_t *tgt);
void srpt_stp_stop_srp(srpt_target_port_t *tgt);
srpt_target_port_t *srpt_stp_alloc_port(srpt_ioc_t *ioc, ib_guid_t guid);
stmf_status_t srpt_stp_free_port(srpt_target_port_t *tgt);
stmf_status_t srpt_stp_destroy_port(srpt_target_port_t *tgt);
srpt_session_t *srpt_stp_alloc_session(srpt_target_port_t *tgt,
uint8_t *i_id, uint8_t *t_id, uint8_t port,
char *local_gid, char *remote_gid);
void srpt_stp_free_session(srpt_session_t *session);
srpt_channel_t *srpt_stp_login(srpt_target_port_t *tgt,
srp_login_req_t *login, srp_login_rsp_t *login_rsp,
srp_login_rej_t *login_rej, uint8_t login_port,
char *local_gid, char *remote_gid);
void srpt_stp_logout(srpt_channel_t *ch);
stmf_status_t srpt_stp_send_status(struct scsi_task *task,
uint32_t ioflags);
ibt_status_t srpt_stp_send_response(srpt_iu_t *iu, uint8_t scsi_status,
uint8_t flags, uint32_t resid, uint16_t sense_length,
uint8_t *sense_data, uint_t fence);
ibt_status_t srpt_stp_send_mgmt_response(srpt_iu_t *iu, uint8_t srp_rsp,
uint_t fence);
void srpt_stp_add_task(srpt_session_t *session, srpt_iu_t *iu);
void srpt_stp_remove_task(srpt_session_t *session, srpt_iu_t *iu);
uint64_t srpt_stp_u8array2u64(uint8_t *array);
#ifdef __cplusplus
}
#endif
#endif