mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
net: move slirp code from net.c to net/slirp.c
Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
committed by
Anthony Liguori
parent
a90ffa497d
commit
68ac40d2c6
@@ -106,6 +106,7 @@ net-nested-$(CONFIG_WIN32) += tap-win32.o
|
||||
net-nested-$(CONFIG_BSD) += tap-bsd.o
|
||||
net-nested-$(CONFIG_SOLARIS) += tap-solaris.o
|
||||
net-nested-$(CONFIG_AIX) += tap-aix.o
|
||||
net-nested-$(CONFIG_SLIRP) += slirp.o
|
||||
net-obj-y += $(addprefix net/, $(net-nested-y))
|
||||
|
||||
######################################################################
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "hw/loader.h"
|
||||
#include "gdbstub.h"
|
||||
#include "net.h"
|
||||
#include "net/slirp.h"
|
||||
#include "qemu-char.h"
|
||||
#include "sysemu.h"
|
||||
#include "monitor.h"
|
||||
|
||||
@@ -87,6 +87,8 @@ VLANClientState *qemu_new_vlan_client(net_client_type type,
|
||||
void *opaque);
|
||||
void qemu_del_vlan_client(VLANClientState *vc);
|
||||
VLANClientState *qemu_find_vlan_client(VLANState *vlan, void *opaque);
|
||||
VLANClientState *qemu_find_vlan_client_by_name(Monitor *mon, int vlan_id,
|
||||
const char *client_str);
|
||||
int qemu_can_send_packet(VLANClientState *vc);
|
||||
ssize_t qemu_sendv_packet(VLANClientState *vc, const struct iovec *iov,
|
||||
int iovcnt);
|
||||
@@ -108,8 +110,6 @@ int qemu_find_nic_model(NICInfo *nd, const char * const *models,
|
||||
void do_info_network(Monitor *mon);
|
||||
void do_set_link(Monitor *mon, const QDict *qdict);
|
||||
|
||||
void do_info_usernet(Monitor *mon);
|
||||
|
||||
/* NIC info */
|
||||
|
||||
#define MAX_NICS 8
|
||||
@@ -156,10 +156,6 @@ int net_client_init(Monitor *mon, QemuOpts *opts, int is_netdev);
|
||||
void net_client_uninit(NICInfo *nd);
|
||||
int net_client_parse(QemuOptsList *opts_list, const char *str);
|
||||
int net_init_clients(void);
|
||||
int net_slirp_smb(const char *exported_dir);
|
||||
void net_slirp_hostfwd_add(Monitor *mon, const QDict *qdict);
|
||||
void net_slirp_hostfwd_remove(Monitor *mon, const QDict *qdict);
|
||||
int net_slirp_redir(const char *redir_str);
|
||||
void net_cleanup(void);
|
||||
void net_set_boot_mask(int boot_mask);
|
||||
void net_host_device_add(Monitor *mon, const QDict *qdict);
|
||||
|
||||
+752
File diff suppressed because it is too large
Load Diff
+51
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* QEMU System Emulator
|
||||
*
|
||||
* Copyright (c) 2003-2008 Fabrice Bellard
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
#ifndef QEMU_NET_SLIRP_H
|
||||
#define QEMU_NET_SLIRP_H
|
||||
|
||||
#include "qemu-common.h"
|
||||
#include "qdict.h"
|
||||
#include "qemu-option.h"
|
||||
|
||||
#ifdef CONFIG_SLIRP
|
||||
|
||||
int net_init_slirp(QemuOpts *opts,
|
||||
Monitor *mon,
|
||||
const char *name,
|
||||
VLANState *vlan);
|
||||
|
||||
void net_slirp_hostfwd_add(Monitor *mon, const QDict *qdict);
|
||||
void net_slirp_hostfwd_remove(Monitor *mon, const QDict *qdict);
|
||||
|
||||
int net_slirp_redir(const char *redir_str);
|
||||
|
||||
int net_slirp_parse_legacy(QemuOptsList *opts_list, const char *optarg, int *ret);
|
||||
|
||||
int net_slirp_smb(const char *exported_dir);
|
||||
|
||||
void do_info_usernet(Monitor *mon);
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* QEMU_NET_SLIRP_H */
|
||||
Reference in New Issue
Block a user