VirtualBox

source: vbox/trunk/src/VBox/Devices/Network/slirp/ext.h@ 28915

Last change on this file since 28915 was 28800, checked in by vboxsync, 14 years ago

Automated rebranding to Oracle copyright/license strings via filemuncher

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.5 KB
Line 
1/** $Id: ext.h 28800 2010-04-27 08:22:32Z vboxsync $ */
2/** @file
3 * NAT - some externals helpers
4 */
5
6/*
7 * Copyright (C) 2007 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifdef VBOX_WITH_SLIRP_BSD_MBUF
19# ifndef IN_BSD
20# define zone_mbuf slirp_zone_mbuf(pData)
21# define zone_clust slirp_zone_clust(pData)
22# define zone_pack slirp_zone_pack(pData)
23# define zone_jumbop slirp_zone_jumbop(pData)
24# define zone_jumbo9 slirp_zone_jumbo9(pData)
25# define zone_jumbo16 slirp_zone_jumbo16(pData)
26# define zone_ext_refcnt slirp_zone_ext_refcnt(pData)
27static inline uma_zone_t slirp_zone_mbuf(PNATState);
28static inline uma_zone_t slirp_zone_clust(PNATState);
29static inline uma_zone_t slirp_zone_pack(PNATState);
30static inline uma_zone_t slirp_zone_jumbop(PNATState);
31static inline uma_zone_t slirp_zone_jumbo9(PNATState);
32static inline uma_zone_t slirp_zone_jumbo16(PNATState);
33static inline uma_zone_t slirp_zone_ext_refcnt(PNATState);
34# else
35# undef zone_mbuf
36# undef zone_clust
37# undef zone_pack
38# undef zone_jumbop
39# undef zone_jumbo9
40# undef zone_jumbo16
41# undef zone_ext_refcnt
42
43# define zone_mbuf pData->zone_mbuf
44# define zone_clust pData->zone_clust
45# define zone_pack pData->zone_pack
46# define zone_jumbop pData->zone_jumbop
47# define zone_jumbo9 pData->zone_jumbo9
48# define zone_jumbo16 pData->zone_jumbo16
49# define zone_ext_refcnt pData->zone_ext_refcnt
50# endif
51#endif
52
53#ifndef _EXT_H_
54#define _EXT_H_
55# define fprintf vbox_slirp_fprintf
56# define printf vbox_slirp_printf
57#ifndef vbox_slirp_printfV
58static void vbox_slirp_printV(char *format, va_list args)
59{
60 char buffer[1024];
61 memset(buffer, 0, 1024);
62 RTStrPrintfV(buffer, 1024, format, args);
63
64 LogRel(("NAT:EXT: %s\n", buffer));
65}
66#endif
67
68#ifndef vbox_slirp_printf
69static void vbox_slirp_printf(char *format, ...)
70{
71 va_list args;
72 va_start(args, format);
73 vbox_slirp_printV(format, args);
74 va_end(args);
75}
76#endif
77
78#ifndef vbox_slirp_fprintf
79static void vbox_slirp_fprintf(void *ignored, char *format, ...)
80{
81# ifdef LOG_ENABLED
82 va_list args;
83 va_start(args, format);
84 vbox_slirp_printV(format, args);
85 va_end(args);
86# endif
87}
88#endif
89#endif
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette