/* -*- Mode:C; c-basic-offset:4; tab-width:8; indent-tabs-mode:t -*- */ /* vim:set sts=4 ts=8: */ /* * Copyright (c) 2001 * YOID Project. * University of Southern California/Information Sciences Institute. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the project nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* * $XORP: xorp/libcomm/comm_private.h,v 1.4 2006/03/01 12:55:33 bms Exp $ */ #ifndef __LIBCOMM_COMM_PRIVATE_H__ #define __LIBCOMM_COMM_PRIVATE_H__ /* * COMM socket library private include header. */ #include "libxorp/xorp.h" #include "libxorp/xlog.h" #include "libxorp/debug.h" #include "comm_api.h" /* * Constants definitions */ /* * Structures, typedefs and macros */ /* * Global variables */ extern int _comm_serrno; /* * Global functions prototypes */ __BEGIN_DECLS /** * Report IPv6 method invoked when IPv6 support is not present. An * error message is output via XLOG_ERROR. This function is variadic * so it can be used to remove unused variable warnings in non-IPv6 * code as well as log the error. * * @param method ipv6 specific method to report. */ void comm_sock_no_ipv6(const char* method, ...); /** * Fetch and record the last socket layer error code. * * This is done using a function to facilitate using explicit * Thread Local Storage (TLS) at a later time, but is currently * single-threaded. */ void _comm_set_serrno(void); __END_DECLS #endif /* __LIBCOMM_COMM_PRIVATE_H__ */