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>
This commit is contained in:
Stefan Hajnoczi 2012-07-24 16:35:13 +01:00
parent 94878994dc
commit 4e68f7a081
50 changed files with 282 additions and 283 deletions

View file

@ -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;