/*
* CDDL HEADER START
*
* 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.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.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
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* 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]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
*/
/*
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
*
* MODULE: dapl_rsp_create.c
*
* PURPOSE: Connection management
* Description: Interfaces in this file are completely described in
* the DAPL 1.1 API, Chapter 6, section 4
*
* $Id: dapl_rsp_create.c,v 1.14 2003/07/25 19:24:11 sjs2 Exp $
*/
#include "dapl.h"
#include "dapl_sp_util.h"
#include "dapl_ia_util.h"
#include "dapl_ep_util.h"
#include "dapl_adapter_util.h"
/*
* dapl_rsp_create
*
* uDAPL: User Direct Access Program Library Version 1.1, 6.4.3.4.1
*
* Create a Resereved Service Point with the specified Endpoint
* that generates at most one Connection Request that is
* delivered to the specified Event Dispatcher in a notification
* event
*
* Input:
* ia_handle
* conn_qual
* ep_handle
* evd_handle
*
* Output:
* rsp_handle
*
* Returns:
* DAT_SUCCESS
* DAT_INSUFFICIENT_RESOURCES
* DAT_INVALID_PARAMETER
* DAT_INVALID_STATE
* DAT_CONN_QUAL_IN_USE
*/
{
">>> dapl_rsp_free conn_qual: %x EP: %p\n",
goto bail;
}
goto bail;
}
goto bail;
}
if (rsp_handle == NULL) {
goto bail;
}
goto bail;
}
goto bail;
}
/* Allocate RSP */
goto bail;
}
}
/*
* Fill out the RSP args
*/
/*
* Take a reference on the EVD handle
*/
/*
* Update the EP state indicating the provider now owns it
*/
/*
* Set up a listener for a connection. Connections can arrive
* even before this call returns!
*/
/* Link it onto the IA */
sp_ptr);
if (dat_status != DAT_SUCCESS) {
/*
* Have a problem setting up the connection, something
* wrong!
* rsp_free will decrement the EVD refcount. Set
* listening to * false to avoid tearing down the
* conn_listener which didn't * get set up.
*/
"--> dapl_rsp_create setup_conn_listener failed: "
"%x\n",
goto bail;
}
}
/*
* Return handle to the user
*/
bail:
return (dat_status);
}