xref: /titanic_41/usr/src/man/man3c/door_info.3c (revision 654b400c387942fc00d4f6869539adbd7b25fbce)
te
Copyright (c) 2005, Sun Microsystems, Inc. All Rights Reserved.
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 or http://www.opensolaris.org/os/licensing. 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]
DOOR_INFO 3C "Mar 22, 2005"
NAME
door_info - return information associated with a door descriptor
SYNOPSIS

cc -mt [ flag... ] file... [ library... ]
#include <door.h>

int door_info(int d, struct door_info *info);
DESCRIPTION

The door_info() function returns information associated with a door descriptor. It obtains information about the door descriptor d and places the information that is relevant to the door in the structure pointed to by the info argument.

The door_info structure pointed to by the info argument contains the following members:

pid_t di_target; /* door server pid */
door_ptr_t di_proc; /* server function */
door_ptr_t di_data; /* data cookie for invocation */
door_attr_t di_attributes; /* door attributes */
door_id_t di_uniquifier; /* unique id among all doors */

The di_target member is the process ID of the door server, or -1 if the door server process has exited.

The values for di_attributes may be composed of the following: DOOR_LOCAL

The door descriptor refers to a service procedure in this process.

DOOR_UNREF

The door has requested notification when all but the last reference has gone away.

DOOR_UNREF_MULTI

Similar to DOOR_UNREF, except multiple unreferenced notifications may be delivered for this door.

DOOR_IS_UNREF

There is currently only one descriptor referring to the door.

DOOR_REFUSE_DESC

The door refuses any attempt to door_call(3C) it with argument descriptors.

DOOR_NO_CANCEL

Clients who abort a door_call(3C) call on this door will not cause the cancellation(5) of the server thread handling the request.

DOOR_REVOKED

The door descriptor refers to a door that has been revoked.

DOOR_PRIVATE

The door has a separate pool of server threads associated with it.

The di_proc and di_data members are returned as door_ptr_t objects rather than void * pointers to allow clients and servers to interoperate in environments where the pointer sizes may vary in size (for example, 32-bit clients and 64-bit servers). Each door has a system-wide unique number associated with it that is set when the door is created by door_create(). This number is returned in di_uniquifier.

RETURN VALUES

Upon successful completion, 0 is returned. Otherwise, -1 is returned and errno is set to indicate the error.

ERRORS

The door_info() function will fail if: EFAULT

The address of argument info is an invalid address.

EBADF

d is not a door descriptor.

ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE
Architecture all
Interface Stability Stable
MT-Level Safe
SEE ALSO

door_bind(3C), door_call(3C), door_create(3C), door_server_create(3C), attributes(5), cancellation(5)