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);
586 * Terminate the session as gracefully as possible.
589 * session Session to terminate
622 * don't do anything if session isn't established yet, termination will be
639 * requested that we kill a multipathed session.
657 /* Remove session from global list */
691 * session IN: The owning session
1082 * Handle the login ioctl - Create a session:
1083 * Alloc the session structure
1084 * Copy session parameters
1109 /* alloc the session */
1112 DEBOUT(("No mem for session\n"));
1120 cv_init(&sess->s_sess_cv, "session");
1154 DEB(1, ("Login: map session %d\n", sess->s_id));
1156 DEB(1, ("Login: map session %d failed\n", sess->s_id));
1168 * Handle the logout ioctl - Kill a session.
1177 session_t *session;
1179 DEB(5, ("ISCSI: logout session %d\n", par->session_id));
1182 if ((session = find_session(par->session_id)) == NULL) {
1189 /* If the session exists, this always succeeds */
1210 session_t *session;
1212 DEB(5, ("ISCSI: add_connection to session %d\n", par->session_id));
1215 if ((session = find_session(par->session_id)) == NULL) {
1227 return create_connection(par, session, l);
1243 session_t *session;
1245 DEB(5, ("ISCSI: remove_connection %d from session %d\n",
1249 if ((session = find_session(par->session_id)) == NULL) {
1256 if ((conn = find_connection(session, par->connection_id)) == NULL) {
1258 DEBOUT(("Connection %d not found in session %d\n",
1286 DEB(1, ("ISCSI: restore_connection %d of session %d\n",
1298 DEBOUT(("Connection %d not found in session %d\n",
1332 session_t *session;
1338 if ((session = find_session(par->session_id)) == NULL) {
1373 par->status = send_io_command(session, par->lun, &par->req,
1408 * the response is kept in the session structure so it can be
1527 DEB(9, ("ISCSI: connection_status, session %d connection %d --> %d\n",
1609 * remove a connection from session and add to the cleanup list
1712 * Global thread to handle connection and session cleanup after termination.
1772 DEB(1, ("Cleanup: session %d\n", sess->s_id));
1793 DEB(1, ("Cleanup: Unmap session %d\n", sess->s_id));
1795 DEB(1, ("Cleanup: Unmap session %d failed\n", sess->s_id));
1804 /* notify event handlers of session shutdown */
1806 DEB(1, ("Cleanup: session ended %d\n", sess->s_id));