dapl_psp_create.c revision 9e39c5ba00a55fa05777cc94b148296af305e135
* The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * See the License for the specific language governing permissions * and limitations under the License. * When distributing Covered Code, include this CDDL HEADER in each * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved. * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * PURPOSE: Connection management * Description: Interfaces in this file are completely described in * the DAPL 1.1 API, Chapter 6, section 4 * uDAPL: User Direct Access Program Library Version 1.1, 6.4.1.1 * Create a persistent Public Service Point that can recieve multiple * requests for connections and generate multiple connection request * instances that wil be delivered to the specified Event Dispatcher * in a notification event. * DAT_INSUFFICIENT_RESOURCES * DAT_MODEL_NOT_SUPPORTED /* check for invalid psp flags */ * check for connection qualifier eq 0 * in IB this is called Null Service ID, use of it in CM is invalid. * in tcp/udp, port number 0 is reserved. * See if we have a quiescent listener to use for this PSP, else * create one and set it listening * Fill out the args for a PSP * Take a reference on the EVD handle * Set up a listener for a connection. Connections can arrive * even before this call returns! * If this is a new sp we need to add it to the IA queue, and set up /* Link it onto the IA */ * Have a problem setting up the connection, something * wrong! The psp_free decrements the EVD refcount for * us; we don't * need to do that. * But we want to set the listener bits to false, * as we know that call failed. "--> dapl_psp_create setup_conn_listener failed: " * Return handle to the user