VirtualBox

source: vbox/trunk/src/VBox/Devices/Network/VDEPlugSymDefs.h@ 28440

Last change on this file since 28440 was 28406, checked in by vboxsync, 15 years ago

Devices, Main, FE/Qt: re-committed support for VDE virtual network switches for Linux and FreeBSD hosts. Contributed by Renzo Davoli, VirtualSquare, University of Bologna

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.2 KB
Line 
1/** @file
2 * Symbols from libvdeplug.so.2 to be loaded at runtime for DrvVDE.cpp
3 */
4
5/*
6 * Copyright (C) 2008-2010 Sun Microsystems, Inc.
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License (GPL) as published by the Free Software
12 * Foundation, in version 2 as it comes in the "COPYING" file of the
13 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15 *
16 * The contents of this file may alternatively be used under the terms
17 * of the Common Development and Distribution License Version 1.0
18 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
19 * VirtualBox OSE distribution, in which case the provisions of the
20 * CDDL are applicable instead of those of the GPL.
21 *
22 * You may elect to license modified versions of this file under the
23 * terms and conditions of either the GPL or the CDDL or both.
24 *
25 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
26 * Clara, CA 95054 USA or visit http://www.sun.com if you need
27 * additional information or have any questions.
28 */
29
30#include <stddef.h>
31#include <sys/types.h>
32/** Opaque connection type */
33struct vdeconn;
34typedef struct vdeconn VDECONN;
35
36/** Structure to be passed to the open function describing the connection.
37 * All members can be left zero to use the default values. */
38struct vde_open_args
39{
40 /** The port of the switch to connect to */
41 int port;
42 /** The group to set ownership of the port socket to */
43 char *group;
44 /** The file mode to set the port socket to */
45 mode_t mode;
46};
47
48/** The file name of the DBus library */
49#define RT_RUNTIME_LOADER_LIB_NAME "libvdeplug.so.2"
50
51/** The name of the loader function */
52#define RT_RUNTIME_LOADER_FUNCTION DrvVDELoadVDEPlug
53
54/** The following are the symbols which we need from the library. */
55#define RT_RUNTIME_LOADER_INSERT_SYMBOLS \
56 RT_PROXY_STUB(vde_open_real, VDECONN *, \
57 (const char *vde_switch, const char *descr, int interface_version, struct vde_open_args *open_args), \
58 (vde_switch, descr, interface_version, open_args)) \
59 RT_PROXY_STUB(vde_recv, size_t, \
60 (VDECONN *conn,void *buf,size_t len,int flags), \
61 (conn, buf, len, flags)) \
62 RT_PROXY_STUB(vde_send, size_t, \
63 (VDECONN *conn,const void *buf,size_t len,int flags), \
64 (conn, buf, len, flags)) \
65 RT_PROXY_STUB(vde_datafd, int, (VDECONN *conn), (conn))
66
67#ifdef VDEPLUG_GENERATE_HEADER
68# define RT_RUNTIME_LOADER_GENERATE_HEADER
69# define RT_RUNTIME_LOADER_GENERATE_DECLS
70# include <iprt/runtime-loader.h>
71# undef RT_RUNTIME_LOADER_GENERATE_HEADER
72# undef RT_RUNTIME_LOADER_GENERATE_DECLS
73#elif defined (VDEPLUG_GENERATE_BODY)
74# define RT_RUNTIME_LOADER_GENERATE_BODY_STUBS
75# include <iprt/runtime-loader.h>
76# undef RT_RUNTIME_LOADER_GENERATE_BODY_STUBS
77#else
78# error This file should only be included to generate stubs for loading the \
79libvdeplug library at runtime
80#endif
81
82#undef RT_RUNTIME_LOADER_LIB_NAME
83#undef RT_RUNTIME_LOADER_INSERT_SYMBOLS
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