misc.h revision 908fe75c9744f127193ce0c4557bec77438ce098
/* $Id$ */
/** @file
* NAT - helpers (declarations/defines).
*/
/*
* Copyright (C) 2006-2010 Sun Microsystems, Inc.
*
* 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.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
* Clara, CA 95054 USA or visit http://www.sun.com if you need
* additional information or have any questions.
*/
/*
* 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_
void getouraddr (PNATState);
void slirp_insque (PNATState, void *, void *);
void slirp_remque (PNATState, void *);
void fd_nonblock (int);
#ifdef VBOX_WITH_SLIRP_BSD_MBUF
/* 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 *);
#endif /* VBOX_WITH_SLIRP_BSD_MBUF */
#endif