Lines Matching defs:session

44 static uint16_t current_id = 0;	/* Global session ID counter */
249 * sid The ID of the affected session
382 * Find a session by ID.
384 * Parameter: the session ID
386 * Returns: The pointer to the session (or NULL if not found)
408 * Parameter: the session pointer and the connection ID
429 * Reference a session
454 * Unreference a session
456 * Release session reference, trigger cleanup
460 unref_session(session_t *session)
464 KASSERT(session != NULL);
465 KASSERT(session->s_refcount > 0);
466 if (--session->s_refcount == 0)
467 cv_broadcast(&session->s_sess_cv);
602 * Terminate the session as gracefully as possible.
605 * session Session to terminate
638 * don't do anything if session isn't established yet, termination will be
653 * requested that we kill a multipathed session.
674 /* Remove session from global list */
708 * session IN: The owning session
1099 * Handle the login ioctl - Create a session:
1100 * Alloc the session structure
1101 * Copy session parameters
1126 /* alloc the session */
1129 DEBOUT(("No mem for session\n"));
1137 cv_init(&sess->s_sess_cv, "session");
1171 DEB(1, ("Login: map session %d\n", sess->s_id));
1173 DEB(1, ("Login: map session %d failed\n", sess->s_id));
1185 * Handle the logout ioctl - Kill a session.
1194 session_t *session;
1196 DEB(5, ("ISCSI: logout session %d\n", par->session_id));
1199 if ((session = find_session(par->session_id)) == NULL) {
1206 /* If the session exists, this always succeeds */
1227 session_t *session;
1229 DEB(5, ("ISCSI: add_connection to session %d\n", par->session_id));
1232 if ((session = find_session(par->session_id)) == NULL) {
1244 return create_connection(par, session, l);
1260 session_t *session;
1262 DEB(5, ("ISCSI: remove_connection %d from session %d\n",
1266 if ((session = find_session(par->session_id)) == NULL) {
1273 if ((conn = find_connection(session, par->connection_id)) == NULL) {
1275 DEBOUT(("Connection %d not found in session %d\n",
1303 DEB(1, ("ISCSI: restore_connection %d of session %d\n",
1315 DEBOUT(("Connection %d not found in session %d\n",
1349 session_t *session;
1355 if ((session = find_session(par->session_id)) == NULL) {
1390 par->status = send_io_command(session, par->lun, &par->req,
1425 * the response is kept in the session structure so it can be
1544 DEB(9, ("ISCSI: connection_status, session %d connection %d --> %d\n",
1626 * remove a connection from session and add to the cleanup list
1731 * Global thread to handle connection and session cleanup after termination.
1791 DEB(1, ("Cleanup: session %d\n", sess->s_id));
1812 DEB(1, ("Cleanup: Unmap session %d\n", sess->s_id));
1814 DEB(1, ("Cleanup: Unmap session %d failed\n", sess->s_id));
1823 /* notify event handlers of session shutdown */
1825 DEB(1, ("Cleanup: session ended %d\n", sess->s_id));