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) 2012, Oracle and/or its affiliates. All rights reserved. 2N/A * A UNIX file descriptor normally is a sufficient abstraction for a 2N/A * connection. Unfortunately, complex layered protocols like SSL 2N/A * require some sort of userland linkage, and short of creating pipes 2N/A * to ourselves and threads to service them, we are no longer able to 2N/A * use file descriptors alone. 2N/A * Here we define a basic stream abstraction. It supports for basic 2N/A * operations: read, write, close, and free. read, write, and close 2N/A * are expected to be asynchronously callable. Traditionally, close 2N/A * and free were combined in close(2), but here we separate them so 2N/A * that streams can be closed in one thread while others are reading or 2N/A * writing without risk of use-after-free. free is obviously not 2N/A * asynchronously callable. 2N/A * Note: this functionality doesn't really fit in libadr, but is 2N/A * required by both protocol-independent portions of the rad daemon and 2N/A * by the rad protocol client code. To economize on libraries we are 2N/A * putting its implementation here until there is a critical mass of 2N/A * similar functionality. 2N/A void (*)(
void *),
void (*)(
void *),
void *);
2N/A * Implementations of file descriptor and SSL streams are provided 2N/A#
endif /* _ADR_STREAM_H */