net.c (3d861a01093f8eedfac9889746ccafcfd32039b7) | net.c (7fb1cf1606c78c9d5b538f29176fd5a101726a9d) |
---|---|
1/* 2 * QEMU System Emulator 3 * 4 * Copyright (c) 2003-2008 Fabrice Bellard 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 929 unchanged lines hidden (view full) --- 938 939 nd->used = 1; 940 nb_nics++; 941 942 return idx; 943} 944 945 | 1/* 2 * QEMU System Emulator 3 * 4 * Copyright (c) 2003-2008 Fabrice Bellard 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 929 unchanged lines hidden (view full) --- 938 939 nd->used = 1; 940 nb_nics++; 941 942 return idx; 943} 944 945 |
946static int (* const net_client_init_fun[NET_CLIENT_OPTIONS_KIND_MAX])( | 946static int (* const net_client_init_fun[NET_CLIENT_OPTIONS_KIND__MAX])( |
947 const NetClientOptions *opts, 948 const char *name, 949 NetClientState *peer, Error **errp) = { 950 [NET_CLIENT_OPTIONS_KIND_NIC] = net_init_nic, 951#ifdef CONFIG_SLIRP 952 [NET_CLIENT_OPTIONS_KIND_USER] = net_init_slirp, 953#endif 954 [NET_CLIENT_OPTIONS_KIND_TAP] = net_init_tap, --- 336 unchanged lines hidden (view full) --- 1291 1292void qmp_set_link(const char *name, bool up, Error **errp) 1293{ 1294 NetClientState *ncs[MAX_QUEUE_NUM]; 1295 NetClientState *nc; 1296 int queues, i; 1297 1298 queues = qemu_find_net_clients_except(name, ncs, | 947 const NetClientOptions *opts, 948 const char *name, 949 NetClientState *peer, Error **errp) = { 950 [NET_CLIENT_OPTIONS_KIND_NIC] = net_init_nic, 951#ifdef CONFIG_SLIRP 952 [NET_CLIENT_OPTIONS_KIND_USER] = net_init_slirp, 953#endif 954 [NET_CLIENT_OPTIONS_KIND_TAP] = net_init_tap, --- 336 unchanged lines hidden (view full) --- 1291 1292void qmp_set_link(const char *name, bool up, Error **errp) 1293{ 1294 NetClientState *ncs[MAX_QUEUE_NUM]; 1295 NetClientState *nc; 1296 int queues, i; 1297 1298 queues = qemu_find_net_clients_except(name, ncs, |
1299 NET_CLIENT_OPTIONS_KIND_MAX, | 1299 NET_CLIENT_OPTIONS_KIND__MAX, |
1300 MAX_QUEUE_NUM); 1301 1302 if (queues == 0) { 1303 error_set(errp, ERROR_CLASS_DEVICE_NOT_FOUND, 1304 "Device '%s' not found", name); 1305 return; 1306 } 1307 nc = ncs[0]; --- 232 unchanged lines hidden --- | 1300 MAX_QUEUE_NUM); 1301 1302 if (queues == 0) { 1303 error_set(errp, ERROR_CLASS_DEVICE_NOT_FOUND, 1304 "Device '%s' not found", name); 1305 return; 1306 } 1307 nc = ncs[0]; --- 232 unchanged lines hidden --- |