backup: Wire up qemu full pull backup commands over QMP
[libvirt/ericb.git] / tests / bhyvexml2argvmock.c
blobf4fac092a5be42e30f057785f1f4fd6ca5d11989
1 #include <config.h>
3 #include "viralloc.h"
4 #include "virstring.h"
5 #include "virnetdev.h"
6 #include "virnetdevtap.h"
7 #include "internal.h"
9 #define VIR_FROM_THIS VIR_FROM_BHYVE
11 void virMacAddrGenerate(const unsigned char prefix[VIR_MAC_PREFIX_BUFLEN],
12 virMacAddrPtr addr)
14 addr->addr[0] = prefix[0];
15 addr->addr[1] = prefix[1];
16 addr->addr[2] = prefix[2];
17 addr->addr[3] = 0;
18 addr->addr[4] = 0;
19 addr->addr[5] = 0;
22 int virNetDevTapCreateInBridgePort(const char *brname ATTRIBUTE_UNUSED,
23 char **ifname,
24 const virMacAddr *macaddr ATTRIBUTE_UNUSED,
25 const unsigned char *vmuuid ATTRIBUTE_UNUSED,
26 const char *tunpath ATTRIBUTE_UNUSED,
27 int *tapfd ATTRIBUTE_UNUSED,
28 size_t tapfdSize ATTRIBUTE_UNUSED,
29 virNetDevVPortProfilePtr virtPortProfile ATTRIBUTE_UNUSED,
30 virNetDevVlanPtr virtVlan ATTRIBUTE_UNUSED,
31 virNetDevCoalescePtr coalesce ATTRIBUTE_UNUSED,
32 unsigned int mtu ATTRIBUTE_UNUSED,
33 unsigned int *actualMTU ATTRIBUTE_UNUSED,
34 unsigned int fakeflags ATTRIBUTE_UNUSED)
36 VIR_FREE(*ifname);
37 if (VIR_STRDUP(*ifname, "vnet0") < 0)
38 return -1;
39 return 0;
42 char *virNetDevTapGetRealDeviceName(char *name ATTRIBUTE_UNUSED)
44 char *fakename;
46 if (VIR_STRDUP(fakename, "faketapdev") < 0)
47 return NULL;
48 return fakename;
51 int virNetDevSetOnline(const char *ifname ATTRIBUTE_UNUSED,
52 bool online ATTRIBUTE_UNUSED)
54 return 0;
57 int bind(int sockfd ATTRIBUTE_UNUSED,
58 const struct sockaddr *addr ATTRIBUTE_UNUSED,
59 socklen_t addrlen ATTRIBUTE_UNUSED)
61 return 0;