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-2004, Network Appliance, Inc. All rights reserved. 2N/A * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved. 2N/A * PURPOSE: defines Platform specific types. 2N/A * Description: Header file for "uDAPL: User Direct Access Programming 2N/A * Library, Version: 1.2" 2N/A/* OS, processor, compiler type definitions. Add OS's as needed. */ 2N/A * This captures the alignment for the bus transfer from the HCA/IB chip 2N/A * to the main memory. 2N/A#
endif /* DAT_OPTIMAL_ALIGNMENT */ 2N/A * Assume all O/Ss use sockaddr, for address family: IPv4 == AF_INET, 2N/A * IPv6 == AF_INET6. Use of "namelen" field indicated. 2N/A * The Interface Adaptor Address names an Interface Adaptor local or 2N/A * remote, that is used for connection management and Name 2N/A * Service. The format of the dat_ia_address_ptr follows the normal 2N/A * socket programming practice of struct sockaddr *. DAT supports both 2N/A * IPv4 and IPv6 address families. Allocation and initialization of 2N/A * DAT IA address structures must follow normal Sockets programming 2N/A * procedures. The underlying type of the DAT IA address is the native 2N/A * struct sockaddr for each target operating system. In all cases, 2N/A * storage appropriate for the address family in use by the target 2N/A * Provider must be allocated. For instance, when IPv6 addressing is 2N/A * in use, this should be allocated as struct sockaddr_net6. The 2N/A * sockaddr sa_family and, if present, sa_len fields must be 2N/A * initialized appropriately, as well as the address information. 2N/A * When passed across the DAPL API this storage is cast to the 2N/A * DAT_IA_ADDRESS_PTR type. It is the responsibility of the callee to 2N/A * verify that the sockaddr contains valid data for the requested 2N/A * operation. It is always the responsibility of the caller to manage 2N/A * Code example for Linux: 2N/A * struct sockaddr_in6 addr; 2N/A * DAT_IA_ADDRESS_PTR ia_addr; 2N/A * // Note: linux pton requires explicit encoding of IPv4 in IPv6 2N/A * if (inet_pton(AF_INET6, "0:0:0:0:0:FFFF:192.168.0.1", 2N/A * return(-1); // Bad address or no address family support 2N/A * // initialize other necessary fields such as port, flow, etc 2N/A * ia_addr = (DAT_IA_ADDRESS_PTR) &addr; 2N/A * dat_ep_connect(ep_handle, ia_addr, conn_qual, timeout, 0, NULL, 2N/A * qos, DAT_CONNECT_DEFAULT_FLAG); 2N/A#
endif /* UINT64_C */ 2N/A/* NT. MSC compiler, Win32 platform */ 2N/A#
endif /* UINT64_C */ 2N/A#
endif /* _DAT_PLATFORM_SPECIFIC_H_ */