diff options
author | Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> | 2012-07-24 16:35:13 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> | 2012-08-01 13:32:10 +0100 |
commit | 4e68f7a0819f179c2ff90a60611806c789911cc2 (patch) | |
tree | f276c08566561b0badcc95fe82047b3e018ffa5d /net/hub.c | |
parent | 94878994dcd5d7c2d9c3fe689d6841f6e7ddc2c2 (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/hub.c')
-rw-r--r-- | net/hub.c | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -25,7 +25,7 @@ typedef struct NetHub NetHub; typedef struct NetHubPort { - VLANClientState nc; + NetClientState nc; QLIST_ENTRY(NetHubPort) next; NetHub *hub; int id; @@ -85,7 +85,7 @@ static NetHub *net_hub_new(int id) return hub; } -static ssize_t net_hub_port_receive(VLANClientState *nc, +static ssize_t net_hub_port_receive(NetClientState *nc, const uint8_t *buf, size_t len) { NetHubPort *port = DO_UPCAST(NetHubPort, nc, nc); @@ -93,7 +93,7 @@ static ssize_t net_hub_port_receive(VLANClientState *nc, return net_hub_receive(port->hub, port, buf, len); } -static ssize_t net_hub_port_receive_iov(VLANClientState *nc, +static ssize_t net_hub_port_receive_iov(NetClientState *nc, const struct iovec *iov, int iovcnt) { NetHubPort *port = DO_UPCAST(NetHubPort, nc, nc); @@ -101,7 +101,7 @@ static ssize_t net_hub_port_receive_iov(VLANClientState *nc, return net_hub_receive_iov(port->hub, port, iov, iovcnt); } -static void net_hub_port_cleanup(VLANClientState *nc) +static void net_hub_port_cleanup(NetClientState *nc) { NetHubPort *port = DO_UPCAST(NetHubPort, nc, nc); @@ -118,7 +118,7 @@ static NetClientInfo net_hub_port_info = { static NetHubPort *net_hub_port_new(NetHub *hub, const char *name) { - VLANClientState *nc; + NetClientState *nc; NetHubPort *port; int id = hub->num_ports++; char default_name[128]; @@ -145,7 +145,7 @@ static NetHubPort *net_hub_port_new(NetHub *hub, const char *name) * * If there is no existing hub with the given id then a new hub is created. */ -VLANClientState *net_hub_add_port(int hub_id, const char *name) +NetClientState *net_hub_add_port(int hub_id, const char *name) { NetHub *hub; NetHubPort *port; @@ -167,11 +167,11 @@ VLANClientState *net_hub_add_port(int hub_id, const char *name) /** * Find a specific client on a hub */ -VLANClientState *net_hub_find_client_by_name(int hub_id, const char *name) +NetClientState *net_hub_find_client_by_name(int hub_id, const char *name) { NetHub *hub; NetHubPort *port; - VLANClientState *peer; + NetClientState *peer; QLIST_FOREACH(hub, &hubs, next) { if (hub->id == hub_id) { @@ -190,11 +190,11 @@ VLANClientState *net_hub_find_client_by_name(int hub_id, const char *name) /** * Find a available port on a hub; otherwise create one new port */ -VLANClientState *net_hub_port_find(int hub_id) +NetClientState *net_hub_port_find(int hub_id) { NetHub *hub; NetHubPort *port; - VLANClientState *nc; + NetClientState *nc; QLIST_FOREACH(hub, &hubs, next) { if (hub->id == hub_id) { @@ -234,7 +234,7 @@ void net_hub_info(Monitor *mon) * * @id Pointer for hub id output, may be NULL */ -int net_hub_id_for_client(VLANClientState *nc, int *id) +int net_hub_id_for_client(NetClientState *nc, int *id) { NetHubPort *port; @@ -254,7 +254,7 @@ int net_hub_id_for_client(VLANClientState *nc, int *id) } int net_init_hubport(const NetClientOptions *opts, const char *name, - VLANClientState *peer) + NetClientState *peer) { const NetdevHubPortOptions *hubport; @@ -277,7 +277,7 @@ void net_hub_check_clients(void) { NetHub *hub; NetHubPort *port; - VLANClientState *peer; + NetClientState *peer; QLIST_FOREACH(hub, &hubs, next) { int has_nic = 0, has_host_dev = 0; |