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: Endpoint management 2N/A * Description: Interfaces in this file are completely described in 2N/A * the DAPL 1.1 API, Chapter 6, section 5.4 2N/A * DAPL Requirements Version xxx, 6.5.3 2N/A * Destroy an instance of the Endpoint 2N/A * DAT_INVALID_PARAMETER 2N/A * Verify parameter & state 2N/A "--> dapl_ep_free: invalid state: %x, ep %p\n",
2N/A * If we are connected, issue a disconnect. If we are in the 2N/A * disconnect_pending state, disconnect with the ABRUPT flag 2N/A * Do verification of parameters and the state change atomically. 2N/A * Issue the disconnect and return. The DISCONNECT callback 2N/A * will invoke this routine and finish the job 2N/A "--> dapl_ep_free: disconnecting EP: %x, ep %p\n",
2N/A * Release all reference counts and unlink this structure. If we 2N/A * got here from a callback, don't repeat this step 2N/A /* Remove link from the IA */ 2N/A * If the EP is disconnected tear everything down. Otherwise, 2N/A * disconnect the EP but leave the QP and basic EP structure 2N/A * intact; the callback code will finish the job. 2N/A * Update ref counts. Note the user may have used ep_modify 2N/A * to set handles to NULL. 2N/A "--> dapl_ep_free: Free EP: %x, ep %p\n",
2N/A * Free the QP. If the EP has never been used, 2N/A * This should always succeed, but report to the user if 2N/A * there is a problem 2N/A /* Free the resource */