misc.h revision c58f1213e628a545081c70e26c6b67a841cff880
/* $Id$ */
/** @file
* NAT - helpers (declarations/defines).
*/
/*
* Copyright (C) 2006-2012 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
/*
* This code is based on:
*
* Copyright (c) 1995 Danny Gasparovski.
*
* Please read the file COPYRIGHT for the
* terms and conditions of the copyright.
*/
#ifndef _MISC_H_
#define _MISC_H_
#ifdef VBOX_NAT_TST_QUEUE
typedef void *PNATState;
#endif
void slirp_insque (PNATState, void *, void *);
void slirp_remque (PNATState, void *);
# ifndef VBOX_NAT_TST_QUEUE
void getouraddr (PNATState);
void fd_nonblock (int);
/* UVM interface */
#define UMA_ALIGN_PTR (1 << 0)
struct uma_zone;
typedef struct uma_zone *uma_zone_t;
typedef void (*uma_free_t)(void *, int, u_int8_t);
void uma_zone_set_max(uma_zone_t, int);
void *uma_zalloc(uma_zone_t, int);
void *uma_zalloc_arg(uma_zone_t, void *, int);
void uma_zfree(uma_zone_t, void *);
void uma_zfree_arg(uma_zone_t, void *, void *);
void zone_drain(uma_zone_t);
void slirp_null_arg_free(void *, void *);
# else /* VBOX_NAT_TST_QUEUE */
# define insque slirp_insque
# define remque slirp_remque
# endif
#endif