Lines Matching defs:connection

64 static struct conn_list *ndmp_connect_list_find(ndmp_connection_t *connection);
69 /* routines for connection info */
74 static void ndmp_connect_get_v2(ndmp_connection_t *connection,
84 static void ndmp_connect_get_v3(ndmp_connection_t *connection,
130 * This handler sets the protocol version to be used on the connection.
133 * connection (input) - connection handle.
141 ndmpd_connect_open_v2(ndmp_connection_t *connection, void *body)
149 if (!(session = (ndmpd_session_t *)ndmp_get_client_data(connection)))
158 ndmp_send_reply(connection, (void *) &reply,
170 ndmp_set_version(connection, request->protocol_version);
179 * This handler authorizes the NDMP connection.
182 * connection (input) - connection handle.
189 ndmpd_connect_client_auth_v2(ndmp_connection_t *connection, void *body)
219 ndmpd_audit_connect(connection, EINVAL);
229 ndmp_set_authorized(connection, FALSE);
230 ndmp_send_reply(connection, (void *) &reply,
232 ndmpd_audit_connect(connection,
241 ndmpd_audit_connect(connection,
251 ndmp_set_authorized(connection, FALSE);
252 ndmp_send_reply(connection, (void *) &reply,
254 ndmpd_audit_connect(connection,
268 ndmpd_audit_connect(connection, reply.error ?
281 ndmp_set_authorized(connection, FALSE);
282 ndmp_send_reply(connection, (void *) &reply,
284 ndmpd_audit_connect(connection,
294 ndmp_set_authorized(connection, FALSE);
295 ndmp_send_reply(connection, (void *) &reply,
297 ndmpd_audit_connect(connection,
303 session = ndmp_get_client_data(connection);
319 ndmpd_audit_connect(connection, reply.error ?
330 ndmp_set_authorized(connection, TRUE);
332 ndmp_set_authorized(connection, FALSE);
334 ndmp_send_reply(connection, (void *) &reply,
345 * connection (input) - connection handle.
352 ndmpd_connect_server_auth_v2(ndmp_connection_t *connection, void *body)
385 ndmp_send_reply(connection, (void *) &reply,
393 * This handler closes the connection.
396 * connection (input) - connection handle.
404 ndmpd_connect_close_v2(ndmp_connection_t *connection, void *body)
408 if ((session = (ndmpd_session_t *)ndmp_get_client_data(connection))) {
409 (void) ndmp_close(connection);
423 * This handler authorizes the NDMP connection.
426 * connection (input) - connection handle.
433 ndmpd_connect_client_auth_v3(ndmp_connection_t *connection, void *body)
456 ndmpd_audit_connect(connection, ENOTSUP);
466 ndmp_set_authorized(connection, FALSE);
467 ndmp_send_reply(connection, (void *) &reply,
469 ndmpd_audit_connect(connection,
477 ndmpd_audit_connect(connection, reply.error ?
488 ndmp_set_authorized(connection, FALSE);
489 ndmp_send_reply(connection, (void *) &reply,
491 ndmpd_audit_connect(connection,
496 session = ndmp_get_client_data(connection);
500 ndmpd_audit_connect(connection, reply.error ?
507 ndmpd_audit_connect(connection, EINVAL);
511 ndmp_set_authorized(connection, TRUE);
513 ndmp_set_authorized(connection, FALSE);
514 if (tcp_get_peer(connection->conn_sock, &addr.s_addr,
522 ndmp_send_reply(connection, (void *) &reply,
530 * Close the connection to the DMA.
531 * Send the SHUTDOWN message before closing the socket connection to the DMA.
534 * connection (input) - connection handle.
542 ndmpd_connect_close_v3(ndmp_connection_t *connection, void *body)
547 if (!(session = (ndmpd_session_t *)ndmp_get_client_data(connection)))
553 /* Send the SHUTDOWN message before closing the connection. */
558 if (ndmp_send_request(connection, NDMP_NOTIFY_CONNECTION_STATUS,
560 NDMP_LOG(LOG_NOTICE, "Sending connection shutdown notify");
564 ndmp_close(connection);
631 * Find the element in the active connection list.
634 * connection (input) - connection handler.
638 * connection list element pointer
641 ndmp_connect_list_find(ndmp_connection_t *connection)
645 NDMP_LOG(LOG_DEBUG, "connection: 0x%p",
646 connection);
649 if (clp->cl_conn == connection) {
660 * Add the new connection to the list of the active connections.
663 * connection (input) - connection handler.
664 * id (input/output) - pointer to connection id.
671 ndmp_connect_list_add(ndmp_connection_t *connection, int *id)
675 if (connection == NULL) {
683 clp->cl_conn = connection;
697 * Delete the specified connection from the list.
700 * connection (input) - connection handler.
707 ndmp_connect_list_del(ndmp_connection_t *connection)
712 if (!(clp = ndmp_connect_list_find(connection))) {
714 NDMP_LOG(LOG_DEBUG, "connection not found");
732 * id (input) - connection id.
736 * connection list element pointer
758 * Get common fields of the active connection.
784 * Get the connection SCSI info.
799 * Get the connection tape info.
821 * Get the connection mover info.
839 * Get the connection common data info.
875 * Get the connection data info.
912 * Get V2 connection info.
915 ndmp_connect_get_v2(ndmp_connection_t *connection, ndmp_door_ctx_t *enc_ctx)
919 if ((session = (ndmpd_session_t *)ndmp_get_client_data(connection))) {
928 * Get the V3 connection mover info.
950 * Get the connection data info.
979 * Get V3 connection info.
982 ndmp_connect_get_v3(ndmp_connection_t *connection, ndmp_door_ctx_t *enc_ctx)
986 if ((session = (ndmpd_session_t *)ndmp_get_client_data(connection))) {
1030 * Kill the connection based on its version.
1033 * connection (input) - connection handler.
1040 ndmpd_connect_kill(ndmp_connection_t *connection)
1044 if (!(session = (ndmpd_session_t *)ndmp_get_client_data(connection)))
1051 ndmpd_connect_close_v2(connection, (void *)NULL);
1057 ndmpd_connect_close_v3(connection, (void *)NULL);
1095 * Find a connection by its id and kill it.
1098 * id (input) - connection id.