ndmp9_error ndmis_audit_tape_connect (struct ndm_session *sess, ndmp9_addr_type addr_type, char *reason) { struct ndm_image_stream *is; struct ndmis_end_point *mine_ep; struct ndmis_end_point *peer_ep; /* * We are about to start using an Image Stream so allocate it. * Only do this when not allocated yet. */ if (!sess->plumb.image_stream) { if (ndmis_initialize (sess)) { return NDMP9_NO_MEM_ERR; } } is = sess->plumb.image_stream; mine_ep = &is->tape_ep; peer_ep = &is->data_ep; return ndmis_audit_ep_listen (sess, addr_type, reason, mine_ep, peer_ep); }
int ndma_session_initialize (struct ndm_session *sess) { ndmis_initialize (sess); #ifndef NDMOS_OPTION_NO_CONTROL_AGENT /* ndmca_initialize (sess); */ #endif /* !NDMOS_OPTION_NO_CONTROL_AGENT */ #ifndef NDMOS_OPTION_NO_DATA_AGENT ndmda_initialize (sess); #endif /* !NDMOS_OPTION_NO_DATA_AGENT */ #ifndef NDMOS_OPTION_NO_TAPE_AGENT ndmta_initialize (sess); #endif /* !NDMOS_OPTION_NO_TAPE_AGENT */ #ifndef NDMOS_OPTION_NO_ROBOT_AGENT ndmra_initialize (sess); #endif /* !NDMOS_OPTION_NO_ROBOT_AGENT */ return 0; }