aboutsummaryrefslogtreecommitdiff
path: root/net/slirp.c
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2012-07-24 16:35:13 +0100
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2012-08-01 13:32:10 +0100
commit4e68f7a0819f179c2ff90a60611806c789911cc2 (patch)
treef276c08566561b0badcc95fe82047b3e018ffa5d /net/slirp.c
parent94878994dcd5d7c2d9c3fe689d6841f6e7ddc2c2 (diff)
net: Rename VLANClientState to NetClientState
The vlan feature is no longer part of net core. Rename VLANClientState to NetClientState because net clients are not explicitly associated with a vlan at all, instead they have a peer net client to which they are connected. This patch is a mechanical search-and-replace except for a few whitespace fixups where changing VLANClientState to NetClientState misaligned whitespace. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'net/slirp.c')
-rw-r--r--net/slirp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/slirp.c b/net/slirp.c
index 85d6fb4b34..1bdad37040 100644
--- a/net/slirp.c
+++ b/net/slirp.c
@@ -68,7 +68,7 @@ struct slirp_config_str {
};
typedef struct SlirpState {
- VLANClientState nc;
+ NetClientState nc;
QTAILQ_ENTRY(SlirpState) entry;
Slirp *slirp;
#ifndef _WIN32
@@ -111,7 +111,7 @@ void slirp_output(void *opaque, const uint8_t *pkt, int pkt_len)
qemu_send_packet(&s->nc, pkt, pkt_len);
}
-static ssize_t net_slirp_receive(VLANClientState *nc, const uint8_t *buf, size_t size)
+static ssize_t net_slirp_receive(NetClientState *nc, const uint8_t *buf, size_t size)
{
SlirpState *s = DO_UPCAST(SlirpState, nc, nc);
@@ -120,7 +120,7 @@ static ssize_t net_slirp_receive(VLANClientState *nc, const uint8_t *buf, size_t
return size;
}
-static void net_slirp_cleanup(VLANClientState *nc)
+static void net_slirp_cleanup(NetClientState *nc)
{
SlirpState *s = DO_UPCAST(SlirpState, nc, nc);
@@ -136,7 +136,7 @@ static NetClientInfo net_slirp_info = {
.cleanup = net_slirp_cleanup,
};
-static int net_slirp_init(VLANClientState *peer, const char *model,
+static int net_slirp_init(NetClientState *peer, const char *model,
const char *name, int restricted,
const char *vnetwork, const char *vhost,
const char *vhostname, const char *tftp_export,
@@ -153,7 +153,7 @@ static int net_slirp_init(VLANClientState *peer, const char *model,
#ifndef _WIN32
struct in_addr smbsrv = { .s_addr = 0 };
#endif
- VLANClientState *nc;
+ NetClientState *nc;
SlirpState *s;
char buf[20];
uint32_t addr;
@@ -284,7 +284,7 @@ static SlirpState *slirp_lookup(Monitor *mon, const char *vlan,
{
if (vlan) {
- VLANClientState *nc;
+ NetClientState *nc;
nc = net_hub_find_client_by_name(strtol(vlan, NULL, 0), stack);
if (!nc) {
return NULL;
@@ -706,7 +706,7 @@ net_init_slirp_configs(const StringList *fwd, int flags)
}
int net_init_slirp(const NetClientOptions *opts, const char *name,
- VLANClientState *peer)
+ NetClientState *peer)
{
struct slirp_config_str *config;
char *vnet;