c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota * CDDL HEADER START
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota * The contents of this file are subject to the terms of the
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota * Common Development and Distribution License (the "License").
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota * You may not use this file except in compliance with the License.
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota * See the License for the specific language governing permissions
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota * and limitations under the License.
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota * When distributing Covered Code, include this CDDL HEADER in each
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota * If applicable, add the following below this CDDL HEADER, with the
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota * fields enclosed by brackets "[]" replaced with your own identifying
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota * information: Portions Copyright [yyyy] [name of copyright owner]
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota * CDDL HEADER END
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Otaextern sock_lower_handle_t rdsv3_create(int, int, int, sock_downcalls_t **,
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota#define RDSV3_DEVICE_NAME "/devices/ib/rdsv3@0:rdsv3"
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota ret = ldi_ident_from_mod(&modlinkage, &sockrds_li);
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota if (ret != 0) {
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota ret = ldi_open_by_name(RDSV3_DEVICE_NAME, FREAD | FWRITE, kcred,
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota if (ret != 0) {
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota if (ret != 0) {
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota (void) ldi_close(rdsv3_transport_handle, FNDELAY, kcred);
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota if (ret != 0) {
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota (void) ldi_close(rdsv3_transport_handle, FNDELAY, kcred);
c0dd49bdd68c0d758a67d56f07826f3b45cfc664Eiji Ota return (0);