2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved. 2N/A * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A * PURPOSE: Connection management 2N/A * Description: Interfaces in this file are completely described in 2N/A * the DAPL 1.1 API, Chapter 6, section 4 2N/A * DAPL Requirements Version xxx, 6.4.2.1 2N/A * Establish a connection between active remote side requesting Endpoint 2N/A * and passic side local Endpoint. 2N/A * DAT_INVALID_PARAMETER 2N/A * DAT_INVALID_ATTRIBUTE 2N/A "dapl_cr_accept(%p, %p, %d, %p)\n",
2N/A * Return an error if we have an ep_handle and the CR already has an 2N/A * EP, indicating this is an RSP connection or PSP_PROVIDER_FLAG was 2N/A * Verify the private data size doesn't exceed the max 2N/A * ep_handle is NULL if the user specified DAT_PSP_PROVIDER_FLAG 2N/A * OR this is an RSP connection; retrieve it from the cr. 2N/A /* ensure this EP isn't connected or in use */ 2N/A * Verify the attributes of the EP handle before we connect it. Test 2N/A * all of the handles to make sure they are currently valid. 2N/A * pz_handle required 2N/A * recv_evd_handle optional, but must be valid 2N/A * request_evd_handle optional, but must be valid 2N/A * connect_evd_handle required 2N/A * We do all verification and state change under lock, at which 2N/A * point the EP state should protect us from most races. 2N/A * If we are lazy attaching the QP then we may need to 2N/A * hook it up here. Typically, we run this code only for 2N/A * DAT_PSP_PROVIDER_FLAG 2N/A /* This is not a great error code, but spec allows */ 2N/A * If the provider failed, unwind the damage so we are back at 2N/A * the initial state. 2N/A * Make this CR invalid. We need to hang on to it until 2N/A * the connection terminates, but it's destroyed from 2N/A * the app point of view.