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) 2008, 2012, Oracle and/or its affiliates. All rights reserved. 2N/A "virtual-domain-service@0:vlds";
2N/A * Lock to protect the dslibtab table. We only need to protect this 2N/A * table for those functions which actually look at or modify the table: 2N/A * (ds_hdl_unreg) or during callbacks (ds_recv) 2N/A * Static functions internal to dslib. 2N/A /* double the size */ 2N/A /* use the original structure entry */ 2N/A * ds_new_dslibentry could cause orig_dsp to point to freed 2N/A * memory should we grow dslibtab, so save a copy of the 2N/A * table entry here and use it below. 2N/A /* allocate a new structure entry */ 2N/A * Want to leave an entry in the dslib table even though all the 2N/A * handles may have been unregistered for it. 2N/A * Find out if we have 1 or 2 or more handles for the given 2N/A * service. Having one implies that we want to leave the entry 2N/A * intact but marked as not in use unless this is a ds_unreg_hdl 2N/A * (force_unreg is true). 2N/A /* Setup device driver capability structure. */ 2N/A /* service string */ 2N/A * Format args for VLDS_SVC_REG ioctl. 2N/A /* returned handle */ 2N/A * Setup user callback sysevent channel. 2N/A * Set entry values in dslibtab. 2N/A * Registers a service provider. Kicks off the handshake with other 2N/A * domain(s) to announce servce. Callback events are as described above. 2N/A * Registers interest in a service from a specific domain. When that 2N/A * service is registered, the register callback is invoked. When that 2N/A * service is unregistered, the unregister callback is invoked. When 2N/A * data is received, the receive data callback is invoked. 2N/A * Given a service name and type, returns the existing handle(s), if 2N/A * one or more exist. This could be used to poll for the connection being 2N/A * Given a handle, return its associated domain. 2N/A * Unregisters either a service or an interest in that service 2N/A * indicated by the supplied handle. 2N/A * Send data to the appropriate service provider or client 2N/A * indicated by the provided handle. The sender will block 2N/A * until the message has been sent. There is no guarantee 2N/A * that multiple calls to ds_send_msg by the same thread 2N/A * will result in the data showing up at the receiver in 2N/A * the same order as sent. If multiple messages are required, 2N/A * it will be up to the sender and receiver to implement a 2N/A * Receive data from the appropriate service provider or client 2N/A * indicated by the provided handle. The sender will block 2N/A * until a message has been received. 2N/A * Given a domain name, return its associated domain handle. 2N/A * Given a domain handle, return its associated domain name.