tap-win32.c (cebea510579ed43724156cc596a8ff14ba208740) tap-win32.c (f394b2e20d9a666fb194fb692179a0eeaca5daea)
1/*
2 * TAP-Win32 -- A kernel driver to provide virtual tap device functionality
3 * on Windows. Originally derived from the CIPE-Win32
4 * project by Damion K. Wilson, with extensive modifications by
5 * James Yonan.
6 *
7 * All source code which derives from the CIPE-Win32 project is
8 * Copyright (C) Damion K. Wilson, 2003, and is released under the

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

745}
746
747static void tap_set_vnet_hdr_len(NetClientState *nc, int len)
748{
749 abort();
750}
751
752static NetClientInfo net_tap_win32_info = {
1/*
2 * TAP-Win32 -- A kernel driver to provide virtual tap device functionality
3 * on Windows. Originally derived from the CIPE-Win32
4 * project by Damion K. Wilson, with extensive modifications by
5 * James Yonan.
6 *
7 * All source code which derives from the CIPE-Win32 project is
8 * Copyright (C) Damion K. Wilson, 2003, and is released under the

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

745}
746
747static void tap_set_vnet_hdr_len(NetClientState *nc, int len)
748{
749 abort();
750}
751
752static NetClientInfo net_tap_win32_info = {
753 .type = NET_CLIENT_OPTIONS_KIND_TAP,
753 .type = NET_CLIENT_DRIVER_TAP,
754 .size = sizeof(TAPState),
755 .receive = tap_receive,
756 .cleanup = tap_cleanup,
757 .has_ufo = tap_has_ufo,
758 .has_vnet_hdr = tap_has_vnet_hdr,
759 .has_vnet_hdr_len = tap_has_vnet_hdr_len,
760 .using_vnet_hdr = tap_using_vnet_hdr,
761 .set_offload = tap_set_offload,

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

789}
790
791int net_init_tap(const Netdev *netdev, const char *name,
792 NetClientState *peer, Error **errp)
793{
794 /* FIXME error_setg(errp, ...) on failure */
795 const NetdevTapOptions *tap;
796
754 .size = sizeof(TAPState),
755 .receive = tap_receive,
756 .cleanup = tap_cleanup,
757 .has_ufo = tap_has_ufo,
758 .has_vnet_hdr = tap_has_vnet_hdr,
759 .has_vnet_hdr_len = tap_has_vnet_hdr_len,
760 .using_vnet_hdr = tap_using_vnet_hdr,
761 .set_offload = tap_set_offload,

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

789}
790
791int net_init_tap(const Netdev *netdev, const char *name,
792 NetClientState *peer, Error **errp)
793{
794 /* FIXME error_setg(errp, ...) on failure */
795 const NetdevTapOptions *tap;
796
797 assert(netdev->opts->type == NET_CLIENT_OPTIONS_KIND_TAP);
798 tap = netdev->opts->u.tap.data;
797 assert(netdev->type == NET_CLIENT_DRIVER_TAP);
798 tap = &netdev->u.tap;
799
800 if (!tap->has_ifname) {
801 error_report("tap: no interface name");
802 return -1;
803 }
804
805 if (tap_win32_init(peer, "tap", name, tap->ifname) == -1) {
806 return -1;

--- 14 unchanged lines hidden ---
799
800 if (!tap->has_ifname) {
801 error_report("tap: no interface name");
802 return -1;
803 }
804
805 if (tap_win32_init(peer, "tap", name, tap->ifname) == -1) {
806 return -1;

--- 14 unchanged lines hidden ---