/*
* 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 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <net/if_types.h>
#include <sys/ethernet.h>
extern char cmlog[];
static void ibcm_resolver_ack(ip2mac_t *, void *);
/*
* delete a wait queue node from the list.
* assumes mutex is acquired
*/
void
{
}
/*
* allocate a wait queue node, and insert it in the list
*/
static ibcm_arp_prwqn_t *
{
return (NULL);
}
NULL) {
return (NULL);
}
if (src_addr) {
}
return (wqnp);
}
/*
* Check if the interface is loopback or IB.
*/
static int
{
return (0);
return (ETIMEDOUT);
}
int
{
"ibcm_arp_create_prwqn failed");
return (1);
}
/*
* get an ire for the destination adress.
* Note that we can't use MATCH_IRE_ILL since that would
* require that the first ill we find have ire_ill set.
*/
"ire_route_recursive_v4 failed");
goto fail;
}
"ire_nexthop_ill failed");
goto fail;
}
/* Pick a source address */
goto fail;
}
/*
* get an ire for the destination adress.
* Note that we can't use MATCH_IRE_ILL since that would
* require that the first ill we find have ire_ill set. Thus
* we compare ire_ill against ipif_ill after the lookup.
*/
"ire_route_recursive_v6 failed");
goto fail;
}
"ire_nexthop_ill failed");
goto fail;
}
/* Pick a source address */
goto fail;
}
}
/*
* For IPMP data addresses, we need to use the hardware address of the
* interface bound to the given address.
*/
} else {
}
goto fail;
}
"no bound ill for IPMP interface %s",
goto fail;
}
} else {
hwaddr_ill = ill;
}
"ibcm_arp_check_interface failed");
goto fail;
}
/*
* at this stage, we have the source address and the IB
* interface, now get the destination mac address from
* arp or ipv6 drivers
*/
goto fail;
}
return (0);
fail:
if (hwaddr_ill != NULL)
return (1);
}
/*
*/
static int
{
int err;
return (1);
}
} else {
return (1);
}
/*
* issue the request to IP for Neighbor Discovery
*/
zoneid);
if (err == EINPROGRESS) {
err = 0;
} else if (err == 0) {
}
return (err);
}
/*
* do sanity checks on the link-level sockaddr
*/
static boolean_t
{
return (B_FALSE);
return (B_TRUE);
}
/*
* callback for resolver lookups, both for success and failure.
* If Address resolution was succesful: return GID info.
*/
static void
{
int err = 0;
if (ip2macp->ip2mac_err != 0) {
err = EHOSTUNREACH;
goto user_callback;
}
err = EHOSTUNREACH;
goto user_callback;
}
/*
* now get the hca, port
*/
/* lock is held by the caller. */
}