Stefan Hajnoczi | f6c874e | 2012-07-24 16:35:04 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Hub net client |
| 3 | * |
| 4 | * Copyright IBM, Corp. 2012 |
| 5 | * |
| 6 | * Authors: |
| 7 | * Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> |
| 8 | * Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> |
| 9 | * |
| 10 | * This work is licensed under the terms of the GNU LGPL, version 2 or later. |
| 11 | * See the COPYING.LIB file in the top-level directory. |
| 12 | * |
| 13 | */ |
| 14 | |
| 15 | #ifndef NET_HUB_H |
| 16 | #define NET_HUB_H |
| 17 | |
| 18 | #include "qemu-common.h" |
| 19 | |
| 20 | int net_init_hubport(const NetClientOptions *opts, const char *name, |
Stefan Hajnoczi | 4e68f7a | 2012-07-24 16:35:13 +0100 | [diff] [blame] | 21 | NetClientState *peer); |
| 22 | NetClientState *net_hub_add_port(int hub_id, const char *name); |
| 23 | NetClientState *net_hub_find_client_by_name(int hub_id, const char *name); |
Stefan Hajnoczi | f6c874e | 2012-07-24 16:35:04 +0100 | [diff] [blame] | 24 | void net_hub_info(Monitor *mon); |
Stefan Hajnoczi | 4e68f7a | 2012-07-24 16:35:13 +0100 | [diff] [blame] | 25 | int net_hub_id_for_client(NetClientState *nc, int *id); |
Stefan Hajnoczi | 8101764 | 2012-07-24 16:35:07 +0100 | [diff] [blame] | 26 | void net_hub_check_clients(void); |
Stefan Hajnoczi | 4e68f7a | 2012-07-24 16:35:13 +0100 | [diff] [blame] | 27 | NetClientState *net_hub_port_find(int hub_id); |
Stefan Hajnoczi | f6c874e | 2012-07-24 16:35:04 +0100 | [diff] [blame] | 28 | |
| 29 | #endif /* NET_HUB_H */ |