tap.c (c5c6d7f81a6950d8e32a3b5a0bafd37bfa5a8e88) tap.c (a30ecde6e795682d1473c45acae66a60a76fca2f)
1/*
2 * QEMU System Emulator
3 *
4 * Copyright (c) 2003-2008 Fabrice Bellard
5 * Copyright (c) 2009 Red Hat, Inc.
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 * of this software and associated documentation files (the "Software"), to deal

--- 517 unchanged lines hidden (view full) ---

526 return fd;
527 }
528 }
529 fprintf(stderr, "failed to launch bridge helper\n");
530 return -1;
531}
532
533int net_init_bridge(const NetClientOptions *opts, const char *name,
1/*
2 * QEMU System Emulator
3 *
4 * Copyright (c) 2003-2008 Fabrice Bellard
5 * Copyright (c) 2009 Red Hat, Inc.
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 * of this software and associated documentation files (the "Software"), to deal

--- 517 unchanged lines hidden (view full) ---

526 return fd;
527 }
528 }
529 fprintf(stderr, "failed to launch bridge helper\n");
530 return -1;
531}
532
533int net_init_bridge(const NetClientOptions *opts, const char *name,
534 NetClientState *peer)
534 NetClientState *peer, Error **errp)
535{
535{
536 /* FIXME error_setg(errp, ...) on failure */
536 const NetdevBridgeOptions *bridge;
537 const char *helper, *br;
538
539 TAPState *s;
540 int fd, vnet_hdr;
541
542 assert(opts->kind == NET_CLIENT_OPTIONS_KIND_BRIDGE);
543 bridge = opts->bridge;

--- 150 unchanged lines hidden (view full) ---

694 ptr = this + 1;
695 }
696 }
697
698 return i;
699}
700
701int net_init_tap(const NetClientOptions *opts, const char *name,
537 const NetdevBridgeOptions *bridge;
538 const char *helper, *br;
539
540 TAPState *s;
541 int fd, vnet_hdr;
542
543 assert(opts->kind == NET_CLIENT_OPTIONS_KIND_BRIDGE);
544 bridge = opts->bridge;

--- 150 unchanged lines hidden (view full) ---

695 ptr = this + 1;
696 }
697 }
698
699 return i;
700}
701
702int net_init_tap(const NetClientOptions *opts, const char *name,
702 NetClientState *peer)
703 NetClientState *peer, Error **errp)
703{
704{
705 /* FIXME error_setg(errp, ...) on failure */
704 const NetdevTapOptions *tap;
705 int fd, vnet_hdr = 0, i = 0, queues;
706 /* for the no-fd, no-helper case */
707 const char *script = NULL; /* suppress wrong "uninit'd use" gcc warning */
708 const char *downscript = NULL;
709 Error *err = NULL;
710 const char *vhostfdname;
711 char ifname[128];

--- 191 unchanged lines hidden ---
706 const NetdevTapOptions *tap;
707 int fd, vnet_hdr = 0, i = 0, queues;
708 /* for the no-fd, no-helper case */
709 const char *script = NULL; /* suppress wrong "uninit'd use" gcc warning */
710 const char *downscript = NULL;
711 Error *err = NULL;
712 const char *vhostfdname;
713 char ifname[128];

--- 191 unchanged lines hidden ---