dapl_ep_post_send.c revision 9517:b4839b0aa7a4
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 22/* 23 * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved. 24 */ 25 26/* 27 * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 28 * Use is subject to license terms. 29 */ 30 31/* 32 * 33 * MODULE: dapl_ep_post_send.c 34 * 35 * PURPOSE: Endpoint management 36 * Description: Interfaces in this file are completely described in 37 * the DAPL 1.1 API, Chapter 6, section 5 38 * 39 * $Id: dapl_ep_post_send.c,v 1.7 2003/07/30 18:13:37 hobie16 Exp $ 40 */ 41 42#include "dapl_ep_util.h" 43 44/* 45 * dapl_ep_post_send 46 * 47 * DAPL Requirements Version xxx, 6.5.10 48 * 49 * Request a transfer of all the data from the local_iov over 50 * the connection of the ep handle Endpoint to the remote side. 51 * 52 * Input: 53 * ep_handle 54 * num_segments 55 * local_iov 56 * user_cookie 57 * completion_flags 58 * 59 * Output: 60 * None 61 * Returns: 62 * DAT_SUCCESS 63 * DAT_INSUFFICIENT_RESOURCES 64 * DAT_INVALID_PARAMETER 65 * DAT_INVALID_STATE 66 * DAT_PROTECTION_VIOLATION 67 * DAT_PRIVILEGES_VIOLATION 68 */ 69DAT_RETURN 70dapl_ep_post_send( 71 IN DAT_EP_HANDLE ep_handle, 72 IN DAT_COUNT num_segments, 73 IN DAT_LMR_TRIPLET *local_iov, 74 IN DAT_DTO_COOKIE user_cookie, 75 IN DAT_COMPLETION_FLAGS completion_flags) 76{ 77 DAT_RMR_TRIPLET remote_iov = {0, 0, 0, 0}; 78 DAT_RETURN dat_status; 79 80 dapl_dbg_log(DAPL_DBG_TYPE_API, 81 "dapl_ep_post_send(%p, %d, %p, %P, %x)\n", 82 ep_handle, 83 num_segments, 84 local_iov, 85 user_cookie.as_64, 86 completion_flags); 87 88 dat_status = dapl_ep_post_send_req(ep_handle, 89 num_segments, 90 local_iov, 91 user_cookie, 92 &remote_iov, 93 completion_flags, 94 DAPL_DTO_TYPE_SEND, 95 OP_SEND); 96 97 dapl_dbg_log(DAPL_DBG_TYPE_RTN, 98 "dapl_ep_post_send () returns 0x%x\n", dat_status); 99 100 return (dat_status); 101} 102