get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/1.2/patches/2233256/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2233256,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/2233256/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/openvswitch/patch/20260505225239.2401918-6-i.maximets@ovn.org/",
    "project": {
        "id": 47,
        "url": "http://patchwork.ozlabs.org/api/1.2/projects/47/?format=api",
        "name": "Open vSwitch",
        "link_name": "openvswitch",
        "list_id": "ovs-dev.openvswitch.org",
        "list_email": "ovs-dev@openvswitch.org",
        "web_url": "http://openvswitch.org/",
        "scm_url": "git@github.com:openvswitch/ovs.git",
        "webscm_url": "https://github.com/openvswitch/ovs",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260505225239.2401918-6-i.maximets@ovn.org>",
    "list_archive_url": null,
    "date": "2026-05-05T22:52:14",
    "name": "[ovs-dev,5/5] treewide: Remove Windows support.",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "df01f153b4ecdc6d2905fb90cf55416a95e53cf4",
    "submitter": {
        "id": 76798,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/76798/?format=api",
        "name": "Ilya Maximets",
        "email": "i.maximets@ovn.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/openvswitch/patch/20260505225239.2401918-6-i.maximets@ovn.org/mbox/",
    "series": [
        {
            "id": 502908,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/502908/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/openvswitch/list/?series=502908",
            "date": "2026-05-05T22:52:10",
            "name": "Remove Windows support.",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/502908/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2233256/comments/",
    "check": "success",
    "checks": "http://patchwork.ozlabs.org/api/patches/2233256/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<ovs-dev-bounces@openvswitch.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "ovs-dev@openvswitch.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@legolas.ozlabs.org",
            "ovs-dev@lists.linuxfoundation.org"
        ],
        "Authentication-Results": [
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org\n (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)",
            "smtp1.osuosl.org;\n dmarc=none (p=none dis=none) header.from=ovn.org"
        ],
        "Received": [
            "from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g9DMv6SQWz1yJV\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 06 May 2026 08:54:03 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby smtp2.osuosl.org (Postfix) with ESMTP id 3BF5740515;\n\tTue,  5 May 2026 22:54:02 +0000 (UTC)",
            "from smtp2.osuosl.org ([127.0.0.1])\n by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id vBWewlVwq5ua; Tue,  5 May 2026 22:53:52 +0000 (UTC)",
            "from lists.linuxfoundation.org (lf-lists.osuosl.org\n [IPv6:2605:bc80:3010:104::8cd3:938])\n\tby smtp2.osuosl.org (Postfix) with ESMTPS id 75BB2404FC;\n\tTue,  5 May 2026 22:53:48 +0000 (UTC)",
            "from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id 0ACC3C04EE;\n\tTue,  5 May 2026 22:53:48 +0000 (UTC)",
            "from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138])\n by lists.linuxfoundation.org (Postfix) with ESMTP id 08DD2C04EE\n for <ovs-dev@openvswitch.org>; Tue,  5 May 2026 22:53:46 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by smtp1.osuosl.org (Postfix) with ESMTP id 960998107D\n for <ovs-dev@openvswitch.org>; Tue,  5 May 2026 22:53:21 +0000 (UTC)",
            "from smtp1.osuosl.org ([127.0.0.1])\n by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id Y_6N8UMPAIsn for <ovs-dev@openvswitch.org>;\n Tue,  5 May 2026 22:53:18 +0000 (UTC)",
            "from mail-wr1-f65.google.com (mail-wr1-f65.google.com\n [209.85.221.65])\n by smtp1.osuosl.org (Postfix) with ESMTPS id E8CE780F17\n for <ovs-dev@openvswitch.org>; Tue,  5 May 2026 22:53:17 +0000 (UTC)",
            "by mail-wr1-f65.google.com with SMTP id\n ffacd0b85a97d-43d76dd4ee8so4627573f8f.2\n for <ovs-dev@openvswitch.org>; Tue, 05 May 2026 15:53:17 -0700 (PDT)",
            "from im-t490s (37-48-40-237.nat.epc.tmcz.cz. [37.48.40.237])\n by smtp.gmail.com with ESMTPSA id\n ffacd0b85a97d-45055960811sm8060136f8f.27.2026.05.05.15.53.13\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 05 May 2026 15:53:13 -0700 (PDT)"
        ],
        "X-Virus-Scanned": [
            "amavis at osuosl.org",
            "amavis at osuosl.org"
        ],
        "X-Comment": "SPF check N/A for local connections -\n client-ip=2605:bc80:3010:104::8cd3:938; helo=lists.linuxfoundation.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN> ",
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 smtp2.osuosl.org 75BB2404FC",
            "OpenDKIM Filter v2.11.0 smtp1.osuosl.org E8CE780F17"
        ],
        "Received-SPF": "Pass (mailfrom) identity=mailfrom; client-ip=209.85.221.65;\n helo=mail-wr1-f65.google.com; envelope-from=i.maximets.ovn@gmail.com;\n receiver=<UNKNOWN>",
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 smtp1.osuosl.org E8CE780F17",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1778021596; x=1778626396;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=OLa3B8YwnOm3hYNpa9hGJGoUCaRlb8if5HJkt+evYZo=;\n b=Jlz2iGGbbfqw6rZiHY0bk3rM9lQRrTju0fjX3A3HTv4GMChRZt5lV3/5ngFcsdlFpq\n w7goBBE4FgRZ3+e3/FwVVeyZtOi9i5l6YH2zHQxk2JBmh2rhXmi6zmkeXyk32LBm16Kb\n wHpd2UjXc9av0LdU0EGLmStr8O4/zfMWdy/8JPcXxa9wF0TryOSiPXhE0bdUb8TW0zN6\n dTr1t9zVDu5D5acYU4yRZzEkgTLKMZ8lxVE37xw0iFgUiIIAdUwa7QxMHSAOQMZL7Yxo\n ZjNxJYYsRjKv7j7HiRuubOrSivNvACgqK86hI0wju3ildT++7Em6uXj+Cp6ihQS/bTGb\n Ud7A==",
        "X-Gm-Message-State": "AOJu0Yx8H11ieBx+dMq5xxk3Stky92gYwfubqRLYs4F4vDx3nCdbnGkb\n LUJ2LlOH7iPapmcpqhHLNBPxL5qbOYaAW5u9EqJVLykHqkS+f6HEUIoP6a8cylxY",
        "X-Gm-Gg": "AeBDieuvFjNNhxQKW5724wDZ663vX97QvFv41hPPN1CWBXZ6+PPr89A4+5JRrhIDMB2\n d/qiAQ68sKZc9WjgYtsyMnip6upgzKC8wpLO31l0gOcwhLLpFu691zqd4iD8pptMPC2G6VCSbUw\n uzC18uQagW++fE80XDWO0WbaxTYiDLGvUAWWB23DpT7pZk4G4xUrrbuoK4hvdegzvxR3zB26vBg\n 1TGhLHNPZZRF54ETWLWbXLeYAFFmcwib7cxDW9Pz46geiUIflAuaxJ8ME7jv3vW70on1S6xB1Cn\n ddP7RHNS+8FVQ316Y05X1Oye/jFKpoT5+CY4vOZSXzE9jgjFLGeMTjm9fqWpjzkS3g9E3y+3yGN\n U3q4Du+MY7a8thPRqMU8GHGrgbbLXJ4xlKz03KyXdLpKa41uMRZm4zAU1ewd/DkBNelj+bRKC+1\n /ByrUcNC1sQIVnVw2GEsgP5hfbloCjcnnEkTFDQGaz+KOMaMz8SL3cqhw=",
        "X-Received": "by 2002:a5d:5d89:0:b0:439:c18f:5aaf with SMTP id\n ffacd0b85a97d-4515d3dc466mr1680737f8f.34.1778021594699;\n Tue, 05 May 2026 15:53:14 -0700 (PDT)",
        "From": "Ilya Maximets <i.maximets@ovn.org>",
        "To": "ovs-dev@openvswitch.org",
        "Cc": "Ilya Maximets <i.maximets@ovn.org>",
        "Date": "Wed,  6 May 2026 00:52:14 +0200",
        "Message-ID": "<20260505225239.2401918-6-i.maximets@ovn.org>",
        "X-Mailer": "git-send-email 2.53.0",
        "In-Reply-To": "<20260505225239.2401918-1-i.maximets@ovn.org>",
        "References": "<20260505225239.2401918-1-i.maximets@ovn.org>",
        "MIME-Version": "1.0",
        "Subject": "[ovs-dev] [PATCH 5/5] treewide: Remove Windows support.",
        "X-BeenThere": "ovs-dev@openvswitch.org",
        "X-Mailman-Version": "2.1.30",
        "Precedence": "list",
        "List-Id": "<ovs-dev.openvswitch.org>",
        "List-Unsubscribe": "<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n <mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>",
        "List-Archive": "<http://mail.openvswitch.org/pipermail/ovs-dev/>",
        "List-Post": "<mailto:ovs-dev@openvswitch.org>",
        "List-Help": "<mailto:ovs-dev-request@openvswitch.org?subject=help>",
        "List-Subscribe": "<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n <mailto:ovs-dev-request@openvswitch.org?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "base64",
        "Errors-To": "ovs-dev-bounces@openvswitch.org",
        "Sender": "\"dev\" <ovs-dev-bounces@openvswitch.org>"
    },
    "content": "Windows support was deprecated in 3.7, it's time to remove it.\n\nWe already removed the installer and the datapath implementation.\nNow removing all the code related to talking to the Windows datapath,\nbuilding on Windows, using MSVC as a compiler, and the final bits of\ndocumentation related to Windows-specific behavior of certain features.\n\nIt is possible to split this change into smaller parts, but it will\nbe a non-trivial amount of work to keep the patches in a working state\nin the process.  So, just removing everything at once.  It would also\nbe easier to re-apply in case someone wants to resurrect this code or\nmaintain the Windows support in their own fork.\n\nA couple mentions of MSVC quirks are left in public headers as the\ncode is good enough and there is no real need to change the way it\nis written at the moment.\n\nSigned-off-by: Ilya Maximets <i.maximets@ovn.org>\n---\n .editorconfig                                 |   20 -\n Documentation/ref/ovs-appctl.8.rst            |   12 -\n Documentation/ref/ovsdb.7.rst                 |    9 -\n Makefile.am                                   |   22 +-\n NEWS                                          |    3 +-\n README.rst                                    |    9 -\n build-aux/automake.mk                         |    2 -\n build-aux/cccl                                |  229 ---\n build-aux/extract-odp-netlink-h               |    6 -\n build-aux/extract-odp-netlink-windows-dp-h    |   24 -\n build-aux/initial-tab-allowed-files           |    4 -\n configure.ac                                  |    5 +-\n debian/copyright.in                           |   55 -\n include/automake.mk                           |    1 -\n include/openvswitch/compiler.h                |   38 +-\n include/openvswitch/poll-loop.h               |   11 -\n include/openvswitch/vlog.h                    |    2 -\n include/windows/arpa/inet.h                   |    0\n include/windows/automake.mk                   |   42 -\n include/windows/dirent.h                      |    0\n include/windows/getopt.h                      |   62 -\n .../linux/netfilter/nf_conntrack_common.h     |    0\n .../linux/netfilter/nf_conntrack_ftp.h        |    0\n .../linux/netfilter/nf_conntrack_sctp.h       |    0\n .../linux/netfilter/nf_conntrack_tcp.h        |    0\n include/windows/linux/netfilter/nfnetlink.h   |    0\n .../linux/netfilter/nfnetlink_conntrack.h     |    0\n .../linux/netfilter/nfnetlink_cttimeout.h     |    0\n include/windows/linux/pkt_sched.h             |   26 -\n include/windows/linux/types.h                 |    0\n include/windows/net/if.h                      |   74 -\n include/windows/netdb.h                       |    0\n include/windows/netinet/icmp6.h               |  606 --------\n include/windows/netinet/in.h                  |   24 -\n include/windows/netinet/in_systm.h            |    0\n include/windows/netinet/ip.h                  |   26 -\n include/windows/netinet/ip6.h                 |  235 ---\n include/windows/netinet/tcp.h                 |    0\n include/windows/netpacket/packet.h            |   40 -\n include/windows/poll.h                        |    0\n include/windows/strings.h                     |    0\n include/windows/sys/epoll.h                   |   31 -\n include/windows/sys/ioctl.h                   |    0\n include/windows/sys/resource.h                |   53 -\n include/windows/sys/socket.h                  |   22 -\n include/windows/sys/time.h                    |    0\n include/windows/sys/uio.h                     |   22 -\n include/windows/sys/un.h                      |    0\n include/windows/sys/wait.h                    |    0\n include/windows/syslog.h                      |   62 -\n include/windows/unistd.h                      |  104 --\n include/windows/windefs.h                     |   50 -\n lib/automake.mk                               |   39 -\n lib/byte-order.h                              |    4 +-\n lib/daemon-unix.c                             |   19 -\n lib/daemon-windows.c                          |  555 -------\n lib/daemon.c                                  |   10 +-\n lib/daemon.h                                  |   82 +-\n lib/daemon.man                                |    3 -\n lib/daemon.xml                                |    5 -\n lib/dns-resolve.c                             |    6 +-\n lib/dpif-netdev-perf.h                        |    4 +-\n lib/dpif-netdev.c                             |    8 +-\n lib/dpif-netlink.c                            |  312 +---\n lib/dpif.c                                    |    2 +-\n lib/entropy.c                                 |   17 -\n lib/fatal-signal.c                            |   60 -\n lib/fatal-signal.h                            |    4 -\n lib/getopt_long.c                             |  459 ------\n lib/getrusage-windows.c                       |   78 -\n lib/if-notifier-stub.c                        |   41 -\n lib/latch-windows.c                           |   83 --\n lib/latch.h                                   |    5 -\n lib/lldp/lldpd.c                              |    4 -\n lib/lockfile.c                                |   73 -\n lib/netdev-provider.h                         |    2 -\n lib/netdev-vport.h                            |    5 +-\n lib/netdev-windows.c                          |  517 -------\n lib/netdev.c                                  |   10 -\n lib/netdev.h                                  |    2 -\n lib/netlink-conntrack.c                       |   28 -\n lib/netlink-socket.c                          |  615 +-------\n lib/netlink-socket.h                          |   17 -\n lib/ovs-atomic-msvc.h                         |  462 ------\n lib/ovs-atomic.h                              |    2 -\n lib/ovs-lldp.c                                |    4 -\n lib/ovs-rcu.c                                 |    7 +-\n lib/ovs-thread.c                              |   28 +-\n lib/ovs-thread.h                              |    4 -\n lib/poll-loop.c                               |   69 +-\n lib/process.c                                 |   23 -\n lib/rconn.c                                   |    9 +-\n lib/route-table-stub.c                        |   50 -\n lib/service-syn.man                           |    3 -\n lib/service.man                               |   12 -\n lib/sflow.h                                   |    4 -\n lib/socket-util.c                             |   60 +-\n lib/socket-util.h                             |   34 -\n lib/stdio.c                                   |   60 -\n lib/stdio.h.in                                |   46 -\n lib/stream-fd.c                               |   15 -\n lib/stream-fd.h                               |    3 -\n lib/stream-provider.h                         |    5 -\n lib/stream-ssl.c                              |   28 +-\n lib/stream-windows.c                          |  704 ---------\n lib/stream.c                                  |   10 -\n lib/string.c                                  |   16 -\n lib/string.h.in                               |    8 -\n lib/strsep.c                                  |   73 -\n lib/timeval.c                                 |   88 --\n lib/timeval.h                                 |    5 -\n lib/unixctl.c                                 |   22 +-\n lib/unixctl.man                               |    6 -\n lib/unixctl.xml                               |    8 -\n lib/util.c                                    |  134 +-\n lib/util.h                                    |   62 +-\n lib/uuid.c                                    |    2 -\n lib/vconn-active.man                          |    4 -\n lib/vlog-unixctl.man                          |    4 -\n lib/vlog.c                                    |    2 -\n lib/vlog.man                                  |    4 -\n lib/vlog.xml                                  |    6 -\n lib/wmi.c                                     | 1272 -----------------\n lib/wmi.h                                     |   51 -\n m4/ax_check_openssl.m4                        |   10 +-\n m4/openvswitch.m4                             |   71 -\n ofproto/automake.mk                           |    3 -\n ovsdb/log.c                                   |   90 +-\n ovsdb/ovsdb-client.c                          |   17 -\n ovsdb/ovsdb-server.1.in                       |    5 -\n ovsdb/ovsdb-server.c                          |    9 -\n ovsdb/ovsdb-tool.c                            |    3 -\n python/automake.mk                            |    4 +-\n python/ovs/daemon.py                          |  194 +--\n python/ovs/dns_resolve.py                     |    2 +-\n python/ovs/fatal_signal.py                    |   31 +-\n python/ovs/fcntl_win.py                       |   46 -\n python/ovs/jsonrpc.py                         |    6 -\n python/ovs/poller.py                          |   83 +-\n python/ovs/socket_util.py                     |   22 +-\n python/ovs/stream.py                          |  322 +----\n python/ovs/unixctl/__init__.py                |    9 +-\n python/ovs/unixctl/server.py                  |   15 +-\n python/ovs/util.py                            |    6 +-\n python/ovs/vlog.py                            |   26 +-\n python/ovs/winutils.py                        |  266 ----\n python/setup.py.template                      |    5 +-\n tests/atlocal.in                              |   15 -\n tests/automake.mk                             |   19 +-\n tests/bridge.at                               |    3 -\n tests/daemon-py.at                            |   16 -\n tests/daemon.at                               |   52 +-\n tests/file_name.at                            |    2 -\n tests/library.at                              |   14 +-\n tests/lockfile.at                             |   14 +-\n tests/ofproto-dpif.at                         |    7 +-\n tests/ovs-macros.at                           |   38 -\n tests/ovs-vsctl.at                            |   31 +-\n tests/ovs-vswitchd.at                         |   17 +-\n tests/ovsdb-idl.at                            |    5 -\n tests/ovsdb-lock.at                           |    1 -\n tests/ovsdb-log.at                            |   62 +-\n tests/ovsdb-monitor.at                        |   10 +-\n tests/ovsdb-server.at                         |   98 +-\n tests/ovsdb-tool.at                           |   22 +-\n tests/pfd-stream.at                           |    8 -\n tests/system-kmod-macros.at                   |    7 +-\n tests/test-byteq.c                            |    2 -\n tests/test-daemon.py                          |    5 +-\n tests/test-jsonrpc.c                          |    1 -\n tests/test-jsonrpc.py                         |   16 +-\n tests/test-lockfile.c                         |    6 -\n tests/test-netflow.c                          |    1 -\n tests/test-ovsdb.c                            |    8 +-\n tests/test-rculist.c                          |    4 -\n tests/test-sflow.c                            |    1 -\n tests/test-stopwatch.c                        |    2 -\n tests/test-unixctl.c                          |    2 -\n tests/test-util.c                             |   11 +-\n tests/test-vconn.c                            |   12 +-\n tests/testsuite.patch                         |   76 -\n tests/tunnel.at                               |    6 -\n tests/unixctl-py.at                           |   11 +-\n tests/vlog.at                                 |    6 -\n utilities/checkpatch.py                       |    2 +-\n utilities/ovs-appctl.c                        |    7 -\n utilities/ovs-dpctl.8.in                      |    9 +-\n utilities/ovs-ofctl.c                         |    1 -\n utilities/ovs-pki.in                          |   79 +-\n utilities/ovs-testcontroller.c                |    1 -\n utilities/ovs-vsctl.8.in                      |    2 +-\n utilities/ovs-vsctl.c                         |   12 +-\n vswitchd/ovs-vswitchd.8.in                    |    2 -\n vswitchd/ovs-vswitchd.c                       |    5 -\n vswitchd/system-stats.c                       |    9 -\n vtep/ovs-vtep.in                              |    5 +-\n 196 files changed, 250 insertions(+), 10149 deletions(-)\n delete mode 100644 build-aux/cccl\n delete mode 100755 build-aux/extract-odp-netlink-windows-dp-h\n delete mode 100644 include/windows/arpa/inet.h\n delete mode 100644 include/windows/automake.mk\n delete mode 100644 include/windows/dirent.h\n delete mode 100644 include/windows/getopt.h\n delete mode 100644 include/windows/linux/netfilter/nf_conntrack_common.h\n delete mode 100644 include/windows/linux/netfilter/nf_conntrack_ftp.h\n delete mode 100644 include/windows/linux/netfilter/nf_conntrack_sctp.h\n delete mode 100644 include/windows/linux/netfilter/nf_conntrack_tcp.h\n delete mode 100644 include/windows/linux/netfilter/nfnetlink.h\n delete mode 100644 include/windows/linux/netfilter/nfnetlink_conntrack.h\n delete mode 100644 include/windows/linux/netfilter/nfnetlink_cttimeout.h\n delete mode 100644 include/windows/linux/pkt_sched.h\n delete mode 100644 include/windows/linux/types.h\n delete mode 100644 include/windows/net/if.h\n delete mode 100644 include/windows/netdb.h\n delete mode 100644 include/windows/netinet/icmp6.h\n delete mode 100644 include/windows/netinet/in.h\n delete mode 100644 include/windows/netinet/in_systm.h\n delete mode 100644 include/windows/netinet/ip.h\n delete mode 100644 include/windows/netinet/ip6.h\n delete mode 100644 include/windows/netinet/tcp.h\n delete mode 100644 include/windows/netpacket/packet.h\n delete mode 100644 include/windows/poll.h\n delete mode 100644 include/windows/strings.h\n delete mode 100644 include/windows/sys/epoll.h\n delete mode 100644 include/windows/sys/ioctl.h\n delete mode 100644 include/windows/sys/resource.h\n delete mode 100644 include/windows/sys/socket.h\n delete mode 100644 include/windows/sys/time.h\n delete mode 100644 include/windows/sys/uio.h\n delete mode 100644 include/windows/sys/un.h\n delete mode 100644 include/windows/sys/wait.h\n delete mode 100644 include/windows/syslog.h\n delete mode 100644 include/windows/unistd.h\n delete mode 100644 include/windows/windefs.h\n delete mode 100644 lib/daemon-windows.c\n delete mode 100644 lib/getopt_long.c\n delete mode 100644 lib/getrusage-windows.c\n delete mode 100644 lib/if-notifier-stub.c\n delete mode 100644 lib/latch-windows.c\n delete mode 100644 lib/netdev-windows.c\n delete mode 100644 lib/ovs-atomic-msvc.h\n delete mode 100644 lib/route-table-stub.c\n delete mode 100644 lib/service-syn.man\n delete mode 100644 lib/service.man\n delete mode 100644 lib/stdio.c\n delete mode 100644 lib/stdio.h.in\n delete mode 100644 lib/stream-windows.c\n delete mode 100644 lib/strsep.c\n delete mode 100644 lib/wmi.c\n delete mode 100644 lib/wmi.h\n delete mode 100644 python/ovs/fcntl_win.py\n delete mode 100644 python/ovs/winutils.py\n delete mode 100644 tests/testsuite.patch",
    "diff": "diff --git a/.editorconfig b/.editorconfig\nindex 41ba51bf3..3c275006e 100644\n--- a/.editorconfig\n+++ b/.editorconfig\n@@ -25,27 +25,7 @@ tab_width = 8\n indent_style = tab\n tab_width = 8\n \n-[include/windows/getopt.h]\n-indent_style = tab\n-indent_size = tab\n-tab_width = 8\n-\n-[include/windows/netinet/{icmp6,ip6}.h]\n-indent_style = tab\n-indent_size = tab\n-tab_width = 8\n-\n-[lib/getopt_long.c]\n-indent_style = tab\n-indent_size = tab\n-tab_width = 8\n-\n [lib/sflow*.{c,h}]\n indent_style = tab\n indent_size = tab\n tab_width = 8\n-\n-[lib/strsep.c]\n-indent_style = tab\n-indent_size = tab\n-tab_width = 8\ndiff --git a/Documentation/ref/ovs-appctl.8.rst b/Documentation/ref/ovs-appctl.8.rst\nindex e7c8b96d4..54327db22 100644\n--- a/Documentation/ref/ovs-appctl.8.rst\n+++ b/Documentation/ref/ovs-appctl.8.rst\n@@ -54,14 +54,6 @@ In normal use only a single option is accepted:\n   from the pidfile, and uses that file as if it had been specified\n   directly as the target.\n \n-  On Windows, *target* can be an absolute path to a file that contains a\n-  localhost TCP port on which an Open vSwitch daemon is listening for\n-  control channel connections. By default, each daemon writes the TCP\n-  port on which it is listening for control connection into the file\n-  ``<program>.ctl`` located inside the rundir. If *target* is not an\n-  absolute path, ``ovs-appctl`` looks in the rundir for a file named\n-  *target*\\ ``.ctl``.  The default *target* is ``ovs-vswitchd``.\n-\n * ``-T`` *secs* or ``--timeout=``\\ *secs*\n \n   By default, or with a *secs* of ``0``, ``ovs-appctl`` waits forever to\n@@ -173,10 +165,6 @@ and adjusting log levels:\n     change to only to the system log, to the console, or to a file,\n     respectively.\n \n-    On Windows platform, ``syslog`` is only useful if *target* was\n-    started with the ``--syslog-target`` option (it has no effect\n-    otherwise).\n-\n   * ``off``, ``emer``, ``err``, ``warn``, ``info``, or ``dbg``, to\n     control the log level.  Messages of the given severity or higher\n     will be logged, and messages of lower severity will be filtered out.\ndiff --git a/Documentation/ref/ovsdb.7.rst b/Documentation/ref/ovsdb.7.rst\nindex cf1ef3736..b8a76a83d 100644\n--- a/Documentation/ref/ovsdb.7.rst\n+++ b/Documentation/ref/ovsdb.7.rst\n@@ -674,9 +674,6 @@ unix:<file>\n     On Unix-like systems, connect to the Unix domain server socket named\n     <file>.\n \n-    On Windows, connect to a local named pipe that is represented by a file\n-    created in the path <file> to mimic the behavior of a Unix domain socket.\n-\n <method1>,<method2>,...,<methodN>\n     For a clustered database service to be highly available, a client must be\n     able to connect to any of the servers in the cluster.  To do so, specify\n@@ -705,10 +702,6 @@ punix:<file>\n     On Unix-like systems, listens for connections on the Unix domain socket\n     named <file>.\n \n-    On Windows, listens on a local named pipe, creating a named pipe\n-    <file> to mimic the behavior of a Unix domain socket. The ACLs of the named\n-    pipe include LocalSystem, Administrators, and Creator Owner.\n-\n pfd:<fd>\n     Listen on a pre-opened file descriptor <fd>.  The file descriptor must\n     refer to a bound, listening Unix domain stream socket.  This is intended\n@@ -719,8 +712,6 @@ pfd:<fd>\n     (``--remote=pfd:<fd>``).  It is rejected if added at runtime via\n     ``ovsdb-server/add-remote`` or through the database.\n \n-    This connection method is not supported on Windows.\n-\n All IP-based connection methods accept IPv4 and IPv6 addresses.  To specify an\n IPv6 address, wrap it in square brackets, e.g.  ``ssl:[::1]:6640``.  Passive\n IP-based connection methods by default listen for IPv4 connections only; use\ndiff --git a/Makefile.am b/Makefile.am\nindex 43cffbd72..65597f9dc 100644\n--- a/Makefile.am\n+++ b/Makefile.am\n@@ -14,15 +14,6 @@ AM_CPPFLAGS = $(SSL_CFLAGS)\n AM_LDFLAGS = $(SSL_LDFLAGS)\n AM_LDFLAGS += $(OVS_LDFLAGS)\n \n-if WIN32\n-AM_CPPFLAGS += -I $(top_srcdir)/include/windows\n-AM_CPPFLAGS += $(PTHREAD_INCLUDES)\n-AM_CPPFLAGS += $(MSVC_CFLAGS)\n-AM_LDFLAGS += $(PTHREAD_LDFLAGS)\n-AM_LDFLAGS += $(MSVC64_LDFLAGS)\n-PLATFORM = $(MSVC_PLATFORM)\n-endif\n-\n AM_CPPFLAGS += -I $(top_srcdir)/include\n AM_CPPFLAGS += -I $(top_builddir)/include\n AM_CPPFLAGS += -I $(top_srcdir)/lib\n@@ -48,18 +39,13 @@ endif\n \n AM_CTAGSFLAGS = -I \"$(OVS_CTAGS_IDENTIFIERS_LIST)\"\n \n-if WIN32\n-psep=\";\"\n-else\n-psep=\":\"\n-endif\n # PYTHONDONTWRITEBYTECODE=yes keeps Python from creating .pyc and .pyo\n # files.  Creating .py[co] works OK for any given version of Open\n # vSwitch, but it causes trouble if you switch from a version with\n # foo/__init__.py into an (older) version with plain foo.py, since\n # foo/__init__.pyc will cause Python to ignore foo.py.\n run_python = \\\n-\tPYTHONPATH=$(top_srcdir)/python$(psep)$$PYTHONPATH \\\n+\tPYTHONPATH=$(top_srcdir)/python:$$PYTHONPATH \\\n \tPYTHONDONTWRITEBYTECODE=yes $(PYTHON3)\n \n ALL_LOCAL =\n@@ -146,7 +132,7 @@ ro_shell = printf '\\043 Generated automatically -- do not modify!    -*- buffer-\n \n SUFFIXES += .in\n .in:\n-\t$(AM_V_GEN)PYTHONPATH=$$PYTHONPATH$(psep)$(srcdir)/python $(PYTHON3) $(srcdir)/build-aux/soexpand.py -I$(srcdir) < $< | \\\n+\t$(AM_V_GEN)PYTHONPATH=$$PYTHONPATH:$(srcdir)/python $(PYTHON3) $(srcdir)/build-aux/soexpand.py -I$(srcdir) < $< | \\\n \t  $(PYTHON3) $(srcdir)/build-aux/dpdkstrip.py $(DPDKSTRIP_FLAGS) | \\\n \t  sed \\\n \t    -e 's,[@]PKIDIR[@],$(PKIDIR),g' \\\n@@ -246,7 +232,7 @@ config-h-check:\n \tfi\n .PHONY: config-h-check\n \n-# Check for printf() type modifiers that MSVC doesn't support.\n+# Check for printf() type modifiers.\n ALL_LOCAL += printf-check\n printf-check:\n \t@cd $(srcdir); \\\n@@ -410,7 +396,7 @@ CLEANFILES += flake8-check\n \n -include manpages.mk\n manpages.mk: $(MAN_ROOTS) build-aux/sodepends.py python/ovs_build_helpers/soutil.py\n-\t@PYTHONPATH=$$PYTHONPATH$(psep)$(srcdir)/python $(PYTHON3) $(srcdir)/build-aux/sodepends.py -I. -I$(srcdir) $(MAN_ROOTS) >$(@F).tmp\n+\t@PYTHONPATH=$$PYTHONPATH:$(srcdir)/python $(PYTHON3) $(srcdir)/build-aux/sodepends.py -I. -I$(srcdir) $(MAN_ROOTS) >$(@F).tmp\n \t@if cmp -s $(@F).tmp $@; then \\\n \t  touch $@; \\\n \t  rm -f $(@F).tmp; \\\ndiff --git a/NEWS b/NEWS\nindex 260f0a561..26796f45a 100644\n--- a/NEWS\n+++ b/NEWS\n@@ -5,7 +5,8 @@ Post-v3.7.0\n        timer can be configured with 'tnl/neigh/retrans_time'.\n    - Windows:\n      * The previously deprecated Windows kernel datapath implementation is\n-       now fully removed.\n+       now fully removed as well as support for running or building userspace\n+       components of Open vSwitch on the Windows platform.\n \n \n v3.7.0 - 16 Feb 2026\ndiff --git a/README.rst b/README.rst\nindex 186d21d07..f55ecc674 100644\n--- a/README.rst\n+++ b/README.rst\n@@ -105,18 +105,9 @@ that license applies to the file in question.\n Files under the datapath directory are licensed under the GNU General Public\n License, version 2.\n \n-File build-aux/cccl is licensed under the GNU General Public License, version 2.\n-\n The following files are licensed under the 2-clause BSD license.\n-    include/windows/getopt.h\n-    lib/getopt_long.c\n     lib/conntrack-tcp.c\n \n-The following files are licensed under the 3-clause BSD-license\n-    include/windows/netinet/icmp6.h\n-    include/windows/netinet/ip6.h\n-    lib/strsep.c\n-\n Files lib/sflow*.[ch] are licensed under the terms of either the\n Sun Industry Standards Source License 1.1, that is available at:\n         http://host-sflow.sourceforge.net/sissl.html\ndiff --git a/build-aux/automake.mk b/build-aux/automake.mk\nindex d65b6da6c..675bba8de 100644\n--- a/build-aux/automake.mk\n+++ b/build-aux/automake.mk\n@@ -1,13 +1,11 @@\n EXTRA_DIST += \\\n \tbuild-aux/calculate-schema-cksum \\\n-\tbuild-aux/cccl \\\n \tbuild-aux/check-structs \\\n \tbuild-aux/cksum-schema-check \\\n \tbuild-aux/dist-docs \\\n \tbuild-aux/dpdkstrip.py \\\n \tbuild-aux/extract-odp-netlink-h \\\n \tbuild-aux/extract-odp-netlink-macros-h \\\n-\tbuild-aux/extract-odp-netlink-windows-dp-h \\\n \tbuild-aux/extract-ofp-actions \\\n \tbuild-aux/extract-ofp-errors \\\n \tbuild-aux/extract-ofp-fields \\\ndiff --git a/build-aux/cccl b/build-aux/cccl\ndeleted file mode 100644\nindex 855d24c6c..000000000\n--- a/build-aux/cccl\n+++ /dev/null\n@@ -1,229 +0,0 @@\n-#!/bin/sh\n-\n-# cccl\n-# Wrapper around MS's cl.exe and link.exe to make them act more like\n-# Unix cc and ld\n-#\n-# Copyright (C) 2000-2003 Geoffrey Wossum (gwossum@acm.org)\n-#\n-# This program is free software; you can redistribute it and/or modify\n-# it under the terms of the GNU General Public License as published by\n-# the Free Software Foundation; either version 2 of the License, or\n-# (at your option) any later version.\n-#\n-# This program is distributed in the hope that it will be useful, but\n-# WITHOUT ANY WARRANTY; without even the implied warranty of\n-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.    See the GNU\n-# General Public License for more details.\n-#\n-# You should have received a copy of the GNU General Public License\n-# along with this program; if not, write to the Free Software\n-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n-#\n-\n-usage()\n-{\n-    cat <<EOF\n-Usage: cccl [OPTIONS]\n-\n-cccl is a wrapper around Microsoft's cl.exe and link.exe.  It translates\n-parameters that Unix cc's and ld's understand to parameters that cl and link\n-understand.\n-EOF\n-    exit $1\n-}\n-\n-\n-\n-# Check for MSYS which now reports itself as cygwin in MACHTYPE\n-if [[ -n \"$MSYSTEM\" ]]; then\n-    slash=\"-\"\n-else\n-    # fallback to old behavior\n-    case $MACHTYPE in\n-        *-msys)\n-            slash=\"-\"\n-            ;;\n-        *)\n-            slash=\"/\"\n-            ;;\n-    esac\n-fi\n-# prog specifies the program that should be run (cl.exe or link.exe)\n-# We'll assume cl to start out\n-prog=cl\n-# opts specifies the command line to pass to the MSVC program\n-clopt=\"${slash}nologo ${slash}FS\"\n-linkopt=\"${slash}nologo\"\n-# gotparam is 0 if we didn't ever see a param, in which case we show usage()\n-gotparam=\n-\n-# We want exceptions\n-clopt=\"$clopt ${slash}EHsc\"\n-\n-### Run through every option and convert it to the proper MS one\n-while test $# -gt 0; do\n-    case \"$1\" in\n-    -D*) optarg= ;;\n-    -*=*) optarg=`echo \"$1\" | sed 's/[-_a-zA-Z0-9]*=//'` ;;\n-    *) optarg= ;;\n-    esac\n-    gotparam=1\n-\n-    case \"$1\" in\n-    --version)\n-        cat <<EOF\n-cccl 0.03\n-\n-Copyright 2000-2003 Geoffrey Wossum\n-This is free software; see the source for copying conditions.  There is NO\n-waranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n-EOF\n-        exit 1;\n-        ;;\n-\n-    -ansi)\n-        clopt=\"$clopt ${slash}Za\"\n-        ;;\n-\n-    -c)\n-        # -c (compile only) is actually the same, but for clarity...\n-        clopt=\"$clopt ${slash}c\"\n-        ;;\n-\n-    -g[0-9] | -g)\n-        # cl only supports one debugging level\n-        clopt=\"$clopt ${slash}Zi\"\n-        linkopt=\"$linkopt ${slash}DEBUG\"\n-        ;;\n-\n-    -O0)\n-        clopt=\"$clopt ${slash}Od ${slash}D_DEBUG ${slash}MTd\"\n-        ;;\n-\n-    -O2)\n-        clopt=\"$clopt ${slash}O2 ${slash}MT\"\n-        ;;\n-\n-    -L*)\n-        path=`echo \"$1\" | sed 's/-L//'`\n-        linkopt=\"$linkopt ${slash}LIBPATH:$path\"\n-        cl_linkopt=\"${slash}link ${slash}LIBPATH:\\\"$path\\\"\"\n-        ;;\n-\n-    -l*)\n-        lib=`echo \"$1\" | sed 's/-l//'`\n-        lib=\"$lib.lib\"\n-\n-        clopt=\"$clopt $lib\"\n-        linkopt=\"$linkopt $lib\"\n-        ;;\n-\n-    -m386)\n-        clopt=\"$clopt ${slash}G3\"\n-        ;;\n-\n-    -m486)\n-        clopt=\"$clopt ${slash}G4\"\n-        ;;\n-\n-    -mpentium)\n-        clopt=\"$clopt ${slash}G5\"\n-        ;;\n-\n-    -mpentiumpro)\n-        clopt=\"$clopt ${slash}G6\"\n-        ;;\n-\n-    -o)\n-        # specifying output file, is it an object or an executable\n-        shift\n-        case \"$1\" in\n-        *.o | *.obj)\n-            clopt=\"$clopt ${slash}Fo$1\"\n-        ;;\n-        *)\n-            clopt=\"$clopt ${slash}Fe$1\";\n-            linkopt=\"$linkopt ${slash}out:$1\"\n-        ;;\n-        esac;;\n-\n-    -pedantic)\n-        #ignore pedantic\n-        ;;\n-\n-    -Wall)\n-        # not all warnings are implemented\n-        # the following is equivalent to\n-        # Wimplicit-function-declaration but we will issue a compiler\n-        # error\n-        clopt=\"$clopt ${slash}we4013\"\n-        ;;\n-\n-    -W*)\n-        #ignore warnings\n-        ;;\n-\n-    -Q*)\n-        #ignore link warnings\n-        ;;\n-\n-    -fno-strict-aliasing*)\n-        #ignore aliasing\n-        ;;\n-\n-    -isystem)\n-        shift\n-        clopt=\"$clopt -I$1\"\n-        ;;\n-\n-    -MT)\n-        exit 0\n-        ;;\n-\n-    -mno-cygwin)\n-        ;;\n-\n-    *.cc | *.cxx | *.C)\n-        # C++ source file with non .cpp extension, make sure cl understand\n-        # that it is C++\n-        clopt=\"$clopt ${slash}Tp$1\"\n-        ;;\n-\n-    *.o | *.obj | *.a | *.lib)\n-        # Object files/libraries seen, this command will require link\n-        # Switch the prog to link\n-        linkopt=\"$linkopt $1\"\n-        prog=\"link\"\n-        ;;\n-\n-    *)\n-        clopt=\"$clopt $1\"\n-        linkopt=\"$linkopt $1\"\n-        if test x$optarg != x ; then\n-            clopt=\"$clopt=$optarg\"\n-            linkopt=\"$linkopt=$optarg\"\n-        fi\n-        ;;\n-\n-    esac\n-    shift\n-done\n-\n-if test x$gotparam = x ; then\n-    usage\n-    exit 1\n-fi\n-\n-# choose which opts we built up based on which program will actually run\n-if test x$prog = xcl ; then\n-    opts=\"$clopt $cl_linkopt\"\n-else\n-    opts=$linkopt\n-fi\n-\n-if test x$V = x1 ; then\n-    echo \"$prog $opts\"\n-fi\n-exec $prog $opts\n-exit 0\ndiff --git a/build-aux/extract-odp-netlink-h b/build-aux/extract-odp-netlink-h\nindex bc1cc35a7..9e884e4f7 100755\n--- a/build-aux/extract-odp-netlink-h\n+++ b/build-aux/extract-odp-netlink-h\n@@ -14,13 +14,7 @@\n # Avoid using reserved names in header guards.\n s/_LINUX_OPENVSWITCH_H/ODP_NETLINK_H/\n \n-# Include platform extensions header file on Win32.\n $i\\\n-#ifdef _WIN32\\\n-#include \"OvsDpInterfaceExt.h\"\\\n-#include \"OvsDpInterfaceCtExt.h\"\\\n-#endif\\\n-\\\n /* IPCT_* enums may not be defined in all platforms, so do not use them. */\\\n #define OVS_CT_EVENT_NEW\t(1 << 0)   /* 1 << IPCT_NEW */\\\n #define OVS_CT_EVENT_RELATED\t(1 << 1)   /* 1 << IPCT_RELATED */\\\ndiff --git a/build-aux/extract-odp-netlink-windows-dp-h b/build-aux/extract-odp-netlink-windows-dp-h\ndeleted file mode 100755\nindex f2d9f0748..000000000\n--- a/build-aux/extract-odp-netlink-windows-dp-h\n+++ /dev/null\n@@ -1,24 +0,0 @@\n-# This is a \"sed\" script that transforms <linux/openvswitch.h> into a\n-# form that is suitable for inclusion within the Open vSwitch tree on\n-# windows system. The transformed header file can be included by windows\n-# driver modules.\n-\n-# Add a header warning that this is a generated file.\n-1i\\\n-/* -*- mode: c; buffer-read-only: t -*- */\\\n-/* Generated automatically from <linux/openvswitch.h> -- do not modify! */\\\n-\\\n-\\\n-\n-# Avoid using reserved names in header guards.\n-s/_LINUX_OPENVSWITCH_H/__OVS_DP_INTERFACE_H_/\n-\n-# and use the appropriate userspace header.\n-s,<linux/types\\.h>,\"Types.h\",\n-\n-# Add ETH_ADDR_LEN macro to avoid including userspace packet.h\n-s,#include <linux/if_ether\\.h>,\\n#ifndef ETH_ADDR_LEN \\\n-#define ETH_ADDR_LEN  6 \\n#endif,\n-\n-# Use OVS's own ETH_ADDR_LEN instead of Linux-specific ETH_ALEN.\n-s/ETH_ALEN/ETH_ADDR_LEN/\ndiff --git a/build-aux/initial-tab-allowed-files b/build-aux/initial-tab-allowed-files\nindex 1b0f81f8f..fa8011c56 100644\n--- a/build-aux/initial-tab-allowed-files\n+++ b/build-aux/initial-tab-allowed-files\n@@ -5,12 +5,8 @@\n \\.sln$\n ^include/linux/\n ^include/sparse/rte_\n-^include/windows/\n ^lib/sflow\n-^lib/getopt_long\\.c$\n-^lib/strsep\\.c$\n ^third-party/\n-^windows/\n ^debian/README.Debian$\n ^debian/copyright.in$\n ^debian/openvswitch-switch.init$\ndiff --git a/configure.ac b/configure.ac\nindex 1da99d8d5..79d30c9f4 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -87,8 +87,6 @@ AC_SEARCH_LIBS([pthread_spin_lock], [pthread])\n AC_CHECK_FUNCS([pthread_spin_lock])\n AC_FUNC_STRERROR_R\n \n-OVS_CHECK_WIN64\n-OVS_CHECK_WIN32\n OVS_CHECK_COVERAGE\n OVS_CHECK_NDEBUG\n OVS_CHECK_USDT\n@@ -144,9 +142,8 @@ AX_FUNC_POSIX_MEMALIGN\n OVS_CHECK_UNBOUND\n OVS_CHECK_UNWIND\n \n-OVS_CHECK_INCLUDE_NEXT([stdio.h string.h])\n+OVS_CHECK_INCLUDE_NEXT([string.h])\n AC_CONFIG_FILES([\n-    lib/stdio.h\n     lib/string.h\n     ovsdb/libovsdb.sym\n     ofproto/libofproto.sym\ndiff --git a/debian/copyright.in b/debian/copyright.in\nindex cf7213935..7c47909fa 100644\n--- a/debian/copyright.in\n+++ b/debian/copyright.in\n@@ -73,25 +73,12 @@ Copyright: (c) 2007-2019 Nicira, Inc.\n            (c) Zmanda Inc. <http://www.zmanda.com/>\n License: Apache-2.0\n \n-Files:\n- include/windows/netinet/icmp6.h\n- include/windows/netinet/ip6.h\n- lib/strsep.c\n-Copyright: (c) 1990,1993, The Regents of the University of California\n-License: BSD-3-clause\n-\n Files:\n  include/linux/openvswitch.h\n Copyright: (c) 2007-2017 Nicira, Inc.\n License: Apache-2.0-or-GPL-2.0\n \n Files:\n- build-aux/cccl\n-Copyright: (C) 2000-2003 Geoffrey Wossum <gwossum@acm.org>\n-License: GPL-2\n-\n-Files: lib/getopt_long.c\n- include/windows/getopt.h\n  lib/conntrack-tcp.c\n Copyright: (c) 2001 Daniel Hartmeier\n  (c) 2002 - 2008 Henning Brauer\n@@ -637,48 +624,6 @@ License: Sun-Industry-Standard-or-InMon-sFlow-License\n  URL:   www.inmon.com\n  Email: info@inmon.com\n \n-License: BSD-3-clause\n- Redistribution and use in source and binary forms, with or without\n- modification, are permitted provided that the following conditions\n- are met:\n- 1. Redistributions of source code must retain the above copyright\n-    notice, this list of conditions and the following disclaimer.\n- 2. Redistributions in binary form must reproduce the above copyright\n-    notice, this list of conditions and the following disclaimer in the\n-    documentation and/or other materials provided with the distribution.\n- 3. Neither the name of the University nor the names of its contributors\n-    may be used to endorse or promote products derived from this software\n-    without specific prior written permission.\n- .\n- THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n- ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n- OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n- SUCH DAMAGE.\n-\n-License: GPL-2\n- This program is free software; you can redistribute it and/or modify it under\n- the terms of the GNU General Public License as published by the Free Software\n- Foundation; either version 2 of the License, or (at your option) any later\n- version.\n- .\n- This program is distributed in the hope that it will be useful, but WITHOUT\n- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n- .\n- You should have received a copy of the GNU General Public License along with\n- this program; if not, write to the Free Software Foundation, Inc., 51 Franklin\n- St, Fifth Floor, Boston, MA 02110-1301 USA\n- .\n- On Debian systems, the complete text of the GNU General Public License v2\n- (GPL) can be found in /usr/share/common-licenses/GPL-2.\n-\n License: Apache-2.0-or-GPL-2.0\n  This file is offered under your choice of two licenses: Apache 2.0 or GNU\n  GPL 2.0 or later.  The permission statements for each of these licenses is\ndiff --git a/include/automake.mk b/include/automake.mk\nindex a276c680b..9da0ddd47 100644\n--- a/include/automake.mk\n+++ b/include/automake.mk\n@@ -13,5 +13,4 @@ CLEANFILES += include/odp-netlink.h include/odp-netlink-macros.h\n include include/openflow/automake.mk\n include include/openvswitch/automake.mk\n include include/sparse/automake.mk\n-include include/windows/automake.mk\n include include/linux/automake.mk\ndiff --git a/include/openvswitch/compiler.h b/include/openvswitch/compiler.h\nindex 7dee9ec7a..c56874232 100644\n--- a/include/openvswitch/compiler.h\n+++ b/include/openvswitch/compiler.h\n@@ -30,12 +30,10 @@\n   #define __has_attribute(x) 0\n #endif\n \n-/* To make OVS_NO_RETURN portable across gcc/clang and MSVC, it should be\n+/* To make OVS_NO_RETURN portable across gcc/clang, it should be\n  * added at the beginning of the function declaration. */\n #if __GNUC__ && !__CHECKER__\n #define OVS_NO_RETURN __attribute__((__noreturn__))\n-#elif _MSC_VER\n-#define OVS_NO_RETURN __declspec(noreturn)\n #else\n #define OVS_NO_RETURN\n #endif\n@@ -212,11 +210,7 @@\n #define OVS_PACKED_ENUM\n #endif\n \n-#ifndef _MSC_VER\n #define OVS_PACKED(DECL) DECL __attribute__((__packed__))\n-#else\n-#define OVS_PACKED(DECL) __pragma(pack(push, 1)) DECL __pragma(pack(pop))\n-#endif\n \n /* OVS_ALIGNED_STRUCT may be used to define a structure whose instances should\n  * aligned on an N-byte boundary.  This:\n@@ -229,13 +223,8 @@\n  *     OVS_ALIGNED_VAR(64) int x;\n  * defines a \"int\" variable that is aligned on a 64-byte boundary.\n  */\n-#ifndef _MSC_VER\n #define OVS_ALIGNED_STRUCT(N, TAG) struct __attribute__((aligned(N))) TAG\n #define OVS_ALIGNED_VAR(N) __attribute__((aligned(N)))\n-#else\n-#define OVS_ALIGNED_STRUCT(N, TAG) __declspec(align(N)) struct TAG\n-#define OVS_ALIGNED_VAR(N) __declspec(align(N))\n-#endif\n \n /* Supplies code to be run at startup time before invoking main().\n  * Use as:\n@@ -244,18 +233,9 @@\n  *         ...some code...\n  *     }\n  */\n-#ifdef _MSC_VER\n-#define CCALL __cdecl\n-#pragma section(\".CRT$XCU\",read)\n-#define OVS_CONSTRUCTOR(f) \\\n-    static void __cdecl f(void); \\\n-    __declspec(allocate(\".CRT$XCU\")) static void (__cdecl*f##_)(void) = f; \\\n-    static void __cdecl f(void)\n-#else\n #define OVS_CONSTRUCTOR(f) \\\n     static void f(void) __attribute__((constructor)); \\\n     static void f(void)\n-#endif\n \n /* OVS_PREFETCH() can be used to instruct the CPU to fetch the cache\n  * line containing the given address to a CPU cache.\n@@ -271,22 +251,6 @@\n #define OVS_PREFETCH_WRITE(addr)\n #endif\n \n-/* Since Visual Studio 2015 there has been an effort to make offsetof a\n- * builtin_offsetof, unfortunately both implementation (the regular define and\n- * the built in one) are buggy and cause issues when using them via\n- * the C compiler.\n- * e.g.: https://bit.ly/2UvWwti\n- */\n-#if _MSC_VER >= 1900\n-#undef offsetof\n-#define offsetof(type, member) \\\n-    ((size_t)((char *)&(((type *)0)->member) - (char *)0))\n-#endif\n-\n-#if _MSC_VER\n-#pragma message (\"warning: Windows support is deprecated.\")\n-#endif\n-\n /* Build assertions.\n  *\n  * Use BUILD_ASSERT_DECL as a declaration or a statement, or BUILD_ASSERT as\ndiff --git a/include/openvswitch/poll-loop.h b/include/openvswitch/poll-loop.h\nindex 532640497..66607d359 100644\n--- a/include/openvswitch/poll-loop.h\n+++ b/include/openvswitch/poll-loop.h\n@@ -33,13 +33,7 @@\n #ifndef POLL_LOOP_H\n #define POLL_LOOP_H 1\n \n-#ifndef _WIN32\n #include <poll.h>\n-#endif\n-\n-#ifdef _WIN32\n-#include <windows.h>\n-#endif\n \n #ifdef  __cplusplus\n extern \"C\" {\n@@ -58,11 +52,6 @@ extern \"C\" {\n void poll_fd_wait_at(int fd, short int events, const char *where);\n #define poll_fd_wait(fd, events) poll_fd_wait_at(fd, events, OVS_SOURCE_LOCATOR)\n \n-#ifdef _WIN32\n-void poll_wevent_wait_at(HANDLE wevent, const char *where);\n-#define poll_wevent_wait(wevent) poll_wevent_wait_at(wevent, OVS_SOURCE_LOCATOR)\n-#endif /* _WIN32 */\n-\n void poll_timer_wait_at(long long int msec, const char *where);\n #define poll_timer_wait(msec) poll_timer_wait_at(msec, OVS_SOURCE_LOCATOR)\n \ndiff --git a/include/openvswitch/vlog.h b/include/openvswitch/vlog.h\nindex 481e1c0f0..2de15dc9d 100644\n--- a/include/openvswitch/vlog.h\n+++ b/include/openvswitch/vlog.h\n@@ -135,9 +135,7 @@ char *vlog_get_log_file(void);\n int vlog_set_log_file(const char *file_name);\n void vlog_close_log_file(void);\n int vlog_reopen_log_file(void);\n-#ifndef _WIN32\n void vlog_change_owner_unix(uid_t, gid_t);\n-#endif\n \n /* Configure method how vlog should send messages to syslog server. */\n void vlog_set_syslog_method(const char *method);\ndiff --git a/include/windows/arpa/inet.h b/include/windows/arpa/inet.h\ndeleted file mode 100644\nindex e69de29bb..000000000\ndiff --git a/include/windows/automake.mk b/include/windows/automake.mk\ndeleted file mode 100644\nindex 883bbbf5d..000000000\n--- a/include/windows/automake.mk\n+++ /dev/null\n@@ -1,42 +0,0 @@\n-# Copyright (C) 2013 Nicira, Inc.\n-#\n-# Copying and distribution of this file, with or without modification\n-# are permitted in any medium without royalty provided the copyright\n-# notice and this notice are preserved.  This file is offered as-is,\n-# without warranty of any kind.\n-\n-noinst_HEADERS += \\\n-\tinclude/windows/arpa/inet.h \\\n-\tinclude/windows/dirent.h \\\n-\tinclude/windows/getopt.h \\\n-\tinclude/windows/linux/netfilter/nf_conntrack_common.h \\\n-\tinclude/windows/linux/netfilter/nf_conntrack_ftp.h \\\n-\tinclude/windows/linux/netfilter/nf_conntrack_sctp.h \\\n-\tinclude/windows/linux/netfilter/nf_conntrack_tcp.h \\\n-\tinclude/windows/linux/netfilter/nfnetlink.h \\\n-\tinclude/windows/linux/netfilter/nfnetlink_conntrack.h \\\n-\tinclude/windows/linux/netfilter/nfnetlink_cttimeout.h \\\n-\tinclude/windows/linux/pkt_sched.h \\\n-\tinclude/windows/linux/types.h \\\n-\tinclude/windows/net/if.h \\\n-\tinclude/windows/netdb.h \\\n-\tinclude/windows/netpacket/packet.h \\\n-\tinclude/windows/netinet/icmp6.h \\\n-\tinclude/windows/netinet/in.h \\\n-\tinclude/windows/netinet/in_systm.h \\\n-\tinclude/windows/netinet/ip.h \\\n-\tinclude/windows/netinet/ip6.h \\\n-\tinclude/windows/netinet/tcp.h \\\n-\tinclude/windows/poll.h \\\n-\tinclude/windows/strings.h \\\n-\tinclude/windows/syslog.h \\\n-\tinclude/windows/sys/epoll.h \\\n-\tinclude/windows/sys/ioctl.h \\\n-\tinclude/windows/sys/resource.h \\\n-\tinclude/windows/sys/socket.h \\\n-\tinclude/windows/sys/time.h \\\n-\tinclude/windows/sys/uio.h \\\n-\tinclude/windows/sys/un.h \\\n-\tinclude/windows/sys/wait.h \\\n-\tinclude/windows/unistd.h \\\n-\tinclude/windows/windefs.h\ndiff --git a/include/windows/dirent.h b/include/windows/dirent.h\ndeleted file mode 100644\nindex e69de29bb..000000000\ndiff --git a/include/windows/getopt.h b/include/windows/getopt.h\ndeleted file mode 100644\nindex fc43be868..000000000\n--- a/include/windows/getopt.h\n+++ /dev/null\n@@ -1,62 +0,0 @@\n-/*-\n- * Copyright (c) 2000 The NetBSD Foundation, Inc.\n- * All rights reserved.\n- *\n- * This code is derived from software contributed to The NetBSD Foundation\n- * by Dieter Baron and Thomas Klausner.\n- *\n- * Redistribution and use in source and binary forms, with or without\n- * modification, are permitted provided that the following conditions\n- * are met:\n- * 1. Redistributions of source code must retain the above copyright\n- *    notice, this list of conditions and the following disclaimer.\n- * 2. Redistributions in binary form must reproduce the above copyright\n- *    notice, this list of conditions and the following disclaimer in the\n- *    documentation and/or other materials provided with the distribution.\n- *\n- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS\n- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED\n- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS\n- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n- * POSSIBILITY OF SUCH DAMAGE.\n- */\n-\n-#ifndef _GETOPT_H_\n-#define _GETOPT_H_\n-\n-#include <unistd.h>\n-\n-extern char *optarg;\n-extern int optind, opterr, optopt;\n-\n-/*\n- * Gnu like getopt_long() and BSD4.4 getsubopt()/optreset extensions\n- */\n-#define no_argument        0\n-#define required_argument  1\n-#define optional_argument  2\n-\n-struct option {\n-\t/* name of long option */\n-\tconst char *name;\n-\t/*\n-\t * one of no_argument, required_argument, and optional_argument:\n-\t * whether option takes an argument\n-\t */\n-\tint has_arg;\n-\t/* if not NULL, set *flag to val when option found */\n-\tint *flag;\n-\t/* if flag not NULL, value to set *flag to; else return value */\n-\tint val;\n-};\n-\n-int getopt_long(int, char * const *, const char *,\n-    const struct option *, int *);\n-\n-#endif /* !_GETOPT_H_ */\ndiff --git a/include/windows/linux/netfilter/nf_conntrack_common.h b/include/windows/linux/netfilter/nf_conntrack_common.h\ndeleted file mode 100644\nindex e69de29bb..000000000\ndiff --git a/include/windows/linux/netfilter/nf_conntrack_ftp.h b/include/windows/linux/netfilter/nf_conntrack_ftp.h\ndeleted file mode 100644\nindex e69de29bb..000000000\ndiff --git a/include/windows/linux/netfilter/nf_conntrack_sctp.h b/include/windows/linux/netfilter/nf_conntrack_sctp.h\ndeleted file mode 100644\nindex e69de29bb..000000000\ndiff --git a/include/windows/linux/netfilter/nf_conntrack_tcp.h b/include/windows/linux/netfilter/nf_conntrack_tcp.h\ndeleted file mode 100644\nindex e69de29bb..000000000\ndiff --git a/include/windows/linux/netfilter/nfnetlink.h b/include/windows/linux/netfilter/nfnetlink.h\ndeleted file mode 100644\nindex e69de29bb..000000000\ndiff --git a/include/windows/linux/netfilter/nfnetlink_conntrack.h b/include/windows/linux/netfilter/nfnetlink_conntrack.h\ndeleted file mode 100644\nindex e69de29bb..000000000\ndiff --git a/include/windows/linux/netfilter/nfnetlink_cttimeout.h b/include/windows/linux/netfilter/nfnetlink_cttimeout.h\ndeleted file mode 100644\nindex e69de29bb..000000000\ndiff --git a/include/windows/linux/pkt_sched.h b/include/windows/linux/pkt_sched.h\ndeleted file mode 100644\nindex 324f125fb..000000000\n--- a/include/windows/linux/pkt_sched.h\n+++ /dev/null\n@@ -1,26 +0,0 @@\n-/*\n- * Copyright 2014 Cloudbase Solutions Srl\n- *\n- * Licensed under the Apache License, Version 2.0 (the \"License\");\n- * you may not use this file except in compliance with the License.\n- * You may obtain a copy of the License at\n- *\n- *     http://www.apache.org/licenses/LICENSE-2.0\n- *\n- * Unless required by applicable law or agreed to in writing, software\n- * distributed under the License is distributed on an \"AS IS\" BASIS,\n- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n- * See the License for the specific language governing permissions and\n- * limitations under the License.\n- */\n-\n-#ifndef __LINUX_PKT_SCHED_H\n-#define __LINUX_PKT_SCHED_H 1\n-\n-#define TC_H_MAJ_MASK (0xFFFF0000U)\n-\n-#define TC_H_MIN_MASK (0x0000FFFFU)\n-\n-#define TC_H_MAKE(maj,min) (((maj)&TC_H_MAJ_MASK)|((min)&TC_H_MIN_MASK))\n-\n-#endif /* linux/pkt_sched.h */\ndiff --git a/include/windows/linux/types.h b/include/windows/linux/types.h\ndeleted file mode 100644\nindex e69de29bb..000000000\ndiff --git a/include/windows/net/if.h b/include/windows/net/if.h\ndeleted file mode 100644\nindex 3a064ae7a..000000000\n--- a/include/windows/net/if.h\n+++ /dev/null\n@@ -1,74 +0,0 @@\n-/*\n- * Copyright (c) 2014 Nicira, Inc.\n- *\n- * Licensed under the Apache License, Version 2.0 (the \"License\");\n- * you may not use this file except in compliance with the License.\n- * You may obtain a copy of the License at:\n- *\n- *     http://www.apache.org/licenses/LICENSE-2.0\n- *\n- * Unless required by applicable law or agreed to in writing, software\n- * distributed under the License is distributed on an \"AS IS\" BASIS,\n- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n- * See the License for the specific language governing permissions and\n- * limitations under the License.\n- */\n-\n-#ifndef __NET_IF_H\n-#define __NET_IF_H 1\n-\n-#include <Netioapi.h>\n-\n-#define IFNAMSIZ IF_NAMESIZE\n-\n-enum {\n-    IFLA_UNSPEC,\n-    IFLA_ADDRESS,\n-    IFLA_BROADCAST,\n-    IFLA_IFNAME,\n-    IFLA_MTU,\n-    IFLA_LINK,\n-    IFLA_QDISC,\n-    IFLA_STATS,\n-    IFLA_COST,\n-#define IFLA_COST IFLA_COST\n-    IFLA_PRIORITY,\n-#define IFLA_PRIORITY IFLA_PRIORITY\n-    IFLA_MASTER,\n-#define IFLA_MASTER IFLA_MASTER\n-    IFLA_WIRELESS,\n-#define IFLA_WIRELESS IFLA_WIRELESS\n-    IFLA_PROTINFO,\n-#define IFLA_PROTINFO IFLA_PROTINFO\n-    IFLA_TXQLEN,\n-#define IFLA_TXQLEN IFLA_TXQLEN\n-    IFLA_MAP,\n-#define IFLA_MAP IFLA_MAP\n-    IFLA_WEIGHT,\n-#define IFLA_WEIGHT IFLA_WEIGHT\n-    IFLA_OPERSTATE,\n-    IFLA_LINKMODE,\n-    IFLA_LINKINFO,\n-#define IFLA_LINKINFO IFLA_LINKINFO\n-    IFLA_NET_NS_PID,\n-    IFLA_IFALIAS,\n-    IFLA_NUM_VF,\n-    IFLA_VFINFO_LIST,\n-    IFLA_STATS64,\n-    IFLA_VF_PORTS,\n-    IFLA_PORT_SELF,\n-    IFLA_AF_SPEC,\n-    IFLA_GROUP,\n-    IFLA_NET_NS_FD,\n-    IFLA_EXT_MASK,\n-    IFLA_PROMISCUITY,\n-#define IFLA_PROMISCUITY IFLA_PROMISCUITY\n-    IFLA_NUM_TX_QUEUES,\n-    IFLA_NUM_RX_QUEUES,\n-    IFLA_CARRIER,\n-    IFLA_PHYS_PORT_ID,\n-    __IFLA_MAX\n-};\n-#define IFLA_MAX (__IFLA_MAX - 1)\n-\n-#endif /* net/if.h */\ndiff --git a/include/windows/netdb.h b/include/windows/netdb.h\ndeleted file mode 100644\nindex e69de29bb..000000000\ndiff --git a/include/windows/netinet/icmp6.h b/include/windows/netinet/icmp6.h\ndeleted file mode 100644\nindex 81f8f5d23..000000000\n--- a/include/windows/netinet/icmp6.h\n+++ /dev/null\n@@ -1,606 +0,0 @@\n-/*\n- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.\n- * All rights reserved.\n- *\n- * Redistribution and use in source and binary forms, with or without\n- * modification, are permitted provided that the following conditions\n- * are met:\n- * 1. Redistributions of source code must retain the above copyright\n- *    notice, this list of conditions and the following disclaimer.\n- * 2. Redistributions in binary form must reproduce the above copyright\n- *    notice, this list of conditions and the following disclaimer in the\n- *    documentation and/or other materials provided with the distribution.\n- * 3. Neither the name of the project nor the names of its contributors\n- *    may be used to endorse or promote products derived from this software\n- *    without specific prior written permission.\n- *\n- * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND\n- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n- * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE\n- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n- * SUCH DAMAGE.\n- */\n-\n-/*\n- * Copyright (c) 1982, 1986, 1993\n- *\tThe Regents of the University of California.  All rights reserved.\n- *\n- * Redistribution and use in source and binary forms, with or without\n- * modification, are permitted provided that the following conditions\n- * are met:\n- * 1. Redistributions of source code must retain the above copyright\n- *    notice, this list of conditions and the following disclaimer.\n- * 2. Redistributions in binary form must reproduce the above copyright\n- *    notice, this list of conditions and the following disclaimer in the\n- *    documentation and/or other materials provided with the distribution.\n- * 3. Neither the name of the University nor the names of its contributors\n- *    may be used to endorse or promote products derived from this software\n- *    without specific prior written permission.\n- *\n- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n- * SUCH DAMAGE.\n- *\n- *\t@(#)ip_icmp.h\t8.1 (Berkeley) 6/10/93\n- */\n-\n-#ifndef _NETINET_ICMP6_H_\n-#define _NETINET_ICMP6_H_\n-\n-#include \"byte-order.h\"\n-\n-#define ICMPV6_PLD_MAXLEN\t1232\t/* IPV6_MMTU - sizeof(struct ip6_hdr)\n-\t\t\t\t\t   - sizeof(struct icmp6_hdr) */\n-\n-struct icmp6_hdr {\n-\tu_int8_t\ticmp6_type;\t/* type field */\n-\tu_int8_t\ticmp6_code;\t/* code field */\n-\tu_int16_t\ticmp6_cksum;\t/* checksum field */\n-\tunion {\n-\t\tu_int32_t\ticmp6_un_data32[1]; /* type-specific field */\n-\t\tu_int16_t\ticmp6_un_data16[2]; /* type-specific field */\n-\t\tu_int8_t\ticmp6_un_data8[4];  /* type-specific field */\n-\t} icmp6_dataun;\n-};\n-\n-#define icmp6_data32\ticmp6_dataun.icmp6_un_data32\n-#define icmp6_data16\ticmp6_dataun.icmp6_un_data16\n-#define icmp6_data8\ticmp6_dataun.icmp6_un_data8\n-#define icmp6_pptr\ticmp6_data32[0]\t\t/* parameter prob */\n-#define icmp6_mtu\ticmp6_data32[0]\t\t/* packet too big */\n-#define icmp6_id\ticmp6_data16[0]\t\t/* echo request/reply */\n-#define icmp6_seq\ticmp6_data16[1]\t\t/* echo request/reply */\n-#define icmp6_maxdelay\ticmp6_data16[0]\t\t/* mcast group membership */\n-\n-#define ICMP6_DST_UNREACH\t\t1\t/* dest unreachable, codes: */\n-#define ICMP6_PACKET_TOO_BIG\t\t2\t/* packet too big */\n-#define ICMP6_TIME_EXCEEDED\t\t3\t/* time exceeded, code: */\n-#define ICMP6_PARAM_PROB\t\t4\t/* ip6 header bad */\n-\n-#define ICMP6_ECHO_REQUEST\t\t128\t/* echo service */\n-#define ICMP6_ECHO_REPLY\t\t129\t/* echo reply */\n-#define MLD_LISTENER_QUERY\t\t130 \t/* multicast listener query */\n-#define MLD_LISTENER_REPORT\t\t131\t/* multicast listener report */\n-#define MLD_LISTENER_DONE\t\t132\t/* multicast listener done */\n-#define MLD_LISTENER_REDUCTION MLD_LISTENER_DONE /* RFC3542 definition */\n-\n-/* RFC2292 decls */\n-#define ICMP6_MEMBERSHIP_QUERY\t\t130\t/* group membership query */\n-#define ICMP6_MEMBERSHIP_REPORT\t\t131\t/* group membership report */\n-#define ICMP6_MEMBERSHIP_REDUCTION\t132\t/* group membership termination */\n-\n-/* the followings are for backward compatibility to old KAME apps. */\n-#define MLD6_LISTENER_QUERY\tMLD_LISTENER_QUERY\n-#define MLD6_LISTENER_REPORT\tMLD_LISTENER_REPORT\n-#define MLD6_LISTENER_DONE\tMLD_LISTENER_DONE\n-\n-#define ND_ROUTER_SOLICIT\t\t133\t/* router solicitation */\n-#define ND_ROUTER_ADVERT\t\t134\t/* router advertisement */\n-#define ND_NEIGHBOR_SOLICIT\t\t135\t/* neighbor solicitation */\n-#define ND_NEIGHBOR_ADVERT\t\t136\t/* neighbor advertisement */\n-#define ND_REDIRECT\t\t\t137\t/* redirect */\n-\n-#define ICMP6_ROUTER_RENUMBERING\t138\t/* router renumbering */\n-\n-#define ICMP6_WRUREQUEST\t\t139\t/* who are you request */\n-#define ICMP6_WRUREPLY\t\t\t140\t/* who are you reply */\n-#define ICMP6_FQDN_QUERY\t\t139\t/* FQDN query */\n-#define ICMP6_FQDN_REPLY\t\t140\t/* FQDN reply */\n-#define ICMP6_NI_QUERY\t\t\t139\t/* node information request */\n-#define ICMP6_NI_REPLY\t\t\t140\t/* node information reply */\n-#define MLDV2_LISTENER_REPORT\t\t143\t/* RFC3810 listener report */\n-\n-/* The definitions below are experimental. TBA */\n-#define MLD_MTRACE_RESP\t\t\t200\t/* mtrace response(to sender) */\n-#define MLD_MTRACE\t\t\t201\t/* mtrace messages */\n-\n-/* the followings are for backward compatibility to old KAME apps. */\n-#define MLD6_MTRACE_RESP\tMLD_MTRACE_RESP\n-#define MLD6_MTRACE\t\tMLD_MTRACE\n-\n-#define ICMP6_MAXTYPE\t\t\t201\n-\n-#define ICMP6_DST_UNREACH_NOROUTE\t0\t/* no route to destination */\n-#define ICMP6_DST_UNREACH_ADMIN\t \t1\t/* administratively prohibited */\n-#define ICMP6_DST_UNREACH_NOTNEIGHBOR\t2\t/* not a neighbor(obsolete) */\n-#define ICMP6_DST_UNREACH_BEYONDSCOPE\t2\t/* beyond scope of source address */\n-#define ICMP6_DST_UNREACH_ADDR\t\t3\t/* address unreachable */\n-#define ICMP6_DST_UNREACH_NOPORT\t4\t/* port unreachable */\n-#define ICMP6_DST_UNREACH_POLICY\t5\t/* source address failed ingress/egress policy */\n-#define ICMP6_DST_UNREACH_REJROUTE\t6\t/* reject route to destination */\n-#define ICMP6_DST_UNREACH_SOURCERT\t7\t/* error in source routing header */\n-\n-#define ICMP6_TIME_EXCEED_TRANSIT \t0\t/* ttl==0 in transit */\n-#define ICMP6_TIME_EXCEED_REASSEMBLY\t1\t/* ttl==0 in reass */\n-\n-#define ICMP6_PARAMPROB_HEADER \t \t0\t/* erroneous header field */\n-#define ICMP6_PARAMPROB_NEXTHEADER\t1\t/* unrecognized next header */\n-#define ICMP6_PARAMPROB_OPTION\t\t2\t/* unrecognized option */\n-\n-#define ICMP6_INFOMSG_MASK\t\t0x80\t/* all informational messages */\n-\n-#define ICMP6_NI_SUBJ_IPV6\t0\t/* Query Subject is an IPv6 address */\n-#define ICMP6_NI_SUBJ_FQDN\t1\t/* Query Subject is a Domain name */\n-#define ICMP6_NI_SUBJ_IPV4\t2\t/* Query Subject is an IPv4 address */\n-\n-#define ICMP6_NI_SUCCESS\t0\t/* node information successful reply */\n-#define ICMP6_NI_REFUSED\t1\t/* node information request is refused */\n-#define ICMP6_NI_UNKNOWN\t2\t/* unknown Qtype */\n-\n-#define ICMP6_ROUTER_RENUMBERING_COMMAND  0\t/* rr command */\n-#define ICMP6_ROUTER_RENUMBERING_RESULT   1\t/* rr result */\n-#define ICMP6_ROUTER_RENUMBERING_SEQNUM_RESET   255\t/* rr seq num reset */\n-\n-/* Used in kernel only */\n-#define ND_REDIRECT_ONLINK\t0\t/* redirect to an on-link node */\n-#define ND_REDIRECT_ROUTER\t1\t/* redirect to a better router */\n-\n-/*\n- * Multicast Listener Discovery\n- */\n-struct mld_hdr {\n-\tstruct icmp6_hdr\tmld_icmp6_hdr;\n-\tstruct in6_addr\t\tmld_addr; /* multicast address */\n-};\n-\n-/* definitions to provide backward compatibility to old KAME applications */\n-#define mld6_hdr\tmld_hdr\n-#define mld6_type\tmld_type\n-#define mld6_code\tmld_code\n-#define mld6_cksum\tmld_cksum\n-#define mld6_maxdelay\tmld_maxdelay\n-#define mld6_reserved\tmld_reserved\n-#define mld6_addr\tmld_addr\n-\n-/* shortcut macro definitions */\n-#define mld_type\tmld_icmp6_hdr.icmp6_type\n-#define mld_code\tmld_icmp6_hdr.icmp6_code\n-#define mld_cksum\tmld_icmp6_hdr.icmp6_cksum\n-#define mld_maxdelay\tmld_icmp6_hdr.icmp6_data16[0]\n-#define mld_reserved\tmld_icmp6_hdr.icmp6_data16[1]\n-\n-#define MLD_MINLEN\t\t\t24\n-\n-/*\n- * Neighbor Discovery\n- */\n-\n-struct nd_router_solicit {\t/* router solicitation */\n-\tstruct icmp6_hdr \tnd_rs_hdr;\n-\t/* could be followed by options */\n-};\n-\n-#define nd_rs_type\tnd_rs_hdr.icmp6_type\n-#define nd_rs_code\tnd_rs_hdr.icmp6_code\n-#define nd_rs_cksum\tnd_rs_hdr.icmp6_cksum\n-#define nd_rs_reserved\tnd_rs_hdr.icmp6_data32[0]\n-\n-struct nd_router_advert {\t/* router advertisement */\n-\tstruct icmp6_hdr\tnd_ra_hdr;\n-\tu_int32_t\t\tnd_ra_reachable;\t/* reachable time */\n-\tu_int32_t\t\tnd_ra_retransmit;\t/* retransmit timer */\n-\t/* could be followed by options */\n-};\n-\n-#define nd_ra_type\t\tnd_ra_hdr.icmp6_type\n-#define nd_ra_code\t\tnd_ra_hdr.icmp6_code\n-#define nd_ra_cksum\t\tnd_ra_hdr.icmp6_cksum\n-#define nd_ra_curhoplimit\tnd_ra_hdr.icmp6_data8[0]\n-#define nd_ra_flags_reserved\tnd_ra_hdr.icmp6_data8[1]\n-#define ND_RA_FLAG_MANAGED\t0x80\n-#define ND_RA_FLAG_OTHER\t0x40\n-#define ND_RA_FLAG_HOME_AGENT\t0x20\n-\n-/*\n- * Router preference values based on RFC4191.\n- */\n-#define ND_RA_FLAG_RTPREF_MASK\t0x18 /* 00011000 */\n-\n-#define ND_RA_FLAG_RTPREF_HIGH\t0x08 /* 00001000 */\n-#define ND_RA_FLAG_RTPREF_MEDIUM\t0x00 /* 00000000 */\n-#define ND_RA_FLAG_RTPREF_LOW\t0x18 /* 00011000 */\n-#define ND_RA_FLAG_RTPREF_RSV\t0x10 /* 00010000 */\n-\n-#define nd_ra_router_lifetime\tnd_ra_hdr.icmp6_data16[1]\n-\n-struct nd_neighbor_solicit {\t/* neighbor solicitation */\n-\tstruct icmp6_hdr\tnd_ns_hdr;\n-\tstruct in6_addr\t\tnd_ns_target;\t/*target address */\n-\t/* could be followed by options */\n-};\n-\n-#define nd_ns_type\t\tnd_ns_hdr.icmp6_type\n-#define nd_ns_code\t\tnd_ns_hdr.icmp6_code\n-#define nd_ns_cksum\t\tnd_ns_hdr.icmp6_cksum\n-#define nd_ns_reserved\t\tnd_ns_hdr.icmp6_data32[0]\n-\n-struct nd_neighbor_advert {\t/* neighbor advertisement */\n-\tstruct icmp6_hdr\tnd_na_hdr;\n-\tstruct in6_addr\t\tnd_na_target;\t/* target address */\n-\t/* could be followed by options */\n-};\n-\n-#define nd_na_type\t\tnd_na_hdr.icmp6_type\n-#define nd_na_code\t\tnd_na_hdr.icmp6_code\n-#define nd_na_cksum\t\tnd_na_hdr.icmp6_cksum\n-#define nd_na_flags_reserved\tnd_na_hdr.icmp6_data32[0]\n-#define ND_NA_FLAG_ROUTER       CONSTANT_HTONL(0x80000000)\n-#define ND_NA_FLAG_SOLICITED    CONSTANT_HTONL(0x40000000)\n-#define ND_NA_FLAG_OVERRIDE     CONSTANT_HTONL(0x20000000)\n-\n-struct nd_redirect {\t\t/* redirect */\n-\tstruct icmp6_hdr\tnd_rd_hdr;\n-\tstruct in6_addr\t\tnd_rd_target;\t/* target address */\n-\tstruct in6_addr\t\tnd_rd_dst;\t/* destination address */\n-\t/* could be followed by options */\n-};\n-\n-#define nd_rd_type\t\tnd_rd_hdr.icmp6_type\n-#define nd_rd_code\t\tnd_rd_hdr.icmp6_code\n-#define nd_rd_cksum\t\tnd_rd_hdr.icmp6_cksum\n-#define nd_rd_reserved\t\tnd_rd_hdr.icmp6_data32[0]\n-\n-struct nd_opt_hdr {\t\t/* Neighbor discovery option header */\n-\tu_int8_t\tnd_opt_type;\n-\tu_int8_t\tnd_opt_len;\n-\t/* followed by option specific data*/\n-};\n-\n-#define ND_OPT_SOURCE_LINKADDR\t\t1\n-#define ND_OPT_TARGET_LINKADDR\t\t2\n-#define ND_OPT_PREFIX_INFORMATION\t3\n-#define ND_OPT_REDIRECTED_HEADER\t4\n-#define ND_OPT_MTU\t\t\t5\n-#define ND_OPT_ADVINTERVAL\t\t7\n-#define ND_OPT_HOMEAGENT_INFO\t\t8\n-#define ND_OPT_SOURCE_ADDRLIST\t\t9\n-#define ND_OPT_TARGET_ADDRLIST\t\t10\n-#define ND_OPT_MAP\t\t\t23\t/* RFC 5380 */\n-#define ND_OPT_ROUTE_INFO\t\t24\t/* RFC 4191 */\n-#define ND_OPT_RDNSS\t\t\t25\t/* RFC 6016 */\n-#define ND_OPT_DNSSL\t\t\t31\t/* RFC 6016 */\n-\n-struct nd_opt_route_info {\t/* route info */\n-\tu_int8_t\tnd_opt_rti_type;\n-\tu_int8_t\tnd_opt_rti_len;\n-\tu_int8_t\tnd_opt_rti_prefixlen;\n-\tu_int8_t\tnd_opt_rti_flags;\n-\tu_int32_t\tnd_opt_rti_lifetime;\n-\t/* prefix follows */\n-};\n-\n-struct nd_opt_prefix_info {\t/* prefix information */\n-\tu_int8_t\tnd_opt_pi_type;\n-\tu_int8_t\tnd_opt_pi_len;\n-\tu_int8_t\tnd_opt_pi_prefix_len;\n-\tu_int8_t\tnd_opt_pi_flags_reserved;\n-\tu_int32_t\tnd_opt_pi_valid_time;\n-\tu_int32_t\tnd_opt_pi_preferred_time;\n-\tu_int32_t\tnd_opt_pi_reserved2;\n-\tstruct in6_addr\tnd_opt_pi_prefix;\n-};\n-\n-#define ND_OPT_PI_FLAG_ONLINK\t\t0x80\n-#define ND_OPT_PI_FLAG_AUTO\t\t0x40\n-\n-struct nd_opt_rd_hdr {\t\t/* redirected header */\n-\tu_int8_t\tnd_opt_rh_type;\n-\tu_int8_t\tnd_opt_rh_len;\n-\tu_int16_t\tnd_opt_rh_reserved1;\n-\tu_int32_t\tnd_opt_rh_reserved2;\n-\t/* followed by IP header and data */\n-};\n-\n-struct nd_opt_mtu {\t\t/* MTU option */\n-\tu_int8_t\tnd_opt_mtu_type;\n-\tu_int8_t\tnd_opt_mtu_len;\n-\tu_int16_t\tnd_opt_mtu_reserved;\n-\tu_int32_t\tnd_opt_mtu_mtu;\n-};\n-\n-struct nd_opt_rdnss {\t\t/* RDNSS option RFC 6106 */\n-\tu_int8_t\tnd_opt_rdnss_type;\n-\tu_int8_t\tnd_opt_rdnss_len;\n-\tu_int16_t\tnd_opt_rdnss_reserved;\n-\tu_int32_t\tnd_opt_rdnss_lifetime;\n-\t/* followed by list of IP prefixes */\n-};\n-\n-struct nd_opt_dnssl {\t\t/* DNSSL option RFC 6106 */\n-\tu_int8_t\tnd_opt_dnssl_type;\n-\tu_int8_t\tnd_opt_dnssl_len;\n-\tu_int16_t\tnd_opt_dnssl_reserved;\n-\tu_int32_t\tnd_opt_dnssl_lifetime;\n-\t/* followed by list of IP prefixes */\n-};\n-\n-/*\n- * icmp6 namelookup\n- */\n-\n-struct icmp6_namelookup {\n-\tstruct icmp6_hdr \ticmp6_nl_hdr;\n-\tu_int8_t\ticmp6_nl_nonce[8];\n-\tint32_t\t\ticmp6_nl_ttl;\n-#if 0\n-\tu_int8_t\ticmp6_nl_len;\n-\tu_int8_t\ticmp6_nl_name[3];\n-#endif\n-\t/* could be followed by options */\n-};\n-\n-/*\n- * icmp6 node information\n- */\n-struct icmp6_nodeinfo {\n-\tstruct icmp6_hdr icmp6_ni_hdr;\n-\tu_int8_t icmp6_ni_nonce[8];\n-\t/* could be followed by reply data */\n-};\n-\n-#define ni_type\t\ticmp6_ni_hdr.icmp6_type\n-#define ni_code\t\ticmp6_ni_hdr.icmp6_code\n-#define ni_cksum\ticmp6_ni_hdr.icmp6_cksum\n-#define ni_qtype\ticmp6_ni_hdr.icmp6_data16[0]\n-#define ni_flags\ticmp6_ni_hdr.icmp6_data16[1]\n-\n-#define NI_QTYPE_NOOP\t\t0 /* NOOP  */\n-#define NI_QTYPE_SUPTYPES\t1 /* Supported Qtypes */\n-#define NI_QTYPE_FQDN\t\t2 /* FQDN (draft 04) */\n-#define NI_QTYPE_DNSNAME\t2 /* DNS Name */\n-#define NI_QTYPE_NODEADDR\t3 /* Node Addresses */\n-#define NI_QTYPE_IPV4ADDR\t4 /* IPv4 Addresses */\n-\n-#define NI_SUPTYPE_FLAG_COMPRESS\tCONSTANT_HTONS(0x1)\n-#define NI_FQDN_FLAG_VALIDTTL\t\tCONSTANT_HTONS(0x1)\n-\n-#ifdef NAME_LOOKUPS_04\n-#define NI_NODEADDR_FLAG_LINKLOCAL\tCONSTANT_HTONS(0x1)\n-#define NI_NODEADDR_FLAG_SITELOCAL\tCONSTANT_HTONS(0x2)\n-#define NI_NODEADDR_FLAG_GLOBAL\t\tCONSTANT_HTONS(0x4)\n-#define NI_NODEADDR_FLAG_ALL\t\tCONSTANT_HTONS(0x8)\n-#define NI_NODEADDR_FLAG_TRUNCATE\tCONSTANT_HTONS(0x10)\n-#define NI_NODEADDR_FLAG_ANYCAST\tCONSTANT_HTONS(0x20) /* just experimental. not in spec */\n-#else  /* draft-ietf-ipngwg-icmp-name-lookups-05 (and later?) */\n-#define NI_NODEADDR_FLAG_TRUNCATE\tCONSTANT_HTONS(0x1)\n-#define NI_NODEADDR_FLAG_ALL\t\tCONSTANT_HTONS(0x2)\n-#define NI_NODEADDR_FLAG_COMPAT\t\tCONSTANT_HTONS(0x4)\n-#define NI_NODEADDR_FLAG_LINKLOCAL\tCONSTANT_HTONS(0x8)\n-#define NI_NODEADDR_FLAG_SITELOCAL\tCONSTANT_HTONS(0x10)\n-#define NI_NODEADDR_FLAG_GLOBAL\t\tCONSTANT_HTONS(0x20)\n-#define NI_NODEADDR_FLAG_ANYCAST\tCONSTANT_HTONS(0x40) /* just experimental. not in spec */\n-#endif\n-\n-struct ni_reply_fqdn {\n-\tu_int32_t ni_fqdn_ttl;\t/* TTL */\n-\tu_int8_t ni_fqdn_namelen; /* length in octets of the FQDN */\n-\tu_int8_t ni_fqdn_name[3]; /* XXX: alignment */\n-};\n-\n-/*\n- * Router Renumbering. as router-renum-08.txt\n- */\n-struct icmp6_router_renum {\t/* router renumbering header */\n-\tstruct icmp6_hdr\trr_hdr;\n-\tu_int8_t\trr_segnum;\n-\tu_int8_t\trr_flags;\n-\tu_int16_t\trr_maxdelay;\n-\tu_int32_t\trr_reserved;\n-};\n-\n-#define ICMP6_RR_FLAGS_TEST\t\t0x80\n-#define ICMP6_RR_FLAGS_REQRESULT\t0x40\n-#define ICMP6_RR_FLAGS_FORCEAPPLY\t0x20\n-#define ICMP6_RR_FLAGS_SPECSITE\t\t0x10\n-#define ICMP6_RR_FLAGS_PREVDONE\t\t0x08\n-\n-#define rr_type\t\trr_hdr.icmp6_type\n-#define rr_code\t\trr_hdr.icmp6_code\n-#define rr_cksum\trr_hdr.icmp6_cksum\n-#define rr_seqnum \trr_hdr.icmp6_data32[0]\n-\n-struct rr_pco_match {\t\t/* match prefix part */\n-\tu_int8_t\trpm_code;\n-\tu_int8_t\trpm_len;\n-\tu_int8_t\trpm_ordinal;\n-\tu_int8_t\trpm_matchlen;\n-\tu_int8_t\trpm_minlen;\n-\tu_int8_t\trpm_maxlen;\n-\tu_int16_t\trpm_reserved;\n-\tstruct\tin6_addr\trpm_prefix;\n-};\n-\n-#define RPM_PCO_ADD\t\t1\n-#define RPM_PCO_CHANGE\t\t2\n-#define RPM_PCO_SETGLOBAL\t3\n-#define RPM_PCO_MAX\t\t4\n-\n-struct rr_pco_use {\t\t/* use prefix part */\n-\tu_int8_t\trpu_uselen;\n-\tu_int8_t\trpu_keeplen;\n-\tu_int8_t\trpu_ramask;\n-\tu_int8_t\trpu_raflags;\n-\tu_int32_t\trpu_vltime;\n-\tu_int32_t\trpu_pltime;\n-\tu_int32_t\trpu_flags;\n-\tstruct\tin6_addr rpu_prefix;\n-};\n-#define ICMP6_RR_PCOUSE_RAFLAGS_ONLINK\t0x80\n-#define ICMP6_RR_PCOUSE_RAFLAGS_AUTO\t0x40\n-\n-#define ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME     CONSTANT_HTONL(0x80000000)\n-#define ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME     CONSTANT_HTONL(0x40000000)\n-\n-struct rr_result {\t\t/* router renumbering result message */\n-\tu_int16_t\trrr_flags;\n-\tu_int8_t\trrr_ordinal;\n-\tu_int8_t\trrr_matchedlen;\n-\tu_int32_t\trrr_ifid;\n-\tstruct\tin6_addr rrr_prefix;\n-};\n-#define ICMP6_RR_RESULT_FLAGS_OOB\t\tCONSTANT_HTONS(0x0002)\n-#define ICMP6_RR_RESULT_FLAGS_FORBIDDEN\t\tCONSTANT_HTONS(0x0001)\n-\n-/*\n- * icmp6 filter structures.\n- */\n-\n-struct icmp6_filter {\n-\tu_int32_t icmp6_filt[8];\n-};\n-\n-#define\tICMP6_FILTER_SETPASSALL(filterp) \\\n-\t(void)memset(filterp, 0xff, sizeof(struct icmp6_filter))\n-#define\tICMP6_FILTER_SETBLOCKALL(filterp) \\\n-\t(void)memset(filterp, 0x00, sizeof(struct icmp6_filter))\n-#define\tICMP6_FILTER_SETPASS(type, filterp) \\\n-\t(((filterp)->icmp6_filt[(type) >> 5]) |= (1 << ((type) & 31)))\n-#define\tICMP6_FILTER_SETBLOCK(type, filterp) \\\n-\t(((filterp)->icmp6_filt[(type) >> 5]) &= ~(1 << ((type) & 31)))\n-#define\tICMP6_FILTER_WILLPASS(type, filterp) \\\n-\t((((filterp)->icmp6_filt[(type) >> 5]) & (1 << ((type) & 31))) != 0)\n-#define\tICMP6_FILTER_WILLBLOCK(type, filterp) \\\n-\t((((filterp)->icmp6_filt[(type) >> 5]) & (1 << ((type) & 31))) == 0)\n-\n-/*\n- * Variables related to this implementation\n- * of the internet control message protocol version 6.\n- */\n-\n-/*\n- * IPv6 ICMP statistics.\n- * Each counter is an unsigned 64-bit value.\n- */\n-#define\tICMP6_STAT_ERROR\t0\t/* # of calls to icmp6_error */\n-#define\tICMP6_STAT_CANTERROR\t1\t/* no error (old was icmp) */\n-#define\tICMP6_STAT_TOOFREQ\t2\t/* no error (rate limitation) */\n-#define\tICMP6_STAT_OUTHIST\t3\t/* # of output messages */\n-\t\t/* space for 256 counters */\n-#define\tICMP6_STAT_BADCODE\t259\t/* icmp6_code out of range */\n-#define\tICMP6_STAT_TOOSHORT\t260\t/* packet < sizeof(struct icmp6_hdr) */\n-#define\tICMP6_STAT_CHECKSUM\t261\t/* bad checksum */\n-#define\tICMP6_STAT_BADLEN\t262\t/* calculated bound mismatch */\n-\t/*\n-\t * number of responses; this member is inherited from the netinet code,\n-\t * but for netinet6 code, it is already available in outhist[].\n-\t */\n-#define\tICMP6_STAT_REFLECT\t263\n-#define\tICMP6_STAT_INHIST\t264\t/* # of input messages */\n-\t\t/* space for 256 counters */\n-#define\tICMP6_STAT_ND_TOOMANYOPT 520\t/* too many ND options */\n-#define\tICMP6_STAT_OUTERRHIST\t521\n-\t\t/* space for 13 counters */\n-#define\tICMP6_STAT_PMTUCHG\t534\t/* path MTU changes */\n-#define\tICMP6_STAT_ND_BADOPT\t535\t/* bad ND options */\n-#define\tICMP6_STAT_BADNS\t536\t/* bad neighbor solicititation */\n-#define\tICMP6_STAT_BADNA\t537\t/* bad neighbor advertisement */\n-#define\tICMP6_STAT_BADRS\t538\t/* bad router solicitiation */\n-#define\tICMP6_STAT_BADRA\t539\t/* bad router advertisement */\n-#define\tICMP6_STAT_BADREDIRECT\t540\t/* bad redirect message */\n-#define ICMP6_STAT_DROPPED_RAROUTE 541\t/* discarded routes from router advertisement */\n-\n-#define\tICMP6_NSTATS\t\t542\n-\n-#define\tICMP6_ERRSTAT_DST_UNREACH_NOROUTE\t0\n-#define\tICMP6_ERRSTAT_DST_UNREACH_ADMIN\t\t1\n-#define\tICMP6_ERRSTAT_DST_UNREACH_BEYONDSCOPE\t2\n-#define\tICMP6_ERRSTAT_DST_UNREACH_ADDR\t\t3\n-#define\tICMP6_ERRSTAT_DST_UNREACH_NOPORT\t4\n-#define\tICMP6_ERRSTAT_PACKET_TOO_BIG\t\t5\n-#define\tICMP6_ERRSTAT_TIME_EXCEED_TRANSIT\t6\n-#define\tICMP6_ERRSTAT_TIME_EXCEED_REASSEMBLY\t7\n-#define\tICMP6_ERRSTAT_PARAMPROB_HEADER\t\t8\n-#define\tICMP6_ERRSTAT_PARAMPROB_NEXTHEADER\t9\n-#define\tICMP6_ERRSTAT_PARAMPROB_OPTION\t\t10\n-#define\tICMP6_ERRSTAT_REDIRECT\t\t\t11\n-#define\tICMP6_ERRSTAT_UNKNOWN\t\t\t12\n-\n-/*\n- * Names for ICMP sysctl objects\n- */\n-#define ICMPV6CTL_STATS\t\t1\n-#define ICMPV6CTL_REDIRACCEPT\t2\t/* accept/process redirects */\n-#define ICMPV6CTL_REDIRTIMEOUT\t3\t/* redirect cache time */\n-#if 0\t/*obsoleted*/\n-#define ICMPV6CTL_ERRRATELIMIT\t5\t/* ICMPv6 error rate limitation */\n-#endif\n-#define ICMPV6CTL_ND6_PRUNE\t6\n-#define ICMPV6CTL_ND6_DELAY\t8\n-#define ICMPV6CTL_ND6_UMAXTRIES\t9\n-#define ICMPV6CTL_ND6_MMAXTRIES\t\t10\n-#define ICMPV6CTL_ND6_USELOOPBACK\t11\n-/*#define ICMPV6CTL_ND6_PROXYALL\t12\tobsoleted, do not reuse here */\n-#define ICMPV6CTL_NODEINFO\t13\n-#define ICMPV6CTL_ERRPPSLIMIT\t14\t/* ICMPv6 error pps limitation */\n-#define ICMPV6CTL_ND6_MAXNUDHINT\t15\n-#define ICMPV6CTL_MTUDISC_HIWAT\t16\n-#define ICMPV6CTL_MTUDISC_LOWAT\t17\n-#define ICMPV6CTL_ND6_DEBUG\t18\n-#define ICMPV6CTL_ND6_DRLIST\t19\n-#define ICMPV6CTL_ND6_PRLIST\t20\n-#define\tICMPV6CTL_ND6_MAXQLEN\t24\n-#define ICMPV6CTL_MAXID\t\t25\n-\n-#define ICMPV6CTL_NAMES { \\\n-\t{ 0, 0 }, \\\n-\t{ 0, 0 }, \\\n-\t{ \"rediraccept\", CTLTYPE_INT }, \\\n-\t{ \"redirtimeout\", CTLTYPE_INT }, \\\n-\t{ 0, 0 }, \\\n-\t{ 0, 0 }, \\\n-\t{ \"nd6_prune\", CTLTYPE_INT }, \\\n-\t{ 0, 0 }, \\\n-\t{ \"nd6_delay\", CTLTYPE_INT }, \\\n-\t{ \"nd6_umaxtries\", CTLTYPE_INT }, \\\n-\t{ \"nd6_mmaxtries\", CTLTYPE_INT }, \\\n-\t{ \"nd6_useloopback\", CTLTYPE_INT }, \\\n-\t{ 0, 0 }, \\\n-\t{ \"nodeinfo\", CTLTYPE_INT }, \\\n-\t{ \"errppslimit\", CTLTYPE_INT }, \\\n-\t{ \"nd6_maxnudhint\", CTLTYPE_INT }, \\\n-\t{ \"mtudisc_hiwat\", CTLTYPE_INT }, \\\n-\t{ \"mtudisc_lowat\", CTLTYPE_INT }, \\\n-\t{ \"nd6_debug\", CTLTYPE_INT }, \\\n-\t{ 0, 0 }, \\\n-\t{ 0, 0 }, \\\n-\t{ 0, 0 }, \\\n-\t{ 0, 0 }, \\\n-\t{ 0, 0 }, \\\n-\t{ \"nd6_maxqueuelen\", CTLTYPE_INT }, \\\n-}\n-\n-#endif /* !_NETINET_ICMP6_H_ */\ndiff --git a/include/windows/netinet/in.h b/include/windows/netinet/in.h\ndeleted file mode 100644\nindex bae9f8cee..000000000\n--- a/include/windows/netinet/in.h\n+++ /dev/null\n@@ -1,24 +0,0 @@\n-/*\n- * Copyright (c) 2014 Nicira, Inc.\n- *\n- * Licensed under the Apache License, Version 2.0 (the \"License\");\n- * you may not use this file except in compliance with the License.\n- * You may obtain a copy of the License at:\n- *\n- *     http://www.apache.org/licenses/LICENSE-2.0\n- *\n- * Unless required by applicable law or agreed to in writing, software\n- * distributed under the License is distributed on an \"AS IS\" BASIS,\n- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n- * See the License for the specific language governing permissions and\n- * limitations under the License.\n- */\n-\n-#ifndef __NETINET_IN_H\n-#define __NETINET_IN_H 1\n-\n-#define IPPROTO_GRE 47\n-#define IPPORT_FTP 21\n-#define IPPORT_TFTP 69\n-\n-#endif /* netinet/in.h */\ndiff --git a/include/windows/netinet/in_systm.h b/include/windows/netinet/in_systm.h\ndeleted file mode 100644\nindex e69de29bb..000000000\ndiff --git a/include/windows/netinet/ip.h b/include/windows/netinet/ip.h\ndeleted file mode 100644\nindex 7f4b29011..000000000\n--- a/include/windows/netinet/ip.h\n+++ /dev/null\n@@ -1,26 +0,0 @@\n-/*\n- * Copyright (c) 2014 Nicira, Inc.\n- *\n- * Licensed under the Apache License, Version 2.0 (the \"License\");\n- * you may not use this file except in compliance with the License.\n- * You may obtain a copy of the License at:\n- *\n- *     http://www.apache.org/licenses/LICENSE-2.0\n- *\n- * Unless required by applicable law or agreed to in writing, software\n- * distributed under the License is distributed on an \"AS IS\" BASIS,\n- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n- * See the License for the specific language governing permissions and\n- * limitations under the License.\n- */\n-\n-#ifndef __NETINET_IP_H\n-#define __NETINET_IP_H 1\n-\n-#define IPTOS_PREC_INTERNETCONTROL 0xc0\n-#define MAXTTL 255\n-#define IPTOS_LOWDELAY 0x10\n-#define IPTOS_THROUGHPUT 0x08\n-#define IP_DF 0x4000                    /* dont fragment flag */\n-\n-#endif /* netinet/ip.h */\ndiff --git a/include/windows/netinet/ip6.h b/include/windows/netinet/ip6.h\ndeleted file mode 100644\nindex c14c4eec4..000000000\n--- a/include/windows/netinet/ip6.h\n+++ /dev/null\n@@ -1,235 +0,0 @@\n-/*\n- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.\n- * All rights reserved.\n- *\n- * Redistribution and use in source and binary forms, with or without\n- * modification, are permitted provided that the following conditions\n- * are met:\n- * 1. Redistributions of source code must retain the above copyright\n- *    notice, this list of conditions and the following disclaimer.\n- * 2. Redistributions in binary form must reproduce the above copyright\n- *    notice, this list of conditions and the following disclaimer in the\n- *    documentation and/or other materials provided with the distribution.\n- * 3. Neither the name of the project nor the names of its contributors\n- *    may be used to endorse or promote products derived from this software\n- *    without specific prior written permission.\n- *\n- * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND\n- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n- * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE\n- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n- * SUCH DAMAGE.\n- */\n-\n-/*\n- * Copyright (c) 1982, 1986, 1993\n- *\tThe Regents of the University of California.  All rights reserved.\n- *\n- * Redistribution and use in source and binary forms, with or without\n- * modification, are permitted provided that the following conditions\n- * are met:\n- * 1. Redistributions of source code must retain the above copyright\n- *    notice, this list of conditions and the following disclaimer.\n- * 2. Redistributions in binary form must reproduce the above copyright\n- *    notice, this list of conditions and the following disclaimer in the\n- *    documentation and/or other materials provided with the distribution.\n- * 3. Neither the name of the University nor the names of its contributors\n- *    may be used to endorse or promote products derived from this software\n- *    without specific prior written permission.\n- *\n- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n- * SUCH DAMAGE.\n- *\n- *\t@(#)ip.h\t8.1 (Berkeley) 6/10/93\n- */\n-\n-#ifndef _NETINET_IP6_H_\n-#define _NETINET_IP6_H_\n-#include <inttypes.h>\n-#include <netinet/in.h>\n-#include \"byte-order.h\"\n-\n-/*\n- * Definition for internet protocol version 6.\n- * RFC 2460\n- */\n-\n-struct ip6_hdr {\n-\tunion {\n-\t\tstruct ip6_hdrctl {\n-\t\t\tu_int32_t ip6_un1_flow;\t/* 20 bits of flow-ID */\n-\t\t\tu_int16_t ip6_un1_plen;\t/* payload length */\n-\t\t\tu_int8_t  ip6_un1_nxt;\t/* next header */\n-\t\t\tu_int8_t  ip6_un1_hlim;\t/* hop limit */\n-\t\t} ip6_un1;\n-\t\tu_int8_t ip6_un2_vfc;\t/* 4 bits version, top 4 bits class */\n-\t} ip6_ctlun;\n-\tstruct in6_addr ip6_src;\t/* source address */\n-\tstruct in6_addr ip6_dst;\t/* destination address */\n-};\n-\n-#define ip6_vfc\t\tip6_ctlun.ip6_un2_vfc\n-#define ip6_flow\tip6_ctlun.ip6_un1.ip6_un1_flow\n-#define ip6_plen\tip6_ctlun.ip6_un1.ip6_un1_plen\n-#define ip6_nxt\t\tip6_ctlun.ip6_un1.ip6_un1_nxt\n-#define ip6_hlim\tip6_ctlun.ip6_un1.ip6_un1_hlim\n-#define ip6_hops\tip6_ctlun.ip6_un1.ip6_un1_hlim\n-\n-#define IPV6_VERSION\t\t0x60\n-#define IPV6_VERSION_MASK\t0xf0\n-\n-#define IPV6_FLOWINFO_MASK\tCONSTANT_HTONL(0x0fffffff) /* flow info (28 bits) */\n-#define IPV6_FLOWLABEL_MASK\tCONSTANT_HTONL(0x000fffff) /* flow label (20 bits) */\n-#if 1\n-/* ECN bits proposed by Sally Floyd */\n-#define IP6TOS_CE\t\t0x01\t/* congestion experienced */\n-#define IP6TOS_ECT\t\t0x02\t/* ECN-capable transport */\n-#endif\n-\n-/*\n- * Extension Headers\n- */\n-\n-struct\tip6_ext {\n-\tu_int8_t ip6e_nxt;\n-\tu_int8_t ip6e_len;\n-};\n-\n-/* Hop-by-Hop options header */\n-/* XXX should we pad it to force alignment on an 8-byte boundary? */\n-struct ip6_hbh {\n-\tu_int8_t ip6h_nxt;\t/* next header */\n-\tu_int8_t ip6h_len;\t/* length in units of 8 octets */\n-\t/* followed by options */\n-};\n-\n-/* Destination options header */\n-/* XXX should we pad it to force alignment on an 8-byte boundary? */\n-struct ip6_dest {\n-\tu_int8_t ip6d_nxt;\t/* next header */\n-\tu_int8_t ip6d_len;\t/* length in units of 8 octets */\n-\t/* followed by options */\n-};\n-\n-/* Option types and related macros */\n-#define IP6OPT_PAD1\t\t0x00\t/* 00 0 00000 */\n-#define IP6OPT_PADN\t\t0x01\t/* 00 0 00001 */\n-#define IP6OPT_JUMBO\t\t0xC2\t/* 11 0 00010 = 194 */\n-#define IP6OPT_NSAP_ADDR\t0xC3\t/* 11 0 00011 */\n-#define IP6OPT_TUNNEL_LIMIT\t0x04\t/* 00 0 00100 */\n-#define IP6OPT_RTALERT\t\t0x05\t/* 00 0 00101 (KAME definition) */\n-#define IP6OPT_ROUTER_ALERT\t0x05\t/* (RFC3542 def, recommended) */\n-\n-#define IP6OPT_RTALERT_LEN\t4\n-#define IP6OPT_RTALERT_MLD\t0\t/* Datagram contains an MLD message */\n-#define IP6OPT_RTALERT_RSVP\t1\t/* Datagram contains an RSVP message */\n-#define IP6OPT_RTALERT_ACTNET\t2 \t/* contains an Active Networks msg */\n-#define IP6OPT_MINLEN\t\t2\n-\n-#define IP6OPT_TYPE(o)\t\t((o) & 0xC0)\n-#define IP6OPT_TYPE_SKIP\t0x00\n-#define IP6OPT_TYPE_DISCARD\t0x40\n-#define IP6OPT_TYPE_FORCEICMP\t0x80\n-#define IP6OPT_TYPE_ICMP\t0xC0\n-\n-#define IP6OPT_MUTABLE\t\t0x20\n-\n-/* IPv6 options: common part */\n-struct ip6_opt {\n-\tu_int8_t ip6o_type;\n-\tu_int8_t ip6o_len;\n-};\n-\n-/* Jumbo Payload Option */\n-struct ip6_opt_jumbo {\n-\tu_int8_t ip6oj_type;\n-\tu_int8_t ip6oj_len;\n-\tu_int8_t ip6oj_jumbo_len[4];\n-};\n-#define IP6OPT_JUMBO_LEN 6\n-\n-/* NSAP Address Option */\n-struct ip6_opt_nsap {\n-\tu_int8_t ip6on_type;\n-\tu_int8_t ip6on_len;\n-\tu_int8_t ip6on_src_nsap_len;\n-\tu_int8_t ip6on_dst_nsap_len;\n-\t/* followed by source NSAP */\n-\t/* followed by destination NSAP */\n-};\n-\n-/* Tunnel Limit Option */\n-struct ip6_opt_tunnel {\n-\tu_int8_t ip6ot_type;\n-\tu_int8_t ip6ot_len;\n-\tu_int8_t ip6ot_encap_limit;\n-};\n-\n-/* Router Alert Option */\n-struct ip6_opt_router {\n-\tu_int8_t ip6or_type;\n-\tu_int8_t ip6or_len;\n-\tu_int8_t ip6or_value[2];\n-};\n-/* Router alert values (in network byte order) */\n-#define IP6_ALERT_MLD\tCONSTANT_HTONS(0x0000)\n-#define IP6_ALERT_RSVP\tCONSTANT_HTONS(0x0001)\n-#define IP6_ALERT_AN\tCONSTANT_HTONS(0x0002)\n-\n-/* Routing header */\n-struct ip6_rthdr {\n-\tu_int8_t  ip6r_nxt;\t/* next header */\n-\tu_int8_t  ip6r_len;\t/* length in units of 8 octets */\n-\tu_int8_t  ip6r_type;\t/* routing type */\n-\tu_int8_t  ip6r_segleft;\t/* segments left */\n-\t/* followed by routing type specific data */\n-};\n-\n-/* Type 0 Routing header */\n-struct ip6_rthdr0 {\n-\tu_int8_t  ip6r0_nxt;\t\t/* next header */\n-\tu_int8_t  ip6r0_len;\t\t/* length in units of 8 octets */\n-\tu_int8_t  ip6r0_type;\t\t/* always zero */\n-\tu_int8_t  ip6r0_segleft;\t/* segments left */\n-\tu_int32_t ip6r0_reserved;\t/* reserved field */\n-};\n-\n-/* Fragment header */\n-struct ip6_frag {\n-\tu_int8_t  ip6f_nxt;\t\t/* next header */\n-\tu_int8_t  ip6f_reserved;\t/* reserved field */\n-\tu_int16_t ip6f_offlg;\t\t/* offset, reserved, and flag */\n-\tu_int32_t ip6f_ident;\t\t/* identification */\n-};\n-\n-#define IP6F_OFF_MASK\t\tCONSTANT_HTONS(0xfff8)\t/* mask out offset from _offlg */\n-#define IP6F_RESERVED_MASK\tCONSTANT_HTONS(0x0006)\t/* reserved bits in ip6f_offlg */\n-#define IP6F_MORE_FRAG\t\tCONSTANT_HTONS(0x0001)  /* more-fragments flag */\n-\n-/*\n- * Internet implementation parameters.\n- */\n-#define IPV6_MAXHLIM\t255\t/* maximum hoplimit */\n-#define IPV6_DEFHLIM\t64\t/* default hlim */\n-#define IPV6_FRAGTTL\t120\t/* ttl for fragment packets, in slowtimo tick */\n-#define IPV6_HLIMDEC\t1\t/* subtracted when forwarding */\n-\n-#define IPV6_MMTU\t1280\t/* minimal MTU and reassembly. 1024 + 256 */\n-#define IPV6_MAXPACKET\t65535\t/* ip6 max packet size without Jumbo payload*/\n-\n-#endif /* !_NETINET_IP6_H_ */\ndiff --git a/include/windows/netinet/tcp.h b/include/windows/netinet/tcp.h\ndeleted file mode 100644\nindex e69de29bb..000000000\ndiff --git a/include/windows/netpacket/packet.h b/include/windows/netpacket/packet.h\ndeleted file mode 100644\nindex ce372b6d5..000000000\n--- a/include/windows/netpacket/packet.h\n+++ /dev/null\n@@ -1,40 +0,0 @@\n-/*\n- * Copyright 2014 Cloudbase Solutions Srl\n- *\n- * Licensed under the Apache License, Version 2.0 (the \"License\");\n- * you may not use this file except in compliance with the License.\n- * You may obtain a copy of the License at\n- *\n- *     http://www.apache.org/licenses/LICENSE-2.0\n- *\n- * Unless required by applicable law or agreed to in writing, software\n- * distributed under the License is distributed on an \"AS IS\" BASIS,\n- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n- * See the License for the specific language governing permissions and\n- * limitations under the License.\n- */\n-\n-#ifndef __NETPACKET_PACKET_H\n-#define __NETPACKET_PACKET_H 1\n-\n-struct iovec\n-{\n-    void *iov_base;\n-    unsigned int iov_len;\n-};\n-\n-struct msghdr\n-  {\n-    void *msg_name;\n-    socklen_t msg_namelen;\n-\n-    struct iovec *msg_iov;\n-    size_t msg_iovlen;\n-\n-    void *msg_control;\n-    size_t msg_controllen;\n-\n-    int msg_flags;\n-  };\n-\n-#endif /* netpacket/packet.h */\ndiff --git a/include/windows/poll.h b/include/windows/poll.h\ndeleted file mode 100644\nindex e69de29bb..000000000\ndiff --git a/include/windows/strings.h b/include/windows/strings.h\ndeleted file mode 100644\nindex e69de29bb..000000000\ndiff --git a/include/windows/sys/epoll.h b/include/windows/sys/epoll.h\ndeleted file mode 100644\nindex 3e1330279..000000000\n--- a/include/windows/sys/epoll.h\n+++ /dev/null\n@@ -1,31 +0,0 @@\n-/*\n- * Copyright 2014 Cloudbase Solutions Srl\n- *\n- * Licensed under the Apache License, Version 2.0 (the \"License\");\n- * you may not use this file except in compliance with the License.\n- * You may obtain a copy of the License at\n- *\n- *     http://www.apache.org/licenses/LICENSE-2.0\n- *\n- * Unless required by applicable law or agreed to in writing, software\n- * distributed under the License is distributed on an \"AS IS\" BASIS,\n- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n- * See the License for the specific language governing permissions and\n- * limitations under the License.\n- */\n-\n-#ifndef __SYS_EPOLL_H\n-#define __SYS_EPOLL_H 1\n-\n-#define EPOLLIN 0x00001\n-\n-typedef union data {\n-    uint32_t u32;\n-} data_t;\n-\n-struct epoll_event {\n-    uint32_t events;\n-    data_t data;\n-};\n-\n-#endif /* sys/epoll.h */\ndiff --git a/include/windows/sys/ioctl.h b/include/windows/sys/ioctl.h\ndeleted file mode 100644\nindex e69de29bb..000000000\ndiff --git a/include/windows/sys/resource.h b/include/windows/sys/resource.h\ndeleted file mode 100644\nindex d8f2607b4..000000000\n--- a/include/windows/sys/resource.h\n+++ /dev/null\n@@ -1,53 +0,0 @@\n-/*\n- * Copyright (c) 2014, 2017 Nicira, Inc.\n- *\n- * Licensed under the Apache License, Version 2.0 (the \"License\");\n- * you may not use this file except in compliance with the License.\n- * You may obtain a copy of the License at:\n- *\n- *     http://www.apache.org/licenses/LICENSE-2.0\n- *\n- * Unless required by applicable law or agreed to in writing, software\n- * distributed under the License is distributed on an \"AS IS\" BASIS,\n- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n- * See the License for the specific language governing permissions and\n- * limitations under the License.\n- */\n-\n-#ifndef SYS_RESOURCE_H\n-#define SYS_RESOURCE_H 1\n-\n-struct rusage {\n-    struct timeval ru_utime; /* user CPU time used */\n-    struct timeval ru_stime; /* system CPU time used */\n-    long   ru_maxrss;        /* maximum resident set size */\n-    long   ru_ixrss;         /* integral shared memory size */\n-    long   ru_idrss;         /* integral unshared data size */\n-    long   ru_isrss;         /* integral unshared stack size */\n-    long   ru_minflt;        /* page reclaims (soft page faults) */\n-    long   ru_majflt;        /* page faults (hard page faults) */\n-    long   ru_nswap;         /* swaps */\n-    long   ru_inblock;       /* block input operations */\n-    long   ru_oublock;       /* block output operations */\n-    long   ru_msgsnd;        /* IPC messages sent */\n-    long   ru_msgrcv;        /* IPC messages received */\n-    long   ru_nsignals;      /* signals received */\n-    long   ru_nvcsw;         /* voluntary context switches */\n-    long   ru_nivcsw;        /* involuntary context switches */\n-};\n-\n-#ifndef RUSAGE_SELF\n-#define RUSAGE_SELF 1\n-#endif\n-\n-#ifndef RUSAGE_CHILDREN\n-#define RUSAGE_CHILDREN 2\n-#endif\n-\n-#ifndef RUSAGE_THREAD\n-#define RUSAGE_THREAD 3\n-#endif\n-\n-int getrusage(int who, struct rusage *usage);\n-\n-#endif /* sys/resource.h */\ndiff --git a/include/windows/sys/socket.h b/include/windows/sys/socket.h\ndeleted file mode 100644\nindex ab6e82216..000000000\n--- a/include/windows/sys/socket.h\n+++ /dev/null\n@@ -1,22 +0,0 @@\n-/*\n- * Copyright (c) 2014 Nicira, Inc.\n- *\n- * Licensed under the Apache License, Version 2.0 (the \"License\");\n- * you may not use this file except in compliance with the License.\n- * You may obtain a copy of the License at:\n- *\n- *     http://www.apache.org/licenses/LICENSE-2.0\n- *\n- * Unless required by applicable law or agreed to in writing, software\n- * distributed under the License is distributed on an \"AS IS\" BASIS,\n- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n- * See the License for the specific language governing permissions and\n- * limitations under the License.\n- */\n-\n-#ifndef __SYS_SOCKET_H\n-#define __SYS_SOCKET_H 1\n-\n-typedef unsigned short int sa_family_t;\n-\n-#endif /* sys/socket.h */\ndiff --git a/include/windows/sys/time.h b/include/windows/sys/time.h\ndeleted file mode 100644\nindex e69de29bb..000000000\ndiff --git a/include/windows/sys/uio.h b/include/windows/sys/uio.h\ndeleted file mode 100644\nindex e92a77291..000000000\n--- a/include/windows/sys/uio.h\n+++ /dev/null\n@@ -1,22 +0,0 @@\n-/*\n- * Copyright 2014 Cloudbase Solutions Srl\n- *\n- * Licensed under the Apache License, Version 2.0 (the \"License\");\n- * you may not use this file except in compliance with the License.\n- * You may obtain a copy of the License at\n- *\n- *     http://www.apache.org/licenses/LICENSE-2.0\n- *\n- * Unless required by applicable law or agreed to in writing, software\n- * distributed under the License is distributed on an \"AS IS\" BASIS,\n- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n- * See the License for the specific language governing permissions and\n- * limitations under the License.\n- */\n-\n-#ifndef __SYS_UIO_H\n-#define __SYS_UIO_H 1\n-\n-#include <netpacket/packet.h>\n-\n-#endif /* sys/uio.h */\ndiff --git a/include/windows/sys/un.h b/include/windows/sys/un.h\ndeleted file mode 100644\nindex e69de29bb..000000000\ndiff --git a/include/windows/sys/wait.h b/include/windows/sys/wait.h\ndeleted file mode 100644\nindex e69de29bb..000000000\ndiff --git a/include/windows/syslog.h b/include/windows/syslog.h\ndeleted file mode 100644\nindex d59cd3d0c..000000000\n--- a/include/windows/syslog.h\n+++ /dev/null\n@@ -1,62 +0,0 @@\n-/*\n- * Copyright 2013, 2015 Cloudbase Solutions Srl\n- *\n- * Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n- * not use this file except in compliance with the License.You may obtain\n- * a copy of the License at\n- *\n- *     http://www.apache.org/licenses/LICENSE-2.0\n- *\n- * Unless required by applicable law or agreed to in writing, software\n- * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the\n- * License for the specific language governing permissions and limitations\n- * under the License.\n- */\n-\n-#ifndef SYSLOG_H\n-#define SYSLOG_H 1\n-\n-#define LOG_EMERG       0       /* system is unusable */\n-#define LOG_ALERT       1       /* action must be taken immediately */\n-#define LOG_CRIT        2       /* critical conditions */\n-#define LOG_ERR         3       /* error conditions */\n-#define LOG_WARNING     4       /* warning conditions */\n-#define LOG_NOTICE      5       /* normal but significant condition */\n-#define LOG_INFO        6       /* informational */\n-#define LOG_DEBUG       7       /* debug-level messages */\n-#define LOG_NDELAY      8       /* don't delay open */\n-\n-#define LOG_KERN      (0<<3)  /* kernel messages */\n-#define LOG_USER      (1<<3)  /* user-level messages */\n-#define LOG_MAIL      (2<<3)  /* mail system */\n-#define LOG_DAEMON    (3<<3)  /* system daemons */\n-#define LOG_AUTH      (4<<3)  /* security/authorization messages */\n-#define LOG_SYSLOG    (5<<3)  /* messages generated internally by syslogd */\n-#define LOG_LPR       (6<<3)  /* line printer subsystem */\n-#define LOG_NEWS      (7<<3)  /* network news subsystem */\n-#define LOG_UUCP      (8<<3)  /* UUCP subsystem */\n-#define LOG_CRON      (9<<3)  /* clock daemon */\n-#define LOG_AUTHPRIV  (10<<3) /* security/authorization messages */\n-#define LOG_FTP       (11<<3) /* FTP daemon */\n-\n-#define LOG_LOCAL0      (16<<3) /* reserved for local use */\n-#define LOG_LOCAL1      (17<<3) /* reserved for local use */\n-#define LOG_LOCAL2      (18<<3) /* reserved for local use */\n-#define LOG_LOCAL3      (19<<3) /* reserved for local use */\n-#define LOG_LOCAL4      (20<<3) /* reserved for local use */\n-#define LOG_LOCAL5      (21<<3) /* reserved for local use */\n-#define LOG_LOCAL6      (22<<3) /* reserved for local use */\n-#define LOG_LOCAL7      (23<<3) /* reserved for local use */\n-\n-static inline void\n-openlog(const char *ident, int option, int facility)\n-{\n-}\n-\n-static inline void\n-syslog(int priority, const char *format, ...)\n-{\n-}\n-\n-#endif /* syslog.h */\ndiff --git a/include/windows/unistd.h b/include/windows/unistd.h\ndeleted file mode 100644\nindex 62ff90a3f..000000000\n--- a/include/windows/unistd.h\n+++ /dev/null\n@@ -1,104 +0,0 @@\n-/*\n- * Copyright (c) 2014 Nicira, Inc.\n- *\n- * Licensed under the Apache License, Version 2.0 (the \"License\");\n- * you may not use this file except in compliance with the License.\n- * You may obtain a copy of the License at:\n- *\n- *     http://www.apache.org/licenses/LICENSE-2.0\n- *\n- * Unless required by applicable law or agreed to in writing, software\n- * distributed under the License is distributed on an \"AS IS\" BASIS,\n- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n- * See the License for the specific language governing permissions and\n- * limitations under the License.\n- */\n-#ifndef _UNISTD_H\n-#define _UNISTD_H   1\n-\n-#define WIN32_LEAN_AND_MEAN\n-#include <windows.h>\n-#include <direct.h>\n-#include <windefs.h>\n-\n-#define fsync _commit\n-#define getcwd _getcwd\n-\n-/* Standard file descriptors.  */\n-#define STDIN_FILENO    0   /* Standard input.  */\n-#define STDOUT_FILENO   1   /* Standard output.  */\n-#define STDERR_FILENO   2   /* Standard error output.  */\n-\n-#define _SC_UIO_MAXIOV                  2\n-#define _XOPEN_IOV_MAX                 16\n-\n-#define _SC_PAGESIZE                    0x1\n-#define _SC_NPROCESSORS_ONLN            0x2\n-#define _SC_PHYS_PAGES                  0x4\n-\n-\n-static __inline pid_t getpid(void)\n-{\n-    /* Since _getpid: https://msdn.microsoft.com/en-us/library/t2y34y40.aspx\n-     * uses GetCurrentProcessId behind the scenes it is safe to assume no\n-     * casting is required */\n-    return GetCurrentProcessId();\n-}\n-\n-__inline int GetNumLogicalProcessors(void)\n-{\n-    SYSTEM_INFO info_temp;\n-    GetSystemInfo(&info_temp);\n-    long int n_cores = info_temp.dwNumberOfProcessors;\n-    return n_cores;\n-}\n-\n-__inline long sysconf(int type)\n-{\n-    long value = -1;\n-    long page_size = -1;\n-    SYSTEM_INFO sys_info;\n-    MEMORYSTATUSEX status;\n-\n-    switch (type) {\n-    case _SC_NPROCESSORS_ONLN:\n-        value = GetNumLogicalProcessors();\n-        break;\n-\n-    case _SC_PAGESIZE:\n-        GetSystemInfo(&sys_info);\n-        value = sys_info.dwPageSize;\n-        break;\n-\n-    case _SC_PHYS_PAGES:\n-        status.dwLength = sizeof(status);\n-        page_size = sysconf(_SC_PAGESIZE);\n-        if (GlobalMemoryStatusEx(&status) && page_size != -1) {\n-            value = status.ullTotalPhys / page_size;\n-        }\n-        break;\n-\n-    default:\n-        break;\n-    }\n-\n-    return value;\n-}\n-\n-/* On Windows, a console is a specialized character device, and isatty() only\n- * reports whether a file description is a character device and thus reports\n- * that devices such as /dev/null are ttys.  This replacement avoids that\n- * problem. */\n-#undef isatty\n-#define isatty(fd) rpl_isatty(fd)\n-static __inline int\n-rpl_isatty(int fd)\n-{\n-    HANDLE h = (HANDLE)(INT_PTR) _get_osfhandle(fd);\n-    DWORD st;\n-    return (_isatty(STDOUT_FILENO)\n-            && h != INVALID_HANDLE_VALUE\n-            && GetConsoleMode(h, &st));\n-}\n-\n-#endif /* unistd.h  */\ndiff --git a/include/windows/windefs.h b/include/windows/windefs.h\ndeleted file mode 100644\nindex 6ed8d8722..000000000\n--- a/include/windows/windefs.h\n+++ /dev/null\n@@ -1,50 +0,0 @@\n-/*\n- * Copyright (c) 2013 Nicira, Inc.\n- *\n- * Licensed under the Apache License, Version 2.0 (the \"License\");\n- * you may not use this file except in compliance with the License.\n- * You may obtain a copy of the License at:\n- *\n- *     http://www.apache.org/licenses/LICENSE-2.0\n- *\n- * Unless required by applicable law or agreed to in writing, software\n- * distributed under the License is distributed on an \"AS IS\" BASIS,\n- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n- * See the License for the specific language governing permissions and\n- * limitations under the License.\n- */\n-\n-#ifndef WINDEFS_H\n-#define WINDEFS_H 1\n-\n-#include <Winsock2.h>\n-#include <In6addr.h>\n-#include <WS2tcpip.h>\n-#include <windows.h>\n-#include <BaseTsd.h>\n-#include <io.h>\n-#include <inttypes.h>\n-\n-#pragma comment(lib, \"advapi32\")\n-\n-#undef INET6_ADDRSTRLEN\n-#define INET6_ADDRSTRLEN 46\n-\n-#define inline __inline\n-#define __func__ __FUNCTION__\n-#define ssize_t SSIZE_T\n-#define u_int8_t uint8_t\n-#define u_int16_t uint16_t\n-#define u_int32_t uint32_t\n-#define u_int64_t uint64_t\n-\n-typedef int pid_t;\n-\n-char *strsep(char **stringp, const char *delim);\n-\n-#define srandom srand\n-#define random rand\n-\n-#define EPFNOSUPPORT WSAEPFNOSUPPORT\n-\n-#endif /* windefs.h */\ndiff --git a/lib/automake.mk b/lib/automake.mk\nindex c6e988906..34290b245 100644\n--- a/lib/automake.mk\n+++ b/lib/automake.mk\n@@ -10,11 +10,6 @@ lib_LTLIBRARIES += lib/libopenvswitch.la\n lib_libopenvswitch_la_LIBADD = $(SSL_LIBS)\n lib_libopenvswitch_la_LIBADD += $(CAPNG_LDADD)\n \n-\n-if WIN32\n-lib_libopenvswitch_la_LIBADD += ${PTHREAD_LIBS}\n-endif\n-\n lib_libopenvswitch_la_LDFLAGS = \\\n         $(OVS_LTINFO) \\\n         -Wl,--version-script=$(top_builddir)/lib/libopenvswitch.sym \\\n@@ -265,7 +260,6 @@ lib_libopenvswitch_la_SOURCES = \\\n \tlib/ovs-atomic-i586.h \\\n \tlib/ovs-atomic-locked.c \\\n \tlib/ovs-atomic-locked.h \\\n-\tlib/ovs-atomic-msvc.h \\\n \tlib/ovs-atomic-pthreads.h \\\n \tlib/ovs-atomic-x86_64.h \\\n \tlib/ovs-atomic.h \\\n@@ -356,7 +350,6 @@ lib_libopenvswitch_la_SOURCES = \\\n \tlib/stream-tcp.c \\\n \tlib/stream.c \\\n \tlib/stream.h \\\n-\tlib/stdio.c \\\n \tlib/string.c \\\n \tlib/svec.c \\\n \tlib/svec.h \\\n@@ -413,17 +406,6 @@ lib_libopenvswitch_la_SOURCES = \\\n \tlib/lldp/lldpd-structs.c \\\n \tlib/lldp/lldpd-structs.h\n \n-if WIN32\n-lib_libopenvswitch_la_SOURCES += \\\n-\tlib/daemon-windows.c \\\n-\tlib/getopt_long.c \\\n-\tlib/getrusage-windows.c \\\n-\tlib/latch-windows.c \\\n-\tlib/route-table-stub.c \\\n-\tlib/if-notifier-stub.c \\\n-\tlib/stream-windows.c \\\n-\tlib/strsep.c\n-else\n lib_libopenvswitch_la_SOURCES += \\\n \tlib/daemon-unix.c \\\n \tlib/latch-unix.c \\\n@@ -431,10 +413,8 @@ lib_libopenvswitch_la_SOURCES += \\\n \tlib/signals.h \\\n \tlib/socket-util-unix.c \\\n \tlib/stream-unix.c\n-endif\n \n EXTRA_DIST += \\\n-\tlib/stdio.h.in \\\n \tlib/string.h.in\n \n nodist_lib_libopenvswitch_la_SOURCES = \\\n@@ -514,23 +494,6 @@ lib_libopenvswitch_la_SOURCES += \\\n \tlib/dpdk-stub.c\n endif\n \n-if WIN32\n-lib_libopenvswitch_la_SOURCES += \\\n-\tlib/dpif-netlink.c \\\n-\tlib/dpif-netlink.h \\\n-\tlib/dpif-netlink-rtnl.h \\\n-\tlib/netdev-windows.c \\\n-\tlib/netlink-conntrack.c \\\n-\tlib/netlink-conntrack.h \\\n-\tlib/netlink-notifier.c \\\n-\tlib/netlink-notifier.h \\\n-\tlib/netlink-protocol.h \\\n-\tlib/netlink-socket.c \\\n-\tlib/netlink-socket.h \\\n-\tlib/wmi.c \\\n-\tlib/wmi.h\n-endif\n-\n if HAVE_POSIX_AIO\n lib_libopenvswitch_la_SOURCES += lib/async-append-aio.c\n else\n@@ -606,8 +569,6 @@ MAN_FRAGMENTS += \\\n \tlib/ovs.tmac \\\n \tlib/ovs-replay.man \\\n \tlib/ovs-replay-syn.man \\\n-\tlib/service.man \\\n-\tlib/service-syn.man \\\n \tlib/ssl-bootstrap.man \\\n \tlib/ssl-bootstrap-syn.man \\\n \tlib/ssl-peer-ca-cert.man \\\ndiff --git a/lib/byte-order.h b/lib/byte-order.h\nindex 66d29a2b3..f5a21f329 100644\n--- a/lib/byte-order.h\n+++ b/lib/byte-order.h\n@@ -23,7 +23,7 @@\n #include \"openvswitch/types.h\"\n \n #ifndef __CHECKER__\n-#if !(defined(_WIN32) || defined(htonll))\n+#ifndef htonll\n static inline ovs_be64\n htonll(uint64_t n)\n {\n@@ -35,7 +35,7 @@ ntohll(ovs_be64 n)\n {\n     return htonl(1) == 1 ? n : ((uint64_t) ntohl(n) << 32) | ntohl(n >> 32);\n }\n-#endif /* !(defined(_WIN32) || defined(htonll)) */\n+#endif /* !htonll */\n #else\n /* Making sparse happy with these functions also makes them unreadable, so\n  * don't bother to show it their implementations. */\ndiff --git a/lib/daemon-unix.c b/lib/daemon-unix.c\nindex 52f977ec8..4cdadefe4 100644\n--- a/lib/daemon-unix.c\n+++ b/lib/daemon-unix.c\n@@ -709,25 +709,6 @@ check_already_running(void)\n     }\n }\n \n-\f\n-/* stub functions for non-windows platform. */\n-\n-void\n-service_start(int *argc OVS_UNUSED, char **argv[] OVS_UNUSED)\n-{\n-}\n-\n-void\n-service_stop(void)\n-{\n-}\n-\n-bool\n-should_service_stop(void)\n-{\n-    return false;\n-}\n-\n \f\n static bool\n gid_matches(gid_t expected, gid_t value)\ndiff --git a/lib/daemon-windows.c b/lib/daemon-windows.c\ndeleted file mode 100644\nindex 4e6bbe0f0..000000000\n--- a/lib/daemon-windows.c\n+++ /dev/null\n@@ -1,555 +0,0 @@\n-/*\n- * Copyright (c) 2014, 2017 Nicira, Inc.\n- *\n- * Licensed under the Apache License, Version 2.0 (the \"License\");\n- * you may not use this file except in compliance with the License.\n- * You may obtain a copy of the License at:\n- *\n- *     http://www.apache.org/licenses/LICENSE-2.0\n- *\n- * Unless required by applicable law or agreed to in writing, software\n- * distributed under the License is distributed on an \"AS IS\" BASIS,\n- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n- * See the License for the specific language governing permissions and\n- * limitations under the License.\n- */\n-\n-#include <config.h>\n-#include \"daemon.h\"\n-#include \"daemon-private.h\"\n-#include <stdio.h>\n-#include <io.h>\n-#include <stdlib.h>\n-#include <unistd.h>\n-#include \"dirs.h\"\n-#include \"fatal-signal.h\"\n-#include \"ovs-thread.h\"\n-#include \"openvswitch/poll-loop.h\"\n-#include \"openvswitch/vlog.h\"\n-\n-VLOG_DEFINE_THIS_MODULE(daemon_windows);\n-\n-/* Constants for flock function */\n-#define\tLOCK_SHARED\t0x0                     /* Shared lock. */\n-#define\tLOCK_UNLOCK\t0x80000000              /* Unlock. Custom value. */\n-\n-static bool service_create;          /* Was --service specified? */\n-static bool service_started;         /* Have we dispatched service to start? */\n-\n-/* --service-monitor: Should the service be restarted if it dies\n- * unexpectedly? */\n-static bool monitor;\n-\n-bool detach;                 /* Was --detach specified? */\n-static bool detached;        /* Running as the child process. */\n-static HANDLE write_handle;  /* End of pipe to write to parent. */\n-\n-char *pidfile;                 /* --pidfile: Name of pidfile (null if none). */\n-static FILE *filep_pidfile;    /* File pointer to access the pidfile. */\n-\n-/* Handle to the Services Manager and the created service. */\n-static SC_HANDLE manager, service;\n-\n-/* Handle to the status information structure for the current service. */\n-static SERVICE_STATUS_HANDLE hstatus;\n-\n-/* Hold the service's current status. */\n-static SERVICE_STATUS service_status;\n-\n-/* Handle to an event object used to wakeup from poll_block(). */\n-static HANDLE wevent;\n-\n-/* Hold the arguments sent to the main function. */\n-static int sargc;\n-static char ***sargvp;\n-\n-static void check_service(void);\n-static void handle_scm_callback(void);\n-static void init_service_status(void);\n-static void set_config_failure_actions(void);\n-\n-static bool detach_process(int argc, char *argv[]);\n-\n-extern int main(int argc, char *argv[]);\n-\n-void\n-daemon_usage(void)\n-{\n-    printf(\n-        \"\\nService options:\\n\"\n-        \"  --service               run in background as a service.\\n\"\n-        \"  --service-monitor       restart the service in case of an \"\n-                                   \"unexpected failure. \\n\");\n-}\n-\n-/* Sets up a following call to service_start() to detach from the foreground\n- * session, running this process in the background.  */\n-void\n-set_detach(void)\n-{\n-    detach = true;\n-}\n-\n-/* Registers the call-back and configures the actions in case of a failure\n- * with the Windows services manager. */\n-void\n-service_start(int *argcp, char **argvp[])\n-{\n-    int argc = *argcp;\n-    char **argv = *argvp;\n-    int i;\n-    SERVICE_TABLE_ENTRY service_table[] = {\n-        {(LPTSTR)program_name, (LPSERVICE_MAIN_FUNCTION)main},\n-        {NULL, NULL}\n-    };\n-\n-    /* If one of the command line option is \"--detach\", we create\n-     * a new process in case of parent, wait for child to start and exit.\n-     * In case of the child, we just return. We should not be creating a\n-     * service in either case. */\n-    if (detach_process(argc, argv)) {\n-        return;\n-    }\n-\n-    /* 'service_started' is 'false' when service_start() is called the first\n-     * time.  It is 'true', when it is called the second time by the Windows\n-     * services manager. */\n-    if (service_started) {\n-        init_service_status();\n-\n-        wevent = CreateEvent(NULL, TRUE, FALSE, NULL);\n-        if (!wevent) {\n-            char *msg_buf = ovs_lasterror_to_string();\n-            VLOG_FATAL(\"Failed to create a event (%s).\", msg_buf);\n-        }\n-\n-        poll_wevent_wait(wevent);\n-\n-        /* Register the control handler. This function is called by the service\n-         * manager to stop the service. */\n-        hstatus = RegisterServiceCtrlHandler(program_name,\n-                                         (LPHANDLER_FUNCTION)control_handler);\n-        if (!hstatus) {\n-            char *msg_buf = ovs_lasterror_to_string();\n-            VLOG_FATAL(\"Failed to register the service control handler (%s).\",\n-                        msg_buf);\n-        }\n-\n-        if (monitor) {\n-            set_config_failure_actions();\n-        }\n-\n-        /* When the service control manager does the call back, it does not\n-         * send the same arguments as sent to the main function during the\n-         * service start. So, use the arguments passed over during the first\n-         * time. */\n-        *argcp = sargc;\n-        *argvp = *sargvp;\n-\n-        /* Enable default error mode so we can take advantage of WER\n-         * (Windows Error Reporting) crash dumps.\n-         * Being a service it does not allow for WER window pop-up.\n-         * XXX implement our on crash dump collection mechanism. */\n-        SetErrorMode(0);\n-\n-        return;\n-    }\n-\n-    assert_single_threaded();\n-\n-    /* A reference to arguments passed to the main function the first time.\n-     * We need it after the call-back from service control manager. */\n-    sargc = argc;\n-    sargvp = argvp;\n-\n-    /* We are only interested in the '--service' and '--service-monitor'\n-     * options before the call-back from the service control manager. */\n-    for (i = 0; i < argc; i ++) {\n-        if (!strcmp(argv[i], \"--service\")) {\n-            service_create = true;\n-        } else if (!strcmp(argv[i], \"--service-monitor\")) {\n-            monitor = true;\n-        }\n-    }\n-\n-    /* If '--service' is not a command line option, run in foreground. */\n-    if (!service_create) {\n-        return;\n-    }\n-\n-    /* If we have been configured to run as a service, then that service\n-     * should already have been created either manually or through a start up\n-     * script. */\n-    check_service();\n-\n-    service_started = true;\n-\n-    /* StartServiceCtrlDispatcher blocks and returns after the service is\n-     * stopped. */\n-    if (!StartServiceCtrlDispatcher(service_table)) {\n-        char *msg_buf = ovs_lasterror_to_string();\n-        VLOG_FATAL(\"Failed at StartServiceCtrlDispatcher (%s)\", msg_buf);\n-    }\n-    exit(0);\n-}\n-\n-/* This function is registered with the Windows services manager through\n- * a call to RegisterServiceCtrlHandler() and will be called by the Windows\n- * services manager asynchronously to stop the service. */\n-void\n-control_handler(DWORD request)\n-{\n-    switch (request) {\n-    case SERVICE_CONTROL_STOP:\n-    case SERVICE_CONTROL_SHUTDOWN:\n-        service_status.dwCurrentState = SERVICE_STOPPED;\n-        service_status.dwWin32ExitCode = NO_ERROR;\n-        SetEvent(wevent);\n-        SetServiceStatus(hstatus, &service_status);\n-        break;\n-\n-    default:\n-        break;\n-    }\n-}\n-\n-/* Return 'true' if the Windows services manager has called the\n- * control_handler() and asked the program to terminate. */\n-bool\n-should_service_stop(void)\n-{\n-    if (service_started) {\n-        if (service_status.dwCurrentState != SERVICE_RUNNING) {\n-            return true;\n-        } else {\n-            poll_wevent_wait(wevent);\n-        }\n-    }\n-    return false;\n-}\n-\n-/* Set the service as stopped. The control manager will terminate the\n- * service soon after this call. Hence, this should ideally be the last\n- * call before termination. */\n-void\n-service_stop()\n-{\n-    if (!service_started) {\n-        return;\n-    }\n-    fatal_signal_atexit_handler();\n-\n-    ResetEvent(wevent);\n-    CloseHandle(wevent);\n-\n-    service_status.dwCurrentState = SERVICE_STOPPED;\n-    service_status.dwWin32ExitCode = NO_ERROR;\n-    SetServiceStatus(hstatus, &service_status);\n-}\n-\n-/* Call this function to signal that the daemon is ready. init_service()\n- * or control_handler() has already initalized/set the\n- * service_status.dwCurrentState .*/\n-static void\n-service_complete(void)\n-{\n-    if (hstatus) {\n-        SetServiceStatus(hstatus, &service_status);\n-    }\n-}\n-\n-/* Check whether 'program_name' has been created as a service. */\n-static void\n-check_service()\n-{\n-    /* Establish a connection to the local service control manager. */\n-    manager = OpenSCManager(NULL, NULL, SC_MANAGER_ENUMERATE_SERVICE);\n-    if (!manager) {\n-        char *msg_buf = ovs_lasterror_to_string();\n-        VLOG_FATAL(\"Failed to open the service control manager (%s).\",\n-                   msg_buf);\n-    }\n-\n-    service = OpenService(manager, program_name, SERVICE_ALL_ACCESS);\n-    if (!service) {\n-        char *msg_buf = ovs_lasterror_to_string();\n-        VLOG_FATAL(\"Failed to open service (%s).\", msg_buf);\n-    }\n-}\n-\n-/* Service status of a service can be checked asynchronously through\n- * tools like 'sc' or through Windows services manager and is set\n- * through a call to SetServiceStatus(). */\n-static void\n-init_service_status()\n-{\n-    /* The service runs in its own process. */\n-    service_status.dwServiceType = SERVICE_WIN32_OWN_PROCESS;\n-\n-    /* The control codes the service accepts. */\n-    service_status.dwControlsAccepted = SERVICE_ACCEPT_STOP |\n-                                            SERVICE_ACCEPT_SHUTDOWN;\n-\n-    /* Initialize the current state as SERVICE_RUNNING. */\n-    service_status.dwCurrentState = SERVICE_RUNNING;\n-\n-    /* The exit code to indicate if there was an error. */\n-    service_status.dwWin32ExitCode = NO_ERROR;\n-\n-    /* The checkpoint value the service increments periodically. Set as 0\n-     * as we do not plan to periodically increment the value. */\n-    service_status.dwCheckPoint = 0;\n-\n-    /* The estimated time required for the stop operation in ms. */\n-    service_status.dwWaitHint = 1000;\n-}\n-\n-/* In case of an unexpected termination, configure the action to be\n- * taken. */\n-static void\n-set_config_failure_actions()\n-{\n-    /* In case of a failure, restart the process the first two times\n-     * After 'dwResetPeriod', the failure count is reset. */\n-    SC_ACTION fail_action[3] = {\n-        {SC_ACTION_RESTART, 0},\n-        {SC_ACTION_RESTART, 0},\n-        {SC_ACTION_NONE, 0}\n-    };\n-    SERVICE_FAILURE_ACTIONS service_fail_action;\n-\n-    /* Reset failure count after (in seconds). */\n-    service_fail_action.dwResetPeriod = 10;\n-\n-    /* Reboot message. */\n-    service_fail_action.lpRebootMsg = NULL;\n-\n-    /* The command line of the process. */\n-    service_fail_action.lpCommand = NULL;\n-\n-    /* Number of elements in 'fail_actions'. */\n-    service_fail_action.cActions = sizeof(fail_action)/sizeof(fail_action[0]);\n-\n-    /* A pointer to an array of SC_ACTION structures. */\n-    service_fail_action.lpsaActions = fail_action;\n-\n-    if (!ChangeServiceConfig2(service, SERVICE_CONFIG_FAILURE_ACTIONS,\n-                              &service_fail_action)) {\n-        char *msg_buf = ovs_lasterror_to_string();\n-        VLOG_FATAL(\"Failed to configure service fail actions (%s).\", msg_buf);\n-    }\n-}\n-\n-/* When a daemon is passed the --detach option, we create a new\n- * process and pass an additional non-documented option called --pipe-handle.\n- * Through this option, the parent passes one end of a pipe handle. */\n-void\n-set_pipe_handle(const char *pipe_handle)\n-{\n-    write_handle = (HANDLE) atoi(pipe_handle);\n-}\n-\n-/* If one of the command line option is \"--detach\", creates\n- * a new process in case of parent, waits for child to start and exits.\n- * In case of the child, returns. */\n-static bool\n-detach_process(int argc, char *argv[])\n-{\n-    SECURITY_ATTRIBUTES sa;\n-    STARTUPINFO si;\n-    PROCESS_INFORMATION pi;\n-    HANDLE read_pipe, write_pipe;\n-    char *buffer;\n-    int error, i;\n-    char ch;\n-\n-    /* We are only interested in the '--detach' and '--pipe-handle'. */\n-    for (i = 0; i < argc; i ++) {\n-        if (!detach && !strcmp(argv[i], \"--detach\")) {\n-            detach = true;\n-        } else if (!strncmp(argv[i], \"--pipe-handle\", 13)) {\n-            /* If running as a child, return. */\n-            detached = true;\n-            return true;\n-        }\n-    }\n-\n-    /* Nothing to do if the option --detach is not set. */\n-    if (!detach) {\n-        return false;\n-    }\n-\n-    /* Set the security attribute such that a process created will\n-     * inherit the pipe handles. */\n-    sa.nLength = sizeof(sa);\n-    sa.lpSecurityDescriptor = NULL;\n-    sa.bInheritHandle = TRUE;\n-\n-    /* Create an anonymous pipe to communicate with the child. */\n-    error = CreatePipe(&read_pipe, &write_pipe, &sa, 0);\n-    if (!error) {\n-        VLOG_FATAL(\"CreatePipe failed (%s)\", ovs_lasterror_to_string());\n-    }\n-\n-    GetStartupInfo(&si);\n-\n-    /* To the child, we pass an extra argument '--pipe-handle=write_pipe' */\n-    buffer = xasprintf(\"%s %s=%ld\", GetCommandLine(), \"--pipe-handle\",\n-                       write_pipe);\n-\n-    /* Create a detached child */\n-    error = CreateProcess(NULL, buffer, NULL, NULL, TRUE, DETACHED_PROCESS,\n-                          NULL, NULL, &si, &pi);\n-    if (!error) {\n-        VLOG_FATAL(\"CreateProcess failed (%s)\", ovs_lasterror_to_string());\n-    }\n-\n-    /* Close one end of the pipe in the parent. */\n-    CloseHandle(write_pipe);\n-\n-    /* Block and wait for child to say it is ready. */\n-    error = ReadFile(read_pipe, &ch, 1, NULL, NULL);\n-    if (!error) {\n-        VLOG_FATAL(\"Failed to read from child (%s)\",\n-                   ovs_lasterror_to_string());\n-    }\n-    /* The child has successfully started and is ready. */\n-    exit(0);\n-}\n-\n-static void\n-flock(FILE* fd, int operation)\n-{\n-    HANDLE hFile;\n-    OVERLAPPED ov = {0};\n-\n-    hFile = (HANDLE)_get_osfhandle(fileno(fd));\n-    if (hFile == INVALID_HANDLE_VALUE) {\n-        VLOG_FATAL(\"Failed to get PID file handle (%s).\",\n-                   ovs_strerror(errno));\n-    }\n-\n-    if (operation & LOCK_UNLOCK) {\n-        if (UnlockFileEx(hFile, 0, 1, 0, &ov) == 0) {\n-            VLOG_FATAL(\"Failed to unlock PID file (%s).\",\n-                       ovs_lasterror_to_string());\n-        }\n-    } else {\n-       /* Use LOCKFILE_FAIL_IMMEDIATELY flag to avoid hang of another daemon that tries to\n-           acquire exclusive lock over the same PID file */\n-        if (LockFileEx(hFile, operation | LOCKFILE_FAIL_IMMEDIATELY,\n-                       0, 1, 0, &ov) == FALSE) {\n-            VLOG_FATAL(\"Failed to lock PID file (%s).\",\n-                       ovs_lasterror_to_string());\n-        }\n-    }\n-}\n-\n-static void\n-unlink_pidfile(void)\n-{\n-    if (filep_pidfile) {\n-        /* Remove the shared lock on file */\n-        flock(filep_pidfile, LOCK_UNLOCK);\n-        fclose(filep_pidfile);\n-    }\n-    if (pidfile) {\n-        unlink(pidfile);\n-    }\n-}\n-\n-/* If a pidfile has been configured, creates it and stores the running\n- * process's pid in it.  Ensures that the pidfile will be deleted when the\n- * process exits. */\n-static void\n-make_pidfile(void)\n-{\n-    int error;\n-\n-    error = GetFileAttributes(pidfile);\n-    if (error != INVALID_FILE_ATTRIBUTES) {\n-        /* pidfile exists. Try to unlink() it. */\n-        error = unlink(pidfile);\n-        if (error) {\n-            VLOG_FATAL(\"Failed to delete existing pidfile %s (%s)\", pidfile,\n-                       ovs_strerror(errno));\n-        }\n-    }\n-\n-    filep_pidfile = fopen(pidfile, \"w\");\n-    if (filep_pidfile == NULL) {\n-        VLOG_FATAL(\"failed to open %s (%s)\", pidfile, ovs_strerror(errno));\n-    }\n-\n-    flock(filep_pidfile, LOCKFILE_EXCLUSIVE_LOCK);\n-\n-    fatal_signal_add_hook(unlink_pidfile, NULL, NULL, true);\n-\n-    fprintf(filep_pidfile, \"%ld\\n\", (long int) getpid());\n-    if (fflush(filep_pidfile) == EOF) {\n-        VLOG_FATAL(\"Failed to write into the pidfile %s\", pidfile);\n-    }\n-\n-    flock(filep_pidfile, LOCK_SHARED);\n-    /* This will remove the exclusive lock. The shared lock will remain */\n-    flock(filep_pidfile, LOCK_UNLOCK);\n-\n-    /* Don't close the pidfile till the process exits. */\n-}\n-\n-void\n-daemonize_start(bool access_datapath OVS_UNUSED,\n-                bool access_hardware_ports OVS_UNUSED)\n-{\n-    if (pidfile) {\n-        make_pidfile();\n-    }\n-}\n-\n-void\n-daemonize_complete(void)\n-{\n-    /* If running as a child because '--detach' option was specified,\n-     * communicate with the parent to inform that the child is ready. */\n-    if (detached) {\n-        int error;\n-\n-        close_standard_fds();\n-\n-        error = WriteFile(write_handle, \"a\", 1, NULL, NULL);\n-        if (!error) {\n-            VLOG_FATAL(\"Failed to communicate with the parent (%s)\",\n-                       ovs_lasterror_to_string());\n-        }\n-    }\n-\n-    service_complete();\n-}\n-\n-void\n-daemon_become_new_user(bool access_datapath OVS_UNUSED,\n-                       bool access_hardware_ports OVS_UNUSED)\n-{\n-}\n-\n-/* Returns the file name that would be used for a pidfile if 'name' were\n- * provided to set_pidfile().  The caller must free the returned string. */\n-char *\n-make_pidfile_name(const char *name)\n-{\n-    if (name) {\n-        if (strchr(name, ':')) {\n-            return xstrdup(name);\n-        } else {\n-            return xasprintf(\"%s/%s\", ovs_rundir(), name);\n-        }\n-    } else {\n-        return xasprintf(\"%s/%s.pid\", ovs_rundir(), program_name);\n-    }\n-}\n-\n-void\n-daemon_set_new_user(const char *user_spec OVS_UNUSED)\n-{\n-    VLOG_FATAL(\"--user options is not currently supported.\");\n-}\ndiff --git a/lib/daemon.c b/lib/daemon.c\nindex 1e1c019eb..8081398d6 100644\n--- a/lib/daemon.c\n+++ b/lib/daemon.c\n@@ -53,9 +53,9 @@ daemonize(void)\n }\n \n /* Sets up a following call to daemonize() to create a pidfile named 'name'.\n- * If 'name' begins with '/' (or contains ':' in windows), then it is treated\n- * as an absolute path. Otherwise, it is taken relative to RUNDIR,\n- * which is $(prefix)/var/run by default.\n+ * If 'name' begins with '/', then it is treated as an absolute path.\n+ * Otherwise, it is taken relative to RUNDIR, which is $(prefix)/var/run\n+ * by default.\n  *\n  * If 'name' is null, then program_name followed by \".pid\" is used. */\n void\n@@ -104,11 +104,7 @@ static int\n get_null_fd(void)\n {\n     static int null_fd;\n-#ifndef _WIN32\n     char *device = \"/dev/null\";\n-#else\n-    char *device = \"nul\";\n-#endif\n \n     if (!null_fd) {\n         null_fd = open(device, O_RDWR);\ndiff --git a/lib/daemon.h b/lib/daemon.h\nindex 42372d146..fbf2481ba 100644\n--- a/lib/daemon.h\n+++ b/lib/daemon.h\n@@ -22,21 +22,17 @@\n #include <sys/types.h>\n \n /* This file provides an interface for utilities to run in the background\n- * as daemons on POSIX platforms like Linux or as services on Windows platform.\n- * Some of the functionalities defined in this file are only applicable to\n- * POSIX platforms and some are applicable only on Windows. As such, the\n- * function definitions unique to each platform are separated out with\n- * ifdef macros. More descriptive comments on individual functions are provided\n- * in daemon-unix.c (for POSIX platforms) and daemon-windows.c (for Windows).\n+ * as daemons on POSIX platforms.\n+ *\n+ * More descriptive comments on individual functions are provided\n+ * in daemon-unix.c.\n \n  * The DAEMON_OPTION_ENUMS, DAEMON_LONG_OPTIONS and DAEMON_OPTION_HANDLERS\n  * macros are useful for parsing command-line options in individual utilities.\n  * For e.g., the command-line option \"--monitor\" is recognized on Linux\n- * and results in calling the daemon_set_monitor() function. The same option is\n- * not recognized on Windows platform.\n+ * and results in calling the daemon_set_monitor() function.\n  */\n \n-#ifndef _WIN32\n #define DAEMON_OPTION_ENUMS                     \\\n     OPT_DETACH,                                 \\\n     OPT_NO_SELF_CONFINEMENT,                    \\\n@@ -98,71 +94,6 @@ void daemon_set_monitor(void);\n void set_no_chdir(void);\n void ignore_existing_pidfile(void);\n pid_t read_pidfile(const char *name);\n-#else\n-#define DAEMON_OPTION_ENUMS                    \\\n-    OPT_DETACH,                                \\\n-    OPT_NO_SELF_CONFINEMENT,                   \\\n-    OPT_NO_CHDIR,                              \\\n-    OPT_PIDFILE,                               \\\n-    OPT_PIPE_HANDLE,                           \\\n-    OPT_SERVICE,                               \\\n-    OPT_SERVICE_MONITOR,                       \\\n-    OPT_USER_GROUP\n-\n-#define DAEMON_LONG_OPTIONS                                               \\\n-        {\"detach\",             no_argument, NULL, OPT_DETACH},            \\\n-        {\"no-self-confinement\", no_argument, NULL, OPT_NO_SELF_CONFINEMENT}, \\\n-        {\"no-chdir\",           no_argument, NULL, OPT_NO_CHDIR},          \\\n-        {\"pidfile\",            optional_argument, NULL, OPT_PIDFILE},     \\\n-        {\"pipe-handle\",        required_argument, NULL, OPT_PIPE_HANDLE}, \\\n-        {\"service\",            no_argument, NULL, OPT_SERVICE},           \\\n-        {\"service-monitor\",    no_argument, NULL, OPT_SERVICE_MONITOR},   \\\n-        {\"user\",               required_argument, NULL, OPT_USER_GROUP}\n-\n-#define DAEMON_OPTION_HANDLERS                  \\\n-        case OPT_DETACH:                        \\\n-            set_detach();                       \\\n-            break;                              \\\n-                                                \\\n-        case OPT_NO_SELF_CONFINEMENT:           \\\n-            daemon_disable_self_confinement();  \\\n-            break;                              \\\n-                                                \\\n-        case OPT_NO_CHDIR:                      \\\n-            break;                              \\\n-                                                \\\n-        case OPT_PIDFILE:                       \\\n-            set_pidfile(optarg);                \\\n-            break;                              \\\n-                                                \\\n-        case OPT_PIPE_HANDLE:                   \\\n-            set_pipe_handle(optarg);            \\\n-            break;                              \\\n-                                                \\\n-        case OPT_SERVICE:                       \\\n-            set_detach();                       \\\n-            break;                              \\\n-                                                \\\n-        case OPT_SERVICE_MONITOR:               \\\n-            break;                              \\\n-                                                \\\n-        case OPT_USER_GROUP:                    \\\n-            daemon_set_new_user(optarg);\n-\n-#define DAEMON_OPTION_CASES                     \\\n-        case OPT_DETACH:                        \\\n-        case OPT_NO_SELF_CONFINEMENT:           \\\n-        case OPT_NO_CHDIR:                      \\\n-        case OPT_PIDFILE:                       \\\n-        case OPT_PIPE_HANDLE:                   \\\n-        case OPT_SERVICE:                       \\\n-        case OPT_SERVICE_MONITOR:               \\\n-        case OPT_USER_GROUP:\n-\n-void control_handler(DWORD request);\n-void set_pipe_handle(const char *pipe_handle);\n-void set_detach(void);\n-#endif /* _WIN32 */\n \n bool get_detach(void);\n void daemon_save_fd(int fd);\n@@ -174,9 +105,6 @@ void daemon_become_new_user(bool access_datapath, bool access_hardware_ports);\n void daemon_usage(void);\n void daemon_disable_self_confinement(void);\n bool daemon_should_self_confine(void);\n-void service_start(int *argcp, char **argvp[]);\n-void service_stop(void);\n-bool should_service_stop(void);\n void set_pidfile(const char *name);\n void close_standard_fds(void);\n \ndiff --git a/lib/daemon.man b/lib/daemon.man\nindex a92f8c4d5..0eb717686 100644\n--- a/lib/daemon.man\n+++ b/lib/daemon.man\n@@ -79,6 +79,3 @@ before dropping root privileges. Daemons that interact with a datapath,\n such as \\fBovs\\-vswitchd\\fR, will be granted three additional capabilities,\n namely CAP_NET_ADMIN, CAP_NET_BROADCAST and CAP_NET_RAW.  The capability\n change will apply even if the new user is root.\n-.IP\n-On Windows, this option is not currently supported. For security reasons,\n-specifying this option will cause the daemon process not to start.\ndiff --git a/lib/daemon.xml b/lib/daemon.xml\nindex 5a421ccab..2feec00b0 100644\n--- a/lib/daemon.xml\n+++ b/lib/daemon.xml\n@@ -113,10 +113,5 @@\n       capability change will apply even if the new user is root.\n     </p>\n \n-    <p>\n-      On Windows, this option is not currently supported.  For security\n-      reasons, specifying this option will cause the daemon process not to\n-      start.\n-    </p>\n   </dd>\n </dl>\ndiff --git a/lib/dns-resolve.c b/lib/dns-resolve.c\nindex 1212c587e..e0bbaae85 100644\n--- a/lib/dns-resolve.c\n+++ b/lib/dns-resolve.c\n@@ -98,11 +98,7 @@ dns_resolve_init(bool is_daemon)\n \n     const char *filename = getenv(\"OVS_RESOLV_CONF\");\n     if (!filename) {\n-#ifdef _WIN32\n-        /* On Windows, NULL means to use the system default nameserver. */\n-#else\n         filename = \"/etc/resolv.conf\";\n-#endif\n     }\n     struct stat s;\n     if (!filename || !stat(filename, &s) || errno != ENOENT) {\n@@ -123,7 +119,7 @@ dns_resolve_init(bool is_daemon)\n         return;\n     }\n \n-    /* Handles '/etc/hosts' on Linux and 'WINDIR/etc/hosts' on Windows. */\n+    /* Handles '/etc/hosts' on Linux. */\n     int retval = ub_ctx_hosts(ub_ctx__, NULL);\n     if (retval != 0) {\n         VLOG_WARN_RL(&rl, \"Failed to read etc/hosts: %s\",\ndiff --git a/lib/dpif-netdev-perf.h b/lib/dpif-netdev-perf.h\nindex 84beced15..8be59ade8 100644\n--- a/lib/dpif-netdev-perf.h\n+++ b/lib/dpif-netdev-perf.h\n@@ -220,12 +220,12 @@ cycles_counter_update(struct pmd_perf_stats *s)\n {\n #ifdef DPDK_NETDEV\n     return s->last_tsc = rte_get_tsc_cycles();\n-#elif !defined(_MSC_VER) && defined(__x86_64__)\n+#elif defined(__x86_64__)\n     uint32_t h, l;\n     asm volatile(\"rdtsc\" : \"=a\" (l), \"=d\" (h));\n \n     return s->last_tsc = ((uint64_t) h << 32) | l;\n-#elif !defined(_MSC_VER) && defined(__aarch64__)\n+#elif defined(__aarch64__)\n     asm volatile(\"mrs %0, cntvct_el0\" : \"=r\" (s->last_tsc));\n \n     return s->last_tsc;\ndiff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c\nindex 9df05c4c2..cb1c044e9 100644\n--- a/lib/dpif-netdev.c\n+++ b/lib/dpif-netdev.c\n@@ -8046,10 +8046,10 @@ fast_path_processing(struct dp_netdev_pmd_thread *pmd,\n                      odp_port_t in_port)\n {\n     const size_t cnt = dp_packet_batch_size(packets_);\n-#if !defined(__CHECKER__) && !defined(_WIN32)\n+#ifndef __CHECKER__\n     const size_t PKT_ARRAY_SIZE = cnt;\n #else\n-    /* Sparse or MSVC doesn't like variable length array. */\n+    /* Sparse doesn't like variable length array. */\n     enum { PKT_ARRAY_SIZE = NETDEV_MAX_BURST };\n #endif\n     struct dp_packet *packet;\n@@ -8163,10 +8163,10 @@ dp_netdev_input__(struct dp_netdev_pmd_thread *pmd,\n                   struct dp_packet_batch *packets,\n                   bool md_is_valid, odp_port_t port_no)\n {\n-#if !defined(__CHECKER__) && !defined(_WIN32)\n+#ifndef __CHECKER__\n     const size_t PKT_ARRAY_SIZE = dp_packet_batch_size(packets);\n #else\n-    /* Sparse or MSVC doesn't like variable length array. */\n+    /* Sparse doesn't like variable length array. */\n     enum { PKT_ARRAY_SIZE = NETDEV_MAX_BURST };\n #endif\n     OVS_ALIGNED_VAR(CACHE_LINE_SIZE)\ndiff --git a/lib/dpif-netlink.c b/lib/dpif-netlink.c\nindex f22a87934..65a9c3be5 100644\n--- a/lib/dpif-netlink.c\n+++ b/lib/dpif-netlink.c\n@@ -66,12 +66,7 @@\n #include \"util.h\"\n \n VLOG_DEFINE_THIS_MODULE(dpif_netlink);\n-#ifdef _WIN32\n-#include \"wmi.h\"\n-enum { WINDOWS = 1 };\n-#else\n-enum { WINDOWS = 0 };\n-#endif\n+\n enum { MAX_PORTS = USHRT_MAX };\n \n /* This ethtool flag was introduced in Linux 2.6.24, so it might be\n@@ -178,19 +173,6 @@ struct dpif_channel {\n     long long int last_poll;    /* Last time this channel was polled. */\n };\n \n-#ifdef _WIN32\n-#define VPORT_SOCK_POOL_SIZE 1\n-/* On Windows, there is no native support for epoll.  There are equivalent\n- * interfaces though, that are not used currently.  For simpicity, a pool of\n- * netlink sockets is used.  Each socket is represented by 'struct\n- * dpif_windows_vport_sock'.  Since it is a pool, multiple OVS ports may be\n- * sharing the same socket.  In the future, we can add a reference count and\n- * such fields. */\n-struct dpif_windows_vport_sock {\n-    struct nl_sock *nl_sock;    /* netlink socket. */\n-};\n-#endif\n-\n struct dpif_handler {\n     /* per-vport dispatch mode. */\n     struct epoll_event *epoll_events;\n@@ -201,13 +183,6 @@ struct dpif_handler {\n     /* per-cpu dispatch mode. */\n     struct nl_sock *sock;         /* Each handler thread holds one netlink\n                                      socket. */\n-\n-#ifdef _WIN32\n-    /* Pool of sockets. */\n-    struct dpif_windows_vport_sock *vport_sock_pool;\n-    size_t last_used_pool_idx; /* Index to aid in allocating a\n-                                  socket in the pool to a port. */\n-#endif\n };\n \n /* Datapath interface for the openvswitch Linux kernel module. */\n@@ -281,36 +256,13 @@ static int\n create_nl_sock(struct dpif_netlink *dpif OVS_UNUSED, struct nl_sock **sockp)\n     OVS_REQ_WRLOCK(dpif->upcall_lock)\n {\n-#ifndef _WIN32\n     return nl_sock_create(NETLINK_GENERIC, sockp);\n-#else\n-    /* Pick netlink sockets to use in a round-robin fashion from each\n-     * handler's pool of sockets. */\n-    struct dpif_handler *handler = &dpif->handlers[0];\n-    struct dpif_windows_vport_sock *sock_pool = handler->vport_sock_pool;\n-    size_t index = handler->last_used_pool_idx;\n-\n-    /* A pool of sockets is allocated when the handler is initialized. */\n-    if (sock_pool == NULL) {\n-        *sockp = NULL;\n-        return EINVAL;\n-    }\n-\n-    ovs_assert(index < VPORT_SOCK_POOL_SIZE);\n-    *sockp = sock_pool[index].nl_sock;\n-    ovs_assert(*sockp);\n-    index = (index == VPORT_SOCK_POOL_SIZE - 1) ? 0 : index + 1;\n-    handler->last_used_pool_idx = index;\n-    return 0;\n-#endif\n }\n \n static void\n close_nl_sock(struct nl_sock *sock)\n {\n-#ifndef _WIN32\n     nl_sock_destroy(sock);\n-#endif\n }\n \n static struct dpif_netlink *\n@@ -473,62 +425,6 @@ open_dpif(const struct dpif_netlink_dp *dp, struct dpif **dpifp)\n     return 0;\n }\n \n-#ifdef _WIN32\n-static void\n-vport_delete_sock_pool(struct dpif_handler *handler)\n-    OVS_REQ_WRLOCK(dpif->upcall_lock)\n-{\n-    if (handler->vport_sock_pool) {\n-        uint32_t i;\n-        struct dpif_windows_vport_sock *sock_pool =\n-            handler->vport_sock_pool;\n-\n-        for (i = 0; i < VPORT_SOCK_POOL_SIZE; i++) {\n-            if (sock_pool[i].nl_sock) {\n-                nl_sock_unsubscribe_packets(sock_pool[i].nl_sock);\n-                nl_sock_destroy(sock_pool[i].nl_sock);\n-                sock_pool[i].nl_sock = NULL;\n-            }\n-        }\n-\n-        free(handler->vport_sock_pool);\n-        handler->vport_sock_pool = NULL;\n-    }\n-}\n-\n-static int\n-vport_create_sock_pool(struct dpif_handler *handler)\n-    OVS_REQ_WRLOCK(dpif->upcall_lock)\n-{\n-    struct dpif_windows_vport_sock *sock_pool;\n-    size_t i;\n-    int error = 0;\n-\n-    sock_pool = xzalloc(VPORT_SOCK_POOL_SIZE * sizeof *sock_pool);\n-    for (i = 0; i < VPORT_SOCK_POOL_SIZE; i++) {\n-        error = nl_sock_create(NETLINK_GENERIC, &sock_pool[i].nl_sock);\n-        if (error) {\n-            goto error;\n-        }\n-\n-        /* Enable the netlink socket to receive packets.  This is equivalent to\n-         * calling nl_sock_join_mcgroup() to receive events. */\n-        error = nl_sock_subscribe_packets(sock_pool[i].nl_sock);\n-        if (error) {\n-           goto error;\n-        }\n-    }\n-\n-    handler->vport_sock_pool = sock_pool;\n-    handler->last_used_pool_idx = 0;\n-    return 0;\n-\n-error:\n-    vport_delete_sock_pool(handler);\n-    return error;\n-}\n-#endif /* _WIN32 */\n-\n /* Given the port number 'port_idx', extracts the pid of netlink socket\n  * associated to the port and assigns it to 'upcall_pid'. */\n static bool\n@@ -541,7 +437,6 @@ vport_get_pid(struct dpif_netlink *dpif, uint32_t port_idx,\n     if (!dpif->channels[port_idx].sock) {\n         return false;\n     }\n-    ovs_assert(!WINDOWS || dpif->n_handlers <= 1);\n \n     *upcall_pid = nl_sock_pid(dpif->channels[port_idx].sock);\n \n@@ -600,13 +495,11 @@ vport_add_channel(struct dpif_netlink *dpif, odp_port_t port_no,\n     for (i = 0; i < dpif->n_handlers; i++) {\n         struct dpif_handler *handler = &dpif->handlers[i];\n \n-#ifndef _WIN32\n         if (epoll_ctl(handler->epoll_fd, EPOLL_CTL_ADD, nl_sock_fd(sock),\n                       &event) < 0) {\n             error = errno;\n             goto error;\n         }\n-#endif\n     }\n     dpif->channels[port_idx].sock = sock;\n     dpif->channels[port_idx].last_poll = LLONG_MIN;\n@@ -614,12 +507,10 @@ vport_add_channel(struct dpif_netlink *dpif, odp_port_t port_no,\n     return 0;\n \n error:\n-#ifndef _WIN32\n     while (i--) {\n         epoll_ctl(dpif->handlers[i].epoll_fd, EPOLL_CTL_DEL,\n                   nl_sock_fd(sock), NULL);\n     }\n-#endif\n     dpif->channels[port_idx].sock = NULL;\n \n     return error;\n@@ -638,15 +529,11 @@ vport_del_channels(struct dpif_netlink *dpif, odp_port_t port_no)\n \n     for (i = 0; i < dpif->n_handlers; i++) {\n         struct dpif_handler *handler = &dpif->handlers[i];\n-#ifndef _WIN32\n         epoll_ctl(handler->epoll_fd, EPOLL_CTL_DEL,\n                   nl_sock_fd(dpif->channels[port_idx].sock), NULL);\n-#endif\n         handler->event_offset = handler->n_events = 0;\n     }\n-#ifndef _WIN32\n     nl_sock_destroy(dpif->channels[port_idx].sock);\n-#endif\n     dpif->channels[port_idx].sock = NULL;\n }\n \n@@ -1072,22 +959,9 @@ dpif_netlink_port_add_compat(struct dpif_netlink *dpif, struct netdev *netdev,\n     }\n \n     if (ovs_type == OVS_VPORT_TYPE_NETDEV) {\n-#ifdef _WIN32\n-        /* XXX : Map appropiate Windows handle */\n-#else\n         netdev_linux_ethtool_set_flag(netdev, ETH_FLAG_LRO, \"LRO\", false);\n-#endif\n     }\n \n-#ifdef _WIN32\n-    if (ovs_type == OVS_VPORT_TYPE_INTERNAL) {\n-        if (!create_wmi_port(name)){\n-            VLOG_ERR(\"Could not create wmi internal port with name:%s\", name);\n-            return EINVAL;\n-        };\n-    }\n-#endif\n-\n     tnl_cfg = netdev_get_tunnel_config(netdev);\n     if (tnl_cfg && (tnl_cfg->dst_port != 0 || tnl_cfg->exts)) {\n         ofpbuf_use_stack(&options, options_stub, sizeof options_stub);\n@@ -1180,14 +1054,7 @@ dpif_netlink_port_del__(struct dpif_netlink *dpif, odp_port_t port_no)\n     vport.cmd = OVS_VPORT_CMD_DEL;\n     vport.dp_ifindex = dpif->dp_ifindex;\n     vport.port_no = port_no;\n-#ifdef _WIN32\n-    if (!strcmp(dpif_port.type, \"internal\")) {\n-        if (!delete_wmi_port(dpif_port.name)) {\n-            VLOG_ERR(\"Could not delete wmi port with name: %s\",\n-                     dpif_port.name);\n-        };\n-    }\n-#endif\n+\n     error = dpif_netlink_vport_transact(&vport, NULL, NULL);\n \n     vport_del_channels(dpif, port_no);\n@@ -2017,20 +1884,6 @@ dpif_netlink_operate(struct dpif *dpif_, struct dpif_op **ops, size_t n_ops)\n     }\n }\n \n-#if _WIN32\n-static void\n-dpif_netlink_handler_uninit(struct dpif_handler *handler)\n-{\n-    vport_delete_sock_pool(handler);\n-}\n-\n-static int\n-dpif_netlink_handler_init(struct dpif_handler *handler)\n-{\n-    return vport_create_sock_pool(handler);\n-}\n-#else\n-\n static int\n dpif_netlink_handler_init(struct dpif_handler *handler)\n {\n@@ -2043,7 +1896,6 @@ dpif_netlink_handler_uninit(struct dpif_handler *handler)\n {\n     close(handler->epoll_fd);\n }\n-#endif\n \n /* Returns true if num is a prime number,\n  * otherwise, return false.\n@@ -2172,9 +2024,6 @@ dpif_netlink_refresh_handlers_vport_dispatch(struct dpif_netlink *dpif,\n     int retval = 0;\n     size_t i;\n \n-    ovs_assert(!WINDOWS || n_handlers <= 1);\n-    ovs_assert(!WINDOWS || dpif->n_handlers <= 1);\n-\n     if (dpif->n_handlers != n_handlers) {\n         destroy_all_channels(dpif);\n         dpif->handlers = xzalloc(n_handlers * sizeof *dpif->handlers);\n@@ -2337,14 +2186,6 @@ dpif_netlink_handlers_set(struct dpif *dpif_, uint32_t n_handlers)\n     struct dpif_netlink *dpif = dpif_netlink_cast(dpif_);\n     int error = 0;\n \n-#ifdef _WIN32\n-    /* Multiple upcall handlers will be supported once kernel datapath supports\n-     * it. */\n-    if (n_handlers > 1) {\n-        return error;\n-    }\n-#endif\n-\n     fat_rwlock_wrlock(&dpif->upcall_lock);\n     if (dpif->handlers) {\n         if (dpif_netlink_upcall_per_cpu(dpif)) {\n@@ -2466,74 +2307,6 @@ parse_odp_packet(struct ofpbuf *buf, struct dpif_upcall *upcall,\n     return 0;\n }\n \n-#ifdef _WIN32\n-#define PACKET_RECV_BATCH_SIZE 50\n-static int\n-dpif_netlink_recv_windows(struct dpif_netlink *dpif, uint32_t handler_id,\n-                          struct dpif_upcall *upcall, struct ofpbuf *buf)\n-    OVS_REQ_RDLOCK(dpif->upcall_lock)\n-{\n-    struct dpif_handler *handler;\n-    int read_tries = 0;\n-    struct dpif_windows_vport_sock *sock_pool;\n-    uint32_t i;\n-\n-    if (!dpif->handlers) {\n-        return EAGAIN;\n-    }\n-\n-    /* Only one handler is supported currently. */\n-    if (handler_id >= 1) {\n-        return EAGAIN;\n-    }\n-\n-    if (handler_id >= dpif->n_handlers) {\n-        return EAGAIN;\n-    }\n-\n-    handler = &dpif->handlers[handler_id];\n-    sock_pool = handler->vport_sock_pool;\n-\n-    for (i = 0; i < VPORT_SOCK_POOL_SIZE; i++) {\n-        for (;;) {\n-            int dp_ifindex;\n-            int error;\n-\n-            if (++read_tries > PACKET_RECV_BATCH_SIZE) {\n-                return EAGAIN;\n-            }\n-\n-            error = nl_sock_recv(sock_pool[i].nl_sock, buf, NULL, false);\n-            if (error == ENOBUFS) {\n-                /* ENOBUFS typically means that we've received so many\n-                 * packets that the buffer overflowed.  Try again\n-                 * immediately because there's almost certainly a packet\n-                 * waiting for us. */\n-                /* XXX: report_loss(dpif, ch, idx, handler_id); */\n-                continue;\n-            }\n-\n-            /* XXX: ch->last_poll = time_msec(); */\n-            if (error) {\n-                if (error == EAGAIN) {\n-                    break;\n-                }\n-                return error;\n-            }\n-\n-            error = parse_odp_packet(buf, upcall, &dp_ifindex);\n-            if (!error && dp_ifindex == dpif->dp_ifindex) {\n-                upcall->pid = 0;\n-                return 0;\n-            } else if (error) {\n-                return error;\n-            }\n-        }\n-    }\n-\n-    return EAGAIN;\n-}\n-#else\n static int\n dpif_netlink_recv_cpu_dispatch(struct dpif_netlink *dpif, uint32_t handler_id,\n                                struct dpif_upcall *upcall, struct ofpbuf *buf)\n@@ -2661,7 +2434,6 @@ dpif_netlink_recv_vport_dispatch(struct dpif_netlink *dpif,\n \n     return EAGAIN;\n }\n-#endif\n \n static int\n dpif_netlink_recv(struct dpif *dpif_, uint32_t handler_id,\n@@ -2671,41 +2443,17 @@ dpif_netlink_recv(struct dpif *dpif_, uint32_t handler_id,\n     int error;\n \n     fat_rwlock_rdlock(&dpif->upcall_lock);\n-#ifdef _WIN32\n-    error = dpif_netlink_recv_windows(dpif, handler_id, upcall, buf);\n-#else\n     if (dpif_netlink_upcall_per_cpu(dpif)) {\n         error = dpif_netlink_recv_cpu_dispatch(dpif, handler_id, upcall, buf);\n     } else {\n         error = dpif_netlink_recv_vport_dispatch(dpif,\n                                                  handler_id, upcall, buf);\n     }\n-#endif\n     fat_rwlock_unlock(&dpif->upcall_lock);\n \n     return error;\n }\n \n-#ifdef _WIN32\n-static void\n-dpif_netlink_recv_wait_windows(struct dpif_netlink *dpif, uint32_t handler_id)\n-    OVS_REQ_RDLOCK(dpif->upcall_lock)\n-{\n-    uint32_t i;\n-    struct dpif_windows_vport_sock *sock_pool =\n-        dpif->handlers[handler_id].vport_sock_pool;\n-\n-    /* Only one handler is supported currently. */\n-    if (handler_id >= 1) {\n-        return;\n-    }\n-\n-    for (i = 0; i < VPORT_SOCK_POOL_SIZE; i++) {\n-        nl_sock_wait(sock_pool[i].nl_sock, POLLIN);\n-    }\n-}\n-#else\n-\n static void\n dpif_netlink_recv_wait_vport_dispatch(struct dpif_netlink *dpif,\n                                       uint32_t handler_id)\n@@ -2729,7 +2477,6 @@ dpif_netlink_recv_wait_cpu_dispatch(struct dpif_netlink *dpif,\n         poll_fd_wait(nl_sock_fd(handler->sock), POLLIN);\n     }\n }\n-#endif\n \n static void\n dpif_netlink_recv_wait(struct dpif *dpif_, uint32_t handler_id)\n@@ -2737,15 +2484,11 @@ dpif_netlink_recv_wait(struct dpif *dpif_, uint32_t handler_id)\n     struct dpif_netlink *dpif = dpif_netlink_cast(dpif_);\n \n     fat_rwlock_rdlock(&dpif->upcall_lock);\n-#ifdef _WIN32\n-    dpif_netlink_recv_wait_windows(dpif, handler_id);\n-#else\n     if (dpif_netlink_upcall_per_cpu(dpif)) {\n         dpif_netlink_recv_wait_cpu_dispatch(dpif, handler_id);\n     } else {\n         dpif_netlink_recv_wait_vport_dispatch(dpif, handler_id);\n     }\n-#endif\n     fat_rwlock_unlock(&dpif->upcall_lock);\n }\n \n@@ -3122,11 +2865,7 @@ dpif_netlink_ct_get_features(struct dpif *dpif OVS_UNUSED,\n                              enum ct_features *features)\n {\n     if (features != NULL) {\n-#ifndef _WIN32\n         *features = CONNTRACK_F_ZERO_SNAT;\n-#else\n-        *features = 0;\n-#endif\n     }\n     return 0;\n }\n@@ -3275,51 +3014,6 @@ dpif_netlink_set_ct_dpif_tp_attrs(const struct nl_ct_timeout_policy *nl_tp,\n     }\n }\n \n-#ifdef _WIN32\n-static int\n-dpif_netlink_ct_set_timeout_policy(struct dpif *dpif OVS_UNUSED,\n-                                   const struct ct_dpif_timeout_policy *tp)\n-{\n-    return EOPNOTSUPP;\n-}\n-\n-static int\n-dpif_netlink_ct_get_timeout_policy(struct dpif *dpif OVS_UNUSED,\n-                                   uint32_t tp_id,\n-                                   struct ct_dpif_timeout_policy *tp)\n-{\n-    return EOPNOTSUPP;\n-}\n-\n-static int\n-dpif_netlink_ct_del_timeout_policy(struct dpif *dpif OVS_UNUSED,\n-                                   uint32_t tp_id)\n-{\n-    return EOPNOTSUPP;\n-}\n-\n-static int\n-dpif_netlink_ct_timeout_policy_dump_start(struct dpif *dpif OVS_UNUSED,\n-                                          void **statep)\n-{\n-    return EOPNOTSUPP;\n-}\n-\n-static int\n-dpif_netlink_ct_timeout_policy_dump_next(struct dpif *dpif OVS_UNUSED,\n-                                         void *state,\n-                                         struct ct_dpif_timeout_policy **tp)\n-{\n-    return EOPNOTSUPP;\n-}\n-\n-static int\n-dpif_netlink_ct_timeout_policy_dump_done(struct dpif *dpif OVS_UNUSED,\n-                                         void *state)\n-{\n-    return EOPNOTSUPP;\n-}\n-#else\n static int\n dpif_netlink_ct_set_timeout_policy(struct dpif *dpif OVS_UNUSED,\n                                    const struct ct_dpif_timeout_policy *tp)\n@@ -3555,8 +3249,6 @@ dpif_netlink_ct_timeout_policy_dump_done(struct dpif *dpif OVS_UNUSED,\n     free(dump_state);\n     return err;\n }\n-#endif\n-\n \f\n /* Meters */\n \ndiff --git a/lib/dpif.c b/lib/dpif.c\nindex cab588425..1afc7c662 100644\n--- a/lib/dpif.c\n+++ b/lib/dpif.c\n@@ -75,7 +75,7 @@ COVERAGE_DEFINE(dpif_port_del);\n COVERAGE_DEFINE(dpif_purge);\n \n static const struct dpif_class *base_dpif_classes[] = {\n-#if defined(__linux__) || defined(_WIN32)\n+#ifdef __linux__\n     &dpif_netlink_class,\n #endif\n     &dpif_netdev_class,\ndiff --git a/lib/entropy.c b/lib/entropy.c\nindex 05cc64835..7aaacd8f0 100644\n--- a/lib/entropy.c\n+++ b/lib/entropy.c\n@@ -20,9 +20,6 @@\n #include <errno.h>\n #include <fcntl.h>\n #include <unistd.h>\n-#ifdef _WIN32\n-#include <Wincrypt.h>\n-#endif\n #include \"util.h\"\n #include \"socket-util.h\"\n #include \"openvswitch/vlog.h\"\n@@ -36,7 +33,6 @@ static const char urandom[] = \"/dev/urandom\";\n int\n get_entropy(void *buffer, size_t n)\n {\n-#ifndef _WIN32\n     size_t bytes_read;\n     int error;\n     int fd;\n@@ -53,19 +49,6 @@ get_entropy(void *buffer, size_t n)\n     if (error) {\n         VLOG_ERR(\"%s: read error (%s)\", urandom, ovs_retval_to_string(error));\n     }\n-#else\n-    int error = 0;\n-    HCRYPTPROV   crypt_prov = 0;\n-\n-    CryptAcquireContext(&crypt_prov, NULL, NULL,\n-                        PROV_RSA_FULL, CRYPT_VERIFYCONTEXT);\n-    if (!CryptGenRandom(crypt_prov, n, buffer)) {\n-        VLOG_ERR(\"CryptGenRandom: read error (%s)\", ovs_lasterror_to_string());\n-        error = EINVAL;\n-    }\n-\n-    CryptReleaseContext(crypt_prov, 0);\n-#endif\n     return error;\n }\n \ndiff --git a/lib/fatal-signal.c b/lib/fatal-signal.c\nindex 83a7bbe93..2c86ba290 100644\n--- a/lib/fatal-signal.c\n+++ b/lib/fatal-signal.c\n@@ -50,12 +50,8 @@\n VLOG_DEFINE_THIS_MODULE(fatal_signal);\n \n /* Signals to catch. */\n-#ifndef _WIN32\n static const int fatal_signals[] = { SIGTERM, SIGINT, SIGHUP, SIGALRM,\n                                      SIGSEGV };\n-#else\n-static const int fatal_signals[] = { SIGTERM };\n-#endif\n \n /* Hooks to call upon catching a signal */\n struct hook {\n@@ -71,17 +67,10 @@ static size_t n_hooks;\n static int signal_fds[2];\n static volatile sig_atomic_t stored_sig_nr = SIG_ATOMIC_MAX;\n \n-#ifdef _WIN32\n-static HANDLE wevent;\n-#endif\n-\n static struct ovs_mutex mutex;\n \n static void call_hooks(int sig_nr)\n     OVS_REQUIRES(mutex);\n-#ifdef _WIN32\n-static BOOL WINAPI ConsoleHandlerRoutine(DWORD dwCtrlType);\n-#endif\n \n /* Sets up a pipe or event handle that will be used to wake up the current\n  * process after signal is received, so it can be processed outside of the\n@@ -89,30 +78,16 @@ static BOOL WINAPI ConsoleHandlerRoutine(DWORD dwCtrlType);\n static void\n fatal_signal_create_wakeup_events(void)\n {\n-#ifndef _WIN32\n     xpipe_nonblocking(signal_fds);\n-#else\n-    wevent = CreateEvent(NULL, TRUE, FALSE, NULL);\n-    if (!wevent) {\n-        char *msg_buf = ovs_lasterror_to_string();\n-        VLOG_FATAL(\"Failed to create a event (%s).\", msg_buf);\n-    }\n-#endif\n }\n \n static void\n fatal_signal_destroy_wakeup_events(void)\n {\n-#ifndef _WIN32\n     close(signal_fds[0]);\n     signal_fds[0] = -1;\n     close(signal_fds[1]);\n     signal_fds[1] = -1;\n-#else\n-    ResetEvent(wevent);\n-    CloseHandle(wevent);\n-    wevent = NULL;\n-#endif\n }\n \n \n@@ -141,14 +116,8 @@ fatal_signal_init(void)\n \n         fatal_signal_create_wakeup_events();\n \n-#ifdef _WIN32\n-        /* Register a function to handle Ctrl+C. */\n-        SetConsoleCtrlHandler(ConsoleHandlerRoutine, true);\n-#endif\n-\n         for (i = 0; i < ARRAY_SIZE(fatal_signals); i++) {\n             int sig_nr = fatal_signals[i];\n-#ifndef _WIN32\n             struct sigaction old_sa;\n \n             xsigaction(sig_nr, NULL, &old_sa);\n@@ -156,11 +125,6 @@ fatal_signal_init(void)\n                 && signal(sig_nr, fatal_signal_handler) == SIG_ERR) {\n                 VLOG_FATAL(\"signal failed (%s)\", ovs_strerror(errno));\n             }\n-#else\n-            if (signal(sig_nr, fatal_signal_handler) == SIG_ERR) {\n-                VLOG_FATAL(\"signal failed (%s)\", ovs_strerror(errno));\n-            }\n-#endif\n         }\n         atexit(fatal_signal_atexit_handler);\n     }\n@@ -327,16 +291,12 @@ send_backtrace_to_monitor(void) {\n void\n fatal_signal_handler(int sig_nr)\n {\n-#ifndef _WIN32\n     if (sig_nr == SIGSEGV) {\n         signal(sig_nr, SIG_DFL); /* Set it back immediately. */\n         send_backtrace_to_monitor();\n         raise(sig_nr);\n     }\n     ovs_ignore(write(signal_fds[1], \"\", 1));\n-#else\n-    SetEvent(wevent);\n-#endif\n     stored_sig_nr = sig_nr;\n }\n \n@@ -364,12 +324,8 @@ fatal_signal_run(void)\n \n         ovs_mutex_lock(&mutex);\n \n-#ifndef _WIN32\n         VLOG_WARN(\"terminating with signal %d (%s)\",\n                   (int)sig_nr, signal_name(sig_nr, namebuf, sizeof namebuf));\n-#else\n-        VLOG_WARN(\"terminating with signal %d\", (int)sig_nr);\n-#endif\n         call_hooks(sig_nr);\n         fflush(stderr);\n \n@@ -387,19 +343,13 @@ void\n fatal_signal_wait(void)\n {\n     fatal_signal_init();\n-#ifdef _WIN32\n-    poll_wevent_wait(wevent);\n-#else\n     poll_fd_wait(signal_fds[0], POLLIN);\n-#endif\n }\n \n void\n fatal_ignore_sigpipe(void)\n {\n-#ifndef _WIN32\n     signal(SIGPIPE, SIG_IGN);\n-#endif\n }\n \n void\n@@ -429,14 +379,6 @@ call_hooks(int sig_nr)\n     }\n }\n \n-#ifdef _WIN32\n-BOOL WINAPI ConsoleHandlerRoutine(DWORD dwCtrlType)\n-{\n-    stored_sig_nr = SIGINT;\n-    SetEvent(wevent);\n-    return true;\n-}\n-#endif\n \f\n /* Files to delete on exit. */\n static struct sset files = SSET_INITIALIZER(&files);\n@@ -560,7 +502,6 @@ fatal_signal_fork(void)\n     }\n }\n \n-#ifndef _WIN32\n /* Blocks all fatal signals and returns previous signal mask into\n  * 'prev_mask'. */\n void\n@@ -576,4 +517,3 @@ fatal_signal_block(sigset_t *prev_mask)\n     }\n     xpthread_sigmask(SIG_BLOCK, &block_mask, prev_mask);\n }\n-#endif\ndiff --git a/lib/fatal-signal.h b/lib/fatal-signal.h\nindex c3626164c..3ad9cdd31 100644\n--- a/lib/fatal-signal.h\n+++ b/lib/fatal-signal.h\n@@ -17,9 +17,7 @@\n #ifndef FATAL_SIGNAL_H\n #define FATAL_SIGNAL_H 1\n \n-#ifndef _WIN32\n #include <signal.h>\n-#endif\n #include <stdbool.h>\n \n /* Basic interface. */\n@@ -45,8 +43,6 @@ int fatal_signal_unlink_file_now(const char *);\n  * it through. */\n void fatal_signal_handler(int sig_nr);\n \n-#ifndef _WIN32\n void fatal_signal_block(sigset_t *prev_mask);\n-#endif\n \n #endif /* fatal-signal.h */\ndiff --git a/lib/getopt_long.c b/lib/getopt_long.c\ndeleted file mode 100644\nindex 0663762fb..000000000\n--- a/lib/getopt_long.c\n+++ /dev/null\n@@ -1,459 +0,0 @@\n-/*-\n- * Copyright (c) 2000 The NetBSD Foundation, Inc.\n- * All rights reserved.\n- *\n- * This code is derived from software contributed to The NetBSD Foundation\n- * by Dieter Baron and Thomas Klausner.\n- *\n- * Redistribution and use in source and binary forms, with or without\n- * modification, are permitted provided that the following conditions\n- * are met:\n- * 1. Redistributions of source code must retain the above copyright\n- *    notice, this list of conditions and the following disclaimer.\n- * 2. Redistributions in binary form must reproduce the above copyright\n- *    notice, this list of conditions and the following disclaimer in the\n- *    documentation and/or other materials provided with the distribution.\n- *\n- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS\n- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED\n- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS\n- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n- * POSSIBILITY OF SUCH DAMAGE.\n- */\n-\n-#include <config.h>\n-#include <errno.h>\n-#include <getopt.h>\n-#include <stdlib.h>\n-#include <string.h>\n-#include \"util.h\"\n-#include \"openvswitch/vlog.h\"\n-\n-VLOG_DEFINE_THIS_MODULE(getopt_long);\n-\n-int\topterr = 1;\t\t/* if error message should be printed */\n-int\toptind = 1;\t\t/* index into parent argv vector */\n-int\toptopt = '?';\t\t/* character checked for validity */\n-int\toptreset;\t\t/* reset getopt */\n-char    *optarg;\t\t/* argument associated with option */\n-\n-#define IGNORE_FIRST\t(*options == '-' || *options == '+')\n-#define PRINT_ERROR\t((opterr) && ((*options != ':') \\\n-\t\t\t\t      || (IGNORE_FIRST && options[1] != ':')))\n-#define IS_POSIXLY_CORRECT (getenv(\"POSIXLY_CORRECT\") != NULL)\n-#define PERMUTE         (!IS_POSIXLY_CORRECT && !IGNORE_FIRST)\n-/* XXX: GNU ignores PC if *options == '-' */\n-#define IN_ORDER        (!IS_POSIXLY_CORRECT && *options == '-')\n-\n-/* return values */\n-#define\tBADCH\t(int)'?'\n-#define\tBADARG\t\t((IGNORE_FIRST && options[1] == ':') \\\n-\t\t\t || (*options == ':') ? (int)':' : (int)'?')\n-#define INORDER (int)1\n-\n-#define\tEMSG\t\"\"\n-\n-#define _DIAGASSERT(q) ovs_assert(q)\n-\n-#define warnx VLOG_WARN\n-\n-static int getopt_internal(int, char **, const char *);\n-static int gcd(int, int);\n-static void permute_args(int, int, int, char **);\n-\n-static const char *place = EMSG; /* option letter processing */\n-\n-/* XXX: set optreset to 1 rather than these two */\n-static int nonopt_start = -1; /* first non option argument (for permute) */\n-static int nonopt_end = -1;   /* first option after non options (for permute) */\n-\n-/* Error messages */\n-static const char recargchar[] = \"option requires an argument -- %c\";\n-static const char recargstring[] = \"option requires an argument -- %s\";\n-static const char ambig[] = \"ambiguous option -- %.*s\";\n-static const char noarg[] = \"option doesn't take an argument -- %.*s\";\n-static const char illoptchar[] = \"unknown option -- %c\";\n-static const char illoptstring[] = \"unknown option -- %s\";\n-\n-\n-/*\n- * Compute the greatest common divisor of a and b.\n- */\n-static int\n-gcd(int a, int b)\n-{\n-\tint c;\n-\n-\tc = a % b;\n-\twhile (c != 0) {\n-\t\ta = b;\n-\t\tb = c;\n-\t\tc = a % b;\n-\t}\n-\n-\treturn b;\n-}\n-\n-/*\n- * Exchange the block from nonopt_start to nonopt_end with the block\n- * from nonopt_end to opt_end (keeping the same order of arguments\n- * in each block).\n- */\n-static void\n-permute_args(int panonopt_start, int panonopt_end, int opt_end, char **nargv)\n-{\n-\tint cstart, cyclelen, i, j, ncycle, nnonopts, nopts, pos;\n-\tchar *swap;\n-\n-\t_DIAGASSERT(nargv != NULL);\n-\n-\t/*\n-\t * compute lengths of blocks and number and size of cycles\n-\t */\n-\tnnonopts = panonopt_end - panonopt_start;\n-\tnopts = opt_end - panonopt_end;\n-\tncycle = gcd(nnonopts, nopts);\n-\tcyclelen = (opt_end - panonopt_start) / ncycle;\n-\n-\tfor (i = 0; i < ncycle; i++) {\n-\t\tcstart = panonopt_end+i;\n-\t\tpos = cstart;\n-\t\tfor (j = 0; j < cyclelen; j++) {\n-\t\t\tif (pos >= panonopt_end)\n-\t\t\t\tpos -= nnonopts;\n-\t\t\telse\n-\t\t\t\tpos += nopts;\n-\t\t\tswap = nargv[pos];\n-\t\t\tnargv[pos] = nargv[cstart];\n-\t\t\tnargv[cstart] = swap;\n-\t\t}\n-\t}\n-}\n-\n-/*\n- * getopt_internal --\n- *\tParse argc/argv argument vector.  Called by user level routines.\n- *  Returns -2 if -- is found (can be long option or end of options marker).\n- */\n-static int\n-getopt_internal(int nargc, char **nargv, const char *options)\n-{\n-\tchar *oli;\t\t\t\t/* option letter list index */\n-\tint optchar;\n-\n-\t_DIAGASSERT(nargv != NULL);\n-\t_DIAGASSERT(options != NULL);\n-\n-\toptarg = NULL;\n-\n-\t/*\n-\t * XXX Some programs (like rsyncd) expect to be able to\n-\t * XXX re-initialize optind to 0 and have getopt_long(3)\n-\t * XXX properly function again.  Work around this braindamage.\n-\t */\n-\tif (optind == 0)\n-\t\toptind = 1;\n-\n-\tif (optreset)\n-\t\tnonopt_start = nonopt_end = -1;\n-start:\n-\tif (optreset || !*place) {\t\t/* update scanning pointer */\n-\t\toptreset = 0;\n-\t\tif (optind >= nargc) {          /* end of argument vector */\n-\t\t\tplace = EMSG;\n-\t\t\tif (nonopt_end != -1) {\n-\t\t\t\t/* do permutation, if we have to */\n-\t\t\t\tpermute_args(nonopt_start, nonopt_end,\n-\t\t\t\t    optind, nargv);\n-\t\t\t\toptind -= nonopt_end - nonopt_start;\n-\t\t\t}\n-\t\t\telse if (nonopt_start != -1) {\n-\t\t\t\t/*\n-\t\t\t\t * If we skipped non-options, set optind\n-\t\t\t\t * to the first of them.\n-\t\t\t\t */\n-\t\t\t\toptind = nonopt_start;\n-\t\t\t}\n-\t\t\tnonopt_start = nonopt_end = -1;\n-\t\t\treturn -1;\n-\t\t}\n-\t\tif ((*(place = nargv[optind]) != '-')\n-\t\t    || (place[1] == '\\0')) {    /* found non-option */\n-\t\t\tplace = EMSG;\n-\t\t\tif (IN_ORDER) {\n-\t\t\t\t/*\n-\t\t\t\t * GNU extension:\n-\t\t\t\t * return non-option as argument to option 1\n-\t\t\t\t */\n-\t\t\t\toptarg = nargv[optind++];\n-\t\t\t\treturn INORDER;\n-\t\t\t}\n-\t\t\tif (!PERMUTE) {\n-\t\t\t\t/*\n-\t\t\t\t * if no permutation wanted, stop parsing\n-\t\t\t\t * at first non-option\n-\t\t\t\t */\n-\t\t\t\treturn -1;\n-\t\t\t}\n-\t\t\t/* do permutation */\n-\t\t\tif (nonopt_start == -1)\n-\t\t\t\tnonopt_start = optind;\n-\t\t\telse if (nonopt_end != -1) {\n-\t\t\t\tpermute_args(nonopt_start, nonopt_end,\n-\t\t\t\t    optind, nargv);\n-\t\t\t\tnonopt_start = optind -\n-\t\t\t\t    (nonopt_end - nonopt_start);\n-\t\t\t\tnonopt_end = -1;\n-\t\t\t}\n-\t\t\toptind++;\n-\t\t\t/* process next argument */\n-\t\t\tgoto start;\n-\t\t}\n-\t\tif (nonopt_start != -1 && nonopt_end == -1)\n-\t\t\tnonopt_end = optind;\n-\t\tif (place[1] && *++place == '-') {\t/* found \"--\" */\n-\t\t\tplace++;\n-\t\t\treturn -2;\n-\t\t}\n-\t}\n-\tif ((optchar = (int)*place++) == (int)':' ||\n-\t    (oli = strchr(options + (IGNORE_FIRST ? 1 : 0), optchar)) == NULL) {\n-\t\t/* option letter unknown or ':' */\n-\t\tif (!*place)\n-\t\t\t++optind;\n-\t\tif (PRINT_ERROR)\n-\t\t\twarnx(illoptchar, optchar);\n-\t\toptopt = optchar;\n-\t\treturn BADCH;\n-\t}\n-\tif (optchar == 'W' && oli[1] == ';') {\t\t/* -W long-option */\n-\t\t/* XXX: what if no long options provided (called by getopt)? */\n-\t\tif (*place)\n-\t\t\treturn -2;\n-\n-\t\tif (++optind >= nargc) {\t/* no arg */\n-\t\t\tplace = EMSG;\n-\t\t\tif (PRINT_ERROR)\n-\t\t\t\twarnx(recargchar, optchar);\n-\t\t\toptopt = optchar;\n-\t\t\treturn BADARG;\n-\t\t} else\t\t\t\t/* white space */\n-\t\t\tplace = nargv[optind];\n-\t\t/*\n-\t\t * Handle -W arg the same as --arg (which causes getopt to\n-\t\t * stop parsing).\n-\t\t */\n-\t\treturn -2;\n-\t}\n-\tif (*++oli != ':') {\t\t\t/* doesn't take argument */\n-\t\tif (!*place)\n-\t\t\t++optind;\n-\t} else {\t\t\t\t/* takes (optional) argument */\n-\t\toptarg = NULL;\n-\t\tif (*place)\t\t\t/* no white space */\n-\t\t\toptarg = CONST_CAST(char *, place);\n-\t\t/* XXX: disable test for :: if PC? (GNU doesn't) */\n-\t\telse if (oli[1] != ':') {\t/* arg not optional */\n-\t\t\tif (++optind >= nargc) {\t/* no arg */\n-\t\t\t\tplace = EMSG;\n-\t\t\t\tif (PRINT_ERROR)\n-\t\t\t\t\twarnx(recargchar, optchar);\n-\t\t\t\toptopt = optchar;\n-\t\t\t\treturn BADARG;\n-\t\t\t} else\n-\t\t\t\toptarg = nargv[optind];\n-\t\t}\n-\t\tplace = EMSG;\n-\t\t++optind;\n-\t}\n-\t/* dump back option letter */\n-\treturn optchar;\n-}\n-\n-#ifdef REPLACE_GETOPT\n-/*\n- * getopt --\n- *\tParse argc/argv argument vector.\n- *\n- * [eventually this will replace the real getopt]\n- */\n-int\n-getopt(nargc, nargv, options)\n-\tint nargc;\n-\tchar * const *nargv;\n-\tconst char *options;\n-{\n-\tint retval;\n-\n-\t_DIAGASSERT(nargv != NULL);\n-\t_DIAGASSERT(options != NULL);\n-\n-    retval = getopt_internal(nargc, CONST_CAST(char **, nargv), options);\n-\tif (retval == -2) {\n-\t\t++optind;\n-\t\t/*\n-\t\t * We found an option (--), so if we skipped non-options,\n-\t\t * we have to permute.\n-\t\t */\n-\t\tif (nonopt_end != -1) {\n-\t\t\tpermute_args(nonopt_start, nonopt_end, optind,\n-\t\t\t\t       nargv);\n-\t\t\toptind -= nonopt_end - nonopt_start;\n-\t\t}\n-\t\tnonopt_start = nonopt_end = -1;\n-\t\tretval = -1;\n-\t}\n-\treturn retval;\n-}\n-#endif\n-\n-/*\n- * getopt_long --\n- *\tParse argc/argv argument vector.\n- */\n-int\n-getopt_long(int nargc, char * const *nargv, const char *options,\n-    const struct option *long_options, int *idx)\n-{\n-\tint retval;\n-\n-#define IDENTICAL_INTERPRETATION(_x, _y)\t\t\t\t\\\n-\t(long_options[(_x)].has_arg == long_options[(_y)].has_arg &&\t\\\n-\t long_options[(_x)].flag == long_options[(_y)].flag &&\t\t\\\n-\t long_options[(_x)].val == long_options[(_y)].val)\n-\n-\t_DIAGASSERT(nargv != NULL);\n-\t_DIAGASSERT(options != NULL);\n-\t_DIAGASSERT(long_options != NULL);\n-\t/* idx may be NULL */\n-\n-    retval = getopt_internal(nargc, CONST_CAST(char **, nargv), options);\n-\tif (retval == -2) {\n-\t\tchar *current_argv, *has_equal;\n-\t\tsize_t current_argv_len;\n-\t\tint i, ambiguous, match;\n-\n-        current_argv = CONST_CAST(char *, place);\n-\t\tmatch = -1;\n-\t\tambiguous = 0;\n-\n-\t\toptind++;\n-\t\tplace = EMSG;\n-\n-\t\tif (*current_argv == '\\0') {\t\t/* found \"--\" */\n-\t\t\t/*\n-\t\t\t * We found an option (--), so if we skipped\n-\t\t\t * non-options, we have to permute.\n-\t\t\t */\n-\t\t\tif (nonopt_end != -1) {\n-\t\t\t\tpermute_args(nonopt_start, nonopt_end,\n-                    optind, CONST_CAST(char **, nargv));\n-\t\t\t\toptind -= nonopt_end - nonopt_start;\n-\t\t\t}\n-\t\t\tnonopt_start = nonopt_end = -1;\n-\t\t\treturn -1;\n-\t\t}\n-\t\tif ((has_equal = strchr(current_argv, '=')) != NULL) {\n-\t\t\t/* argument found (--option=arg) */\n-\t\t\tcurrent_argv_len = has_equal - current_argv;\n-\t\t\thas_equal++;\n-\t\t} else\n-\t\t\tcurrent_argv_len = strlen(current_argv);\n-\n-\t\tfor (i = 0; long_options[i].name; i++) {\n-\t\t\t/* find matching long option */\n-\t\t\tif (strncmp(current_argv, long_options[i].name,\n-\t\t\t    current_argv_len))\n-\t\t\t\tcontinue;\n-\n-\t\t\tif (strlen(long_options[i].name) ==\n-\t\t\t    (unsigned)current_argv_len) {\n-\t\t\t\t/* exact match */\n-\t\t\t\tmatch = i;\n-\t\t\t\tambiguous = 0;\n-\t\t\t\tbreak;\n-\t\t\t}\n-\t\t\tif (match == -1)\t\t/* partial match */\n-\t\t\t\tmatch = i;\n-\t\t\telse if (!IDENTICAL_INTERPRETATION(i, match))\n-\t\t\t\tambiguous = 1;\n-\t\t}\n-\t\tif (ambiguous) {\n-\t\t\t/* ambiguous abbreviation */\n-\t\t\tif (PRINT_ERROR)\n-\t\t\t\twarnx(ambig, (int)current_argv_len,\n-\t\t\t\t     current_argv);\n-\t\t\toptopt = 0;\n-\t\t\treturn BADCH;\n-\t\t}\n-\t\tif (match != -1) {\t\t\t/* option found */\n-\t\t        if (long_options[match].has_arg == no_argument\n-\t\t\t    && has_equal) {\n-\t\t\t\tif (PRINT_ERROR)\n-\t\t\t\t\twarnx(noarg, (int)current_argv_len,\n-\t\t\t\t\t     current_argv);\n-\t\t\t\t/*\n-\t\t\t\t * XXX: GNU sets optopt to val regardless of\n-\t\t\t\t * flag\n-\t\t\t\t */\n-\t\t\t\tif (long_options[match].flag == NULL)\n-\t\t\t\t\toptopt = long_options[match].val;\n-\t\t\t\telse\n-\t\t\t\t\toptopt = 0;\n-\t\t\t\treturn BADARG;\n-\t\t\t}\n-\t\t\tif (long_options[match].has_arg == required_argument ||\n-\t\t\t    long_options[match].has_arg == optional_argument) {\n-\t\t\t\tif (has_equal)\n-\t\t\t\t\toptarg = has_equal;\n-\t\t\t\telse if (long_options[match].has_arg ==\n-\t\t\t\t    required_argument) {\n-\t\t\t\t\t/*\n-\t\t\t\t\t * optional argument doesn't use\n-\t\t\t\t\t * next nargv\n-\t\t\t\t\t */\n-\t\t\t\t\toptarg = nargv[optind++];\n-\t\t\t\t}\n-\t\t\t}\n-\t\t\tif ((long_options[match].has_arg == required_argument)\n-\t\t\t    && (optarg == NULL)) {\n-\t\t\t\t/*\n-\t\t\t\t * Missing argument; leading ':'\n-\t\t\t\t * indicates no error should be generated\n-\t\t\t\t */\n-\t\t\t\tif (PRINT_ERROR)\n-\t\t\t\t\twarnx(recargstring, current_argv);\n-\t\t\t\t/*\n-\t\t\t\t * XXX: GNU sets optopt to val regardless\n-\t\t\t\t * of flag\n-\t\t\t\t */\n-\t\t\t\tif (long_options[match].flag == NULL)\n-\t\t\t\t\toptopt = long_options[match].val;\n-\t\t\t\telse\n-\t\t\t\t\toptopt = 0;\n-\t\t\t\t--optind;\n-\t\t\t\treturn BADARG;\n-\t\t\t}\n-\t\t} else {\t\t\t/* unknown option */\n-\t\t\tif (PRINT_ERROR)\n-\t\t\t\twarnx(illoptstring, current_argv);\n-\t\t\toptopt = 0;\n-\t\t\treturn BADCH;\n-\t\t}\n-\t\tif (long_options[match].flag) {\n-\t\t\t*long_options[match].flag = long_options[match].val;\n-\t\t\tretval = 0;\n-\t\t} else\n-\t\t\tretval = long_options[match].val;\n-\t\tif (idx)\n-\t\t\t*idx = match;\n-\t}\n-\treturn retval;\n-#undef IDENTICAL_INTERPRETATION\n-}\ndiff --git a/lib/getrusage-windows.c b/lib/getrusage-windows.c\ndeleted file mode 100644\nindex 915725e37..000000000\n--- a/lib/getrusage-windows.c\n+++ /dev/null\n@@ -1,78 +0,0 @@\n-/*\n- * Copyright (c) 2014 Nicira, Inc.\n- *\n- * Licensed under the Apache License, Version 2.0 (the \"License\");\n- * you may not use this file except in compliance with the License.\n- * You may obtain a copy of the License at:\n- *\n- *     http://www.apache.org/licenses/LICENSE-2.0\n- *\n- * Unless required by applicable law or agreed to in writing, software\n- * distributed under the License is distributed on an \"AS IS\" BASIS,\n- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n- * See the License for the specific language governing permissions and\n- * limitations under the License.\n- */\n-\n-#include <config.h>\n-#include <errno.h>\n-#include <psapi.h>\n-#include <sys/resource.h>\n-#include <time.h>\n-#include \"util.h\"\n-#include \"openvswitch/vlog.h\"\n-\n-VLOG_DEFINE_THIS_MODULE(getrusage_windows);\n-\n-static void\n-usage_to_timeval(FILETIME *ft, struct timeval *tv)\n-{\n-    ULARGE_INTEGER time;\n-    time.LowPart = ft->dwLowDateTime;\n-    time.HighPart = ft->dwHighDateTime;\n-\n-    tv->tv_sec = time.QuadPart / 10000000;\n-    tv->tv_usec = (time.QuadPart % 10000000) / 10;\n-}\n-\n-int\n-getrusage(int who, struct rusage *usage)\n-{\n-    FILETIME creation_time, exit_time, kernel_time, user_time;\n-    PROCESS_MEMORY_COUNTERS pmc;\n-\n-    memset(usage, 0, sizeof(struct rusage));\n-\n-    if (who == RUSAGE_SELF) {\n-        if (!GetProcessTimes(GetCurrentProcess(), &creation_time, &exit_time,\n-                             &kernel_time, &user_time)) {\n-            VLOG_ERR(\"failed at GetProcessTimes: %s\",\n-                      ovs_lasterror_to_string());\n-            return -1;\n-        }\n-\n-        if (!GetProcessMemoryInfo(GetCurrentProcess(), &pmc, sizeof(pmc))) {\n-            VLOG_ERR(\"failed at GetProcessMemoryInfo: %s\",\n-                      ovs_lasterror_to_string());\n-            return -1;\n-        }\n-\n-        usage_to_timeval(&kernel_time, &usage->ru_stime);\n-        usage_to_timeval(&user_time, &usage->ru_utime);\n-        usage->ru_majflt = pmc.PageFaultCount;\n-        usage->ru_maxrss = pmc.PeakWorkingSetSize / 1024;\n-        return 0;\n-    } else if (who == RUSAGE_THREAD) {\n-        if (!GetThreadTimes(GetCurrentThread(), &creation_time, &exit_time,\n-                            &kernel_time, &user_time)) {\n-            VLOG_ERR(\"failed at GetThreadTimes: %s\",\n-                      ovs_lasterror_to_string());\n-            return -1;\n-        }\n-        usage_to_timeval(&kernel_time, &usage->ru_stime);\n-        usage_to_timeval(&user_time, &usage->ru_utime);\n-        return 0;\n-    } else {\n-        return -1;\n-    }\n-}\ndiff --git a/lib/if-notifier-stub.c b/lib/if-notifier-stub.c\ndeleted file mode 100644\nindex a5b529a4a..000000000\n--- a/lib/if-notifier-stub.c\n+++ /dev/null\n@@ -1,41 +0,0 @@\n-/*\n- * Copyright (c) 2015 Red Hat, Inc.\n- *\n- * Licensed under the Apache License, Version 2.0 (the \"License\");\n- * you may not use this file except in compliance with the License.\n- * You may obtain a copy of the License at:\n- *\n- *     http://www.apache.org/licenses/LICENSE-2.0\n- *\n- * Unless required by applicable law or agreed to in writing, software\n- * distributed under the License is distributed on an \"AS IS\" BASIS,\n- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n- * See the License for the specific language governing permissions and\n- * limitations under the License.\n- */\n-\n-#include <config.h>\n-#include \"if-notifier.h\"\n-#include <stddef.h>\n-#include \"compiler.h\"\n-\n-struct if_notifier *\n-if_notifier_create(if_notify_func *cb OVS_UNUSED, void *aux OVS_UNUSED)\n-{\n-    return NULL;\n-}\n-\n-void\n-if_notifier_destroy(struct if_notifier *notifier OVS_UNUSED)\n-{\n-}\n-\n-void\n-if_notifier_run(void)\n-{\n-}\n-\n-void\n-if_notifier_wait(void)\n-{\n-}\ndiff --git a/lib/latch-windows.c b/lib/latch-windows.c\ndeleted file mode 100644\nindex 67c0592a0..000000000\n--- a/lib/latch-windows.c\n+++ /dev/null\n@@ -1,83 +0,0 @@\n-/*\n- * Copyright (c) 2013 Nicira, Inc.\n- *\n- * Licensed under the Apache License, Version 2.0 (the \"License\");\n- * you may not use this file except in compliance with the License.\n- * You may obtain a copy of the License at:\n- *\n- *     http://www.apache.org/licenses/LICENSE-2.0\n- *\n- * Unless required by applicable law or agreed to in writing, software\n- * distributed under the License is distributed on an \"AS IS\" BASIS,\n- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n- * See the License for the specific language governing permissions and\n- * limitations under the License.\n- */\n-\n-#include <config.h>\n-\n-#include \"latch.h\"\n-#include <errno.h>\n-#include <poll.h>\n-#include <unistd.h>\n-#include \"openvswitch/poll-loop.h\"\n-#include \"socket-util.h\"\n-\n-/* Initializes 'latch' as initially unset. */\n-void\n-latch_init(struct latch *latch)\n-{\n-    latch->is_set = FALSE;\n-    latch->wevent = CreateEvent(NULL, TRUE, FALSE, NULL);\n-}\n-\n-/* Destroys 'latch'. */\n-void\n-latch_destroy(struct latch *latch)\n-{\n-    latch->is_set = FALSE;\n-    CloseHandle(latch->wevent);\n-}\n-\n-/* Resets 'latch' to the unset state.  Returns true if 'latch' was previously\n- * set, false otherwise. */\n-bool\n-latch_poll(struct latch *latch)\n-{\n-    bool is_set;\n-\n-    is_set = latch->is_set;\n-    latch->is_set = FALSE;\n-    ResetEvent(latch->wevent);\n-    return is_set;\n-}\n-\n-/* Sets 'latch'.\n- *\n- * Calls are not additive: a single latch_poll() clears out any number of\n- * latch_set(). */\n-void\n-latch_set(struct latch *latch)\n-{\n-    latch->is_set = TRUE;\n-    SetEvent(latch->wevent);\n-}\n-\n-/* Returns true if 'latch' is set, false otherwise.  Does not reset 'latch'\n- * to the unset state. */\n-bool\n-latch_is_set(const struct latch *latch)\n-{\n-    return latch->is_set;\n-}\n-\n-/* Causes the next poll_block() to wake up when 'latch' is set.\n- *\n- * ('where' is used in debug logging.  Commonly one would use latch_wait() to\n- * automatically provide the caller's source file and line number for\n- * 'where'.) */\n-void\n-latch_wait_at(const struct latch *latch, const char *where)\n-{\n-    poll_wevent_wait_at(latch->wevent, where);\n-}\ndiff --git a/lib/latch.h b/lib/latch.h\nindex 3c0b842a1..fc18336a7 100644\n--- a/lib/latch.h\n+++ b/lib/latch.h\n@@ -26,12 +26,7 @@\n #include \"util.h\"\n \n struct latch {\n-#ifndef _WIN32\n     int fds[2];\n-#else\n-    HANDLE wevent;\n-    bool is_set;\n-#endif\n };\n \n void latch_init(struct latch *);\ndiff --git a/lib/lldp/lldpd.c b/lib/lldp/lldpd.c\nindex 4bff7b017..000a89b34 100644\n--- a/lib/lldp/lldpd.c\n+++ b/lib/lldp/lldpd.c\n@@ -32,13 +32,11 @@\n #include <sys/time.h>\n #include <sys/wait.h>\n #include <unistd.h>\n-#ifndef _WIN32\n #include <grp.h>\n #include <libgen.h>\n #include <pwd.h>\n #include <sys/select.h>\n #include <sys/utsname.h>\n-#endif\n #include \"compiler.h\"\n #include \"openvswitch/dynamic-string.h\"\n #include \"openvswitch/list.h\"\n@@ -575,11 +573,9 @@ lldpd_send(struct lldpd_hardware *hw, struct dp_packet *p)\n     if (cfg->g_config.c_receiveonly || cfg->g_config.c_paused) {\n         return 0;\n     }\n-#ifndef _WIN32\n     if ((hw->h_flags & IFF_RUNNING) == 0) {\n         return 0;\n     }\n-#endif\n \n     for (i = 0; cfg->g_protocols[i].mode != 0; i++) {\n         if (!cfg->g_protocols[i].enabled) {\ndiff --git a/lib/lockfile.c b/lib/lockfile.c\nindex 42782d29e..6ecbb307e 100644\n--- a/lib/lockfile.c\n+++ b/lib/lockfile.c\n@@ -83,13 +83,6 @@ lockfile_name(const char *filename_)\n     filename = follow_symlinks(filename_);\n     slash = strrchr(filename, '/');\n \n-#ifdef _WIN32\n-    char *backslash = strrchr(filename, '\\\\');\n-    if (backslash && (!slash || backslash > slash)) {\n-        slash = backslash;\n-    }\n-#endif\n-\n     lockname = (slash\n                 ? xasprintf(\"%.*s/.%s.~lock~\",\n                             (int) (slash - filename), filename, slash + 1)\n@@ -233,71 +226,6 @@ lockfile_register(const char *name, dev_t device, ino_t inode, int fd)\n     return lockfile;\n }\n \n-#ifdef _WIN32\n-static void\n-lockfile_do_unlock(struct lockfile *lockfile)\n-    OVS_REQUIRES(lock_table_mutex)\n-{\n-    if (lockfile->fd >= 0) {\n-        OVERLAPPED overl;\n-        overl.hEvent = 0;\n-        overl.Offset = 0;\n-        overl.OffsetHigh = 0;\n-        UnlockFileEx(lockfile->lock_handle, 0, 1, 0, &overl);\n-\n-        close(lockfile->fd);\n-        lockfile->fd = -1;\n-    }\n-}\n-\n-static int\n-lockfile_try_lock(const char *name, pid_t *pidp, struct lockfile **lockfilep)\n-    OVS_REQUIRES(lock_table_mutex)\n-{\n-    HANDLE lock_handle;\n-    BOOL retval;\n-    OVERLAPPED overl;\n-    struct lockfile *lockfile;\n-    int fd;\n-\n-    *pidp = 0;\n-\n-    fd = open(name, O_RDWR | O_CREAT, 0600);\n-    if (fd < 0) {\n-        VLOG_WARN(\"%s: failed to open lock file: %s\",\n-                   name, ovs_strerror(errno));\n-        return errno;\n-    }\n-\n-    lock_handle = (HANDLE)_get_osfhandle(fd);\n-    if (lock_handle < 0) {\n-        VLOG_WARN(\"%s: failed to get the file handle: %s\",\n-                   name, ovs_strerror(errno));\n-        return errno;\n-    }\n-\n-    /* Lock the file 'name' for the region that includes just the first\n-     * byte. */\n-    overl.hEvent = 0;\n-    overl.Offset = 0;\n-    overl.OffsetHigh = 0;\n-    retval = LockFileEx(lock_handle, LOCKFILE_EXCLUSIVE_LOCK\n-                        | LOCKFILE_FAIL_IMMEDIATELY, 0, 1, 0, &overl);\n-    if (!retval) {\n-        VLOG_DBG(\"Failed to lock file : %s\", ovs_lasterror_to_string());\n-        *pidp = getpid();\n-        return EDEADLK;\n-    }\n-\n-    lockfile = xmalloc(sizeof *lockfile);\n-    lockfile->name = xstrdup(name);\n-    lockfile->fd = fd;\n-    lockfile->lock_handle = lock_handle;\n-\n-    *lockfilep = lockfile;\n-    return 0;\n-}\n-#else /* !_WIN32 */\n static void\n lockfile_do_unlock(struct lockfile *lockfile)\n {\n@@ -363,4 +291,3 @@ lockfile_try_lock(const char *name, pid_t *pidp, struct lockfile **lockfilep)\n     }\n     return error;\n }\n-#endif\ndiff --git a/lib/netdev-provider.h b/lib/netdev-provider.h\nindex 136d8188c..d6da2653b 100644\n--- a/lib/netdev-provider.h\n+++ b/lib/netdev-provider.h\n@@ -867,8 +867,6 @@ int netdev_unregister_provider(const char *type);\n \n #if defined(__FreeBSD__) || defined(__NetBSD__)\n extern const struct netdev_class netdev_bsd_class;\n-#elif defined(_WIN32)\n-extern const struct netdev_class netdev_windows_class;\n #else\n extern const struct netdev_class netdev_linux_class;\n #endif\ndiff --git a/lib/netdev-vport.h b/lib/netdev-vport.h\nindex 9d756a265..9441e7395 100644\n--- a/lib/netdev-vport.h\n+++ b/lib/netdev-vport.h\n@@ -42,11 +42,8 @@ void netdev_vport_inc_tx(const struct netdev *,\n bool netdev_vport_is_vport_class(const struct netdev_class *);\n const char *netdev_vport_class_get_dpif_port(const struct netdev_class *);\n \n-#ifndef _WIN32\n enum { NETDEV_VPORT_NAME_BUFSIZE = 16 };\n-#else\n-enum { NETDEV_VPORT_NAME_BUFSIZE = 256 };\n-#endif\n+\n const char *netdev_vport_get_dpif_port(const struct netdev *,\n                                        char namebuf[], size_t bufsize)\n     OVS_WARN_UNUSED_RESULT;\ndiff --git a/lib/netdev-windows.c b/lib/netdev-windows.c\ndeleted file mode 100644\nindex 3fad501e3..000000000\n--- a/lib/netdev-windows.c\n+++ /dev/null\n@@ -1,517 +0,0 @@\n-/*\n- * Copyright (c) 2014, 2016 VMware, Inc.\n- *\n- * Licensed under the Apache License, Version 2.0 (the \"License\");\n- * you may not use this file except in compliance with the License.\n- * You may obtain a copy of the License at:\n- *\n- *     http://www.apache.org/licenses/LICENSE-2.0\n- *\n- * Unless required by applicable law or agreed to in writing, software\n- * distributed under the License is distributed on an \"AS IS\" BASIS,\n- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n- * See the License for the specific language governing permissions and\n- * limitations under the License.\n- */\n-\n-#include <stdlib.h>\n-#include <config.h>\n-#include <errno.h>\n-#include <iphlpapi.h>\n-\n-#include <net/if.h>\n-\n-#include \"coverage.h\"\n-#include \"fatal-signal.h\"\n-#include \"netdev-provider.h\"\n-#include \"openvswitch/ofpbuf.h\"\n-#include \"packets.h\"\n-#include \"openvswitch/poll-loop.h\"\n-#include \"openvswitch/shash.h\"\n-#include \"svec.h\"\n-#include \"openvswitch/vlog.h\"\n-#include \"odp-netlink.h\"\n-#include \"netlink-socket.h\"\n-#include \"netlink.h\"\n-\n-VLOG_DEFINE_THIS_MODULE(netdev_windows);\n-static struct vlog_rate_limit error_rl = VLOG_RATE_LIMIT_INIT(9999, 5);\n-\n-enum {\n-    VALID_ETHERADDR         = 1 << 0,\n-    VALID_MTU               = 1 << 1,\n-    VALID_IFFLAG            = 1 << 5,\n-};\n-\n-/* Caches the information of a netdev. */\n-struct netdev_windows {\n-    struct netdev up;\n-    int32_t dev_type;\n-    uint32_t port_no;\n-\n-    unsigned int change_seq;\n-\n-    unsigned int cache_valid;\n-    int ifindex;\n-    struct eth_addr mac;\n-    uint32_t mtu;\n-    unsigned int ifi_flags;\n-};\n-\n-/* Utility structure for netdev commands. */\n-struct netdev_windows_netdev_info {\n-    /* Generic Netlink header. */\n-    uint8_t cmd;\n-\n-    /* Information that is relevant to ovs. */\n-    uint32_t dp_ifindex;\n-    uint32_t port_no;\n-    uint32_t ovs_type;\n-\n-    /* General information of a network device. */\n-    const char *name;\n-    struct eth_addr mac_address;\n-    uint32_t mtu;\n-    uint32_t ifi_flags;\n-};\n-\n-static int query_netdev(const char *devname,\n-                        struct netdev_windows_netdev_info *reply,\n-                        struct ofpbuf **bufp);\n-static struct netdev *netdev_windows_alloc(void);\n-static int netdev_windows_init_(void);\n-\n-/* Generic Netlink family numbers for OVS.\n- *\n- * Initialized by netdev_windows_init_(). */\n-static int ovs_win_netdev_family;\n-struct nl_sock *ovs_win_netdev_sock;\n-\n-\n-static bool\n-is_netdev_windows_class(const struct netdev_class *netdev_class)\n-{\n-    return netdev_class->alloc == netdev_windows_alloc;\n-}\n-\n-static struct netdev_windows *\n-netdev_windows_cast(const struct netdev *netdev_)\n-{\n-    ovs_assert(is_netdev_windows_class(netdev_get_class(netdev_)));\n-    return CONTAINER_OF(netdev_, struct netdev_windows, up);\n-}\n-\n-static int\n-netdev_windows_init_(void)\n-{\n-    int error = 0;\n-    static struct ovsthread_once once = OVSTHREAD_ONCE_INITIALIZER;\n-\n-    if (ovsthread_once_start(&once)) {\n-        error = nl_lookup_genl_family(OVS_WIN_NETDEV_FAMILY,\n-                                      &ovs_win_netdev_family);\n-        if (error) {\n-            VLOG_ERR(\"Generic Netlink family '%s' does not exist. \"\n-                     \"The Open vSwitch kernel module is probably not loaded.\",\n-                     OVS_WIN_NETDEV_FAMILY);\n-        }\n-        if (!error) {\n-            /* XXX: Where to close this socket? */\n-            error = nl_sock_create(NETLINK_GENERIC, &ovs_win_netdev_sock);\n-        }\n-\n-        ovsthread_once_done(&once);\n-    }\n-\n-    return error;\n-}\n-\n-static struct netdev *\n-netdev_windows_alloc(void)\n-{\n-    struct netdev_windows *netdev = xzalloc(sizeof *netdev);\n-    return netdev ? &netdev->up : NULL;\n-}\n-\n-static uint32_t\n-dp_to_netdev_ifi_flags(uint32_t dp_flags)\n-{\n-    uint32_t nd_flags = 0;\n-\n-    if (dp_flags & OVS_WIN_NETDEV_IFF_UP) {\n-        nd_flags |= NETDEV_UP;\n-    }\n-\n-    if (dp_flags & OVS_WIN_NETDEV_IFF_PROMISC) {\n-        nd_flags |= NETDEV_PROMISC;\n-    }\n-\n-    return nd_flags;\n-}\n-\n-static int\n-netdev_windows_system_construct(struct netdev *netdev_)\n-{\n-    struct netdev_windows *netdev = netdev_windows_cast(netdev_);\n-    struct netdev_windows_netdev_info info;\n-    struct ofpbuf *buf;\n-    int ret;\n-    const char    *type = NULL;\n-\n-    /* Query the attributes and runtime status of the netdev. */\n-    ret = query_netdev(netdev_get_name(&netdev->up), &info, &buf);\n-    /* \"Internal\" netdevs do not exist in the kernel yet.  They need to be\n-     * transformed into a netdev object and passed to dpif_port_add(), which\n-     * will add them to the kernel.  */\n-    if (strcmp(netdev_get_type(&netdev->up), \"internal\") && ret) {\n-        return ret;\n-    }\n-    ofpbuf_delete(buf);\n-\n-    /* Don't create netdev if ovs-type is \"internal\"\n-     * but the type of netdev->up is \"system\". */\n-    type = netdev_get_type(&netdev->up);\n-    if (type && !strcmp(type, \"system\") &&\n-        (info.ovs_type == OVS_VPORT_TYPE_INTERNAL)) {\n-        VLOG_DBG(\"construct device %s, ovs_type: %u failed\",\n-                 netdev_get_name(&netdev->up), info.ovs_type);\n-        return 1;\n-    }\n-\n-    netdev->change_seq = 1;\n-    netdev->dev_type = info.ovs_type;\n-    netdev->port_no = info.port_no;\n-\n-    netdev->mac = info.mac_address;\n-    netdev->cache_valid = VALID_ETHERADDR;\n-    netdev->ifindex = -EOPNOTSUPP;\n-\n-    netdev->mtu = info.mtu;\n-    netdev->cache_valid |= VALID_MTU;\n-\n-    netdev->ifi_flags = dp_to_netdev_ifi_flags(info.ifi_flags);\n-    netdev->cache_valid |= VALID_IFFLAG;\n-\n-    VLOG_DBG(\"construct device %s, ovs_type: %u.\",\n-             netdev_get_name(&netdev->up), info.ovs_type);\n-    return 0;\n-}\n-\n-static int\n-netdev_windows_netdev_to_ofpbuf(struct netdev_windows_netdev_info *info,\n-                                struct ofpbuf *buf)\n-{\n-    struct ovs_header *ovs_header;\n-    int error = EINVAL;\n-\n-    nl_msg_put_genlmsghdr(buf, 0, ovs_win_netdev_family,\n-                          NLM_F_REQUEST | NLM_F_ECHO,\n-                          info->cmd, OVS_WIN_NETDEV_VERSION);\n-\n-    ovs_header = ofpbuf_put_uninit(buf, sizeof *ovs_header);\n-    ovs_header->dp_ifindex = info->dp_ifindex;\n-\n-    if (info->name) {\n-        nl_msg_put_string(buf, OVS_WIN_NETDEV_ATTR_NAME, info->name);\n-        error = 0;\n-    }\n-\n-    return error;\n-}\n-\n-static void\n-netdev_windows_info_init(struct netdev_windows_netdev_info *info)\n-{\n-    memset(info, 0, sizeof *info);\n-}\n-\n-static int\n-netdev_windows_netdev_from_ofpbuf(struct netdev_windows_netdev_info *info,\n-                                  struct ofpbuf *buf)\n-{\n-    static const struct nl_policy ovs_netdev_policy[] = {\n-        [OVS_WIN_NETDEV_ATTR_PORT_NO] = { .type = NL_A_U32 },\n-        [OVS_WIN_NETDEV_ATTR_TYPE] = { .type = NL_A_U32 },\n-        [OVS_WIN_NETDEV_ATTR_NAME] = { .type = NL_A_STRING, .max_len = IFNAMSIZ },\n-        [OVS_WIN_NETDEV_ATTR_MAC_ADDR] = { NL_POLICY_FOR(info->mac_address) },\n-        [OVS_WIN_NETDEV_ATTR_MTU] = { .type = NL_A_U32 },\n-        [OVS_WIN_NETDEV_ATTR_IF_FLAGS] = { .type = NL_A_U32 },\n-    };\n-\n-    netdev_windows_info_init(info);\n-\n-    struct ofpbuf b = ofpbuf_const_initializer(buf->data, buf->size);\n-    struct nlmsghdr *nlmsg = ofpbuf_try_pull(&b, sizeof *nlmsg);\n-    struct genlmsghdr *genl = ofpbuf_try_pull(&b, sizeof *genl);\n-    struct ovs_header *ovs_header = ofpbuf_try_pull(&b, sizeof *ovs_header);\n-\n-    struct nlattr *a[ARRAY_SIZE(ovs_netdev_policy)];\n-    if (!nlmsg || !genl || !ovs_header\n-        || nlmsg->nlmsg_type != ovs_win_netdev_family\n-        || !nl_policy_parse(&b, 0, ovs_netdev_policy, a,\n-                            ARRAY_SIZE(ovs_netdev_policy))) {\n-        return EINVAL;\n-    }\n-\n-    info->cmd = genl->cmd;\n-    info->dp_ifindex = ovs_header->dp_ifindex;\n-    info->port_no = nl_attr_get_odp_port(a[OVS_WIN_NETDEV_ATTR_PORT_NO]);\n-    info->ovs_type = nl_attr_get_u32(a[OVS_WIN_NETDEV_ATTR_TYPE]);\n-    info->name = nl_attr_get_string(a[OVS_WIN_NETDEV_ATTR_NAME]);\n-    memcpy(&info->mac_address, nl_attr_get_unspec(a[OVS_WIN_NETDEV_ATTR_MAC_ADDR],\n-               sizeof(info->mac_address)), sizeof(info->mac_address));\n-    info->mtu = nl_attr_get_u32(a[OVS_WIN_NETDEV_ATTR_MTU]);\n-    info->ifi_flags = nl_attr_get_u32(a[OVS_WIN_NETDEV_ATTR_IF_FLAGS]);\n-\n-    return 0;\n-}\n-\n-static int\n-query_netdev(const char *devname,\n-             struct netdev_windows_netdev_info *info,\n-             struct ofpbuf **bufp)\n-{\n-    int error = 0;\n-    struct ofpbuf *request_buf;\n-\n-    ovs_assert(info != NULL);\n-    netdev_windows_info_init(info);\n-\n-    error = netdev_windows_init_();\n-    if (error) {\n-        if (info) {\n-            *bufp = NULL;\n-            netdev_windows_info_init(info);\n-        }\n-        return error;\n-    }\n-\n-    request_buf = ofpbuf_new(1024);\n-    info->cmd = OVS_WIN_NETDEV_CMD_GET;\n-    info->name = devname;\n-    error = netdev_windows_netdev_to_ofpbuf(info, request_buf);\n-    if (error) {\n-        ofpbuf_delete(request_buf);\n-        return error;\n-    }\n-\n-    error = nl_transact(NETLINK_GENERIC, request_buf, bufp);\n-    ofpbuf_delete(request_buf);\n-\n-    if (info) {\n-        if (!error) {\n-            error = netdev_windows_netdev_from_ofpbuf(info, *bufp);\n-        }\n-        if (error) {\n-            netdev_windows_info_init(info);\n-            ofpbuf_delete(*bufp);\n-            *bufp = NULL;\n-        }\n-    }\n-\n-    return error;\n-}\n-\n-static void\n-netdev_windows_destruct(struct netdev *netdev_)\n-{\n-\n-}\n-\n-static void\n-netdev_windows_dealloc(struct netdev *netdev_)\n-{\n-    struct netdev_windows *netdev = netdev_windows_cast(netdev_);\n-    free(netdev);\n-}\n-\n-static int\n-netdev_windows_get_etheraddr(const struct netdev *netdev_,\n-                             struct eth_addr *mac)\n-{\n-    struct netdev_windows *netdev = netdev_windows_cast(netdev_);\n-\n-    ovs_assert((netdev->cache_valid & VALID_ETHERADDR) != 0);\n-    if (netdev->cache_valid & VALID_ETHERADDR) {\n-        *mac = netdev->mac;\n-    } else {\n-        return EINVAL;\n-    }\n-    return 0;\n-}\n-\n-static int\n-netdev_windows_get_mtu(const struct netdev *netdev_, int *mtup)\n-{\n-    struct netdev_windows *netdev = netdev_windows_cast(netdev_);\n-\n-    ovs_assert((netdev->cache_valid & VALID_MTU) != 0);\n-    if (netdev->cache_valid & VALID_MTU) {\n-        *mtup = netdev->mtu;\n-    } else {\n-        return EINVAL;\n-    }\n-    return 0;\n-}\n-\n-/* This functionality is not really required by the datapath.\n- * But vswitchd bringup expects this to be implemented. */\n-static int\n-netdev_windows_set_etheraddr(const struct netdev *netdev_,\n-                             const struct eth_addr mac)\n-{\n-    return 0;\n-}\n-\n-/* This functionality is not really required by the datapath.\n- * But vswitchd bringup expects this to be implemented. */\n-static int\n-netdev_windows_update_flags(struct netdev *netdev_,\n-                            enum netdev_flags off,\n-                            enum netdev_flags on,\n-                            enum netdev_flags *old_flagsp)\n-{\n-    struct netdev_windows *netdev = netdev_windows_cast(netdev_);\n-\n-    ovs_assert((netdev->cache_valid & VALID_IFFLAG) != 0);\n-    if (netdev->cache_valid & VALID_IFFLAG) {\n-        *old_flagsp = netdev->ifi_flags;\n-        /* Setting the interface flags is not supported. */\n-    } else {\n-        return EINVAL;\n-    }\n-    return 0;\n-}\n-\n-/* Looks up in the ARP table entry for a given 'ip'. If it is found, the\n- * corresponding MAC address will be copied in 'mac' and return 0. If no\n- * matching entry is found or an error occurs it will log it and return ENXIO.\n- */\n-static int\n-netdev_windows_arp_lookup(const struct netdev *netdev,\n-                          ovs_be32 ip, struct eth_addr *mac)\n-{\n-    PMIB_IPNETTABLE arp_table = NULL;\n-    /* The buffer length of all ARP entries */\n-    uint32_t buffer_length = 0;\n-    uint32_t ret_val = 0;\n-    uint32_t counter = 0;\n-\n-    ret_val = GetIpNetTable(arp_table, &buffer_length, false);\n-\n-    if (ret_val != ERROR_INSUFFICIENT_BUFFER ) {\n-        VLOG_ERR(\"Call to GetIpNetTable failed with error: %s\",\n-                 ovs_format_message(ret_val));\n-        return ENXIO;\n-    }\n-\n-    arp_table = (MIB_IPNETTABLE *) xmalloc(buffer_length);\n-\n-    ret_val = GetIpNetTable(arp_table, &buffer_length, false);\n-\n-    if (ret_val == NO_ERROR) {\n-        for (counter = 0; counter < arp_table->dwNumEntries; counter++) {\n-            if (arp_table->table[counter].dwAddr == ip) {\n-                memcpy(mac, arp_table->table[counter].bPhysAddr, ETH_ADDR_LEN);\n-\n-                free(arp_table);\n-                return 0;\n-            }\n-        }\n-    } else {\n-        VLOG_ERR(\"Call to GetIpNetTable failed with error: %s\",\n-                 ovs_format_message(ret_val));\n-    }\n-\n-    free(arp_table);\n-    return ENXIO;\n-}\n-\n-static int\n-netdev_windows_get_next_hop(const struct in_addr *host,\n-                            struct in_addr *next_hop,\n-                            char **netdev_name)\n-{\n-    uint32_t ret_val = 0;\n-    /* The buffer length of all addresses */\n-    uint32_t buffer_length = 0;\n-    PIP_ADAPTER_ADDRESSES all_addr = NULL;\n-    PIP_ADAPTER_ADDRESSES cur_addr = NULL;\n-\n-    ret_val = GetAdaptersAddresses(AF_INET,\n-                                   GAA_FLAG_INCLUDE_PREFIX |\n-                                   GAA_FLAG_INCLUDE_GATEWAYS,\n-                                   NULL, NULL, &buffer_length);\n-\n-    if (ret_val != ERROR_BUFFER_OVERFLOW ) {\n-        VLOG_ERR(\"Call to GetAdaptersAddresses failed with error: %s\",\n-                 ovs_format_message(ret_val));\n-        return ENXIO;\n-    }\n-\n-    all_addr = (IP_ADAPTER_ADDRESSES *) xmalloc(buffer_length);\n-\n-    ret_val = GetAdaptersAddresses(AF_INET,\n-                                   GAA_FLAG_INCLUDE_PREFIX |\n-                                   GAA_FLAG_INCLUDE_GATEWAYS,\n-                                   NULL, all_addr, &buffer_length);\n-\n-    if (ret_val == NO_ERROR) {\n-        cur_addr = all_addr;\n-        while (cur_addr) {\n-            if(cur_addr->FirstGatewayAddress &&\n-               cur_addr->FirstGatewayAddress->Address.lpSockaddr) {\n-                struct sockaddr_in *ipv4 = (struct sockaddr_in *)\n-                                           cur_addr->FirstGatewayAddress->Address.lpSockaddr;\n-                next_hop->s_addr = ipv4->sin_addr.S_un.S_addr;\n-                *netdev_name = xstrdup((char *)cur_addr->FriendlyName);\n-\n-                free(all_addr);\n-\n-                return 0;\n-            }\n-\n-            cur_addr = cur_addr->Next;\n-        }\n-    } else {\n-        VLOG_ERR(\"Call to GetAdaptersAddresses failed with error: %s\",\n-                 ovs_format_message(ret_val));\n-    }\n-\n-    if (all_addr) {\n-        free(all_addr);\n-    }\n-    return ENXIO;\n-}\n-\n-static int\n-netdev_windows_internal_construct(struct netdev *netdev_)\n-{\n-    return netdev_windows_system_construct(netdev_);\n-}\n-\n-\n-#define NETDEV_WINDOWS_CLASS(NAME, CONSTRUCT)                           \\\n-{                                                                       \\\n-    .type               = NAME,                                         \\\n-    .is_pmd             = false,                                        \\\n-    .alloc              = netdev_windows_alloc,                         \\\n-    .construct          = CONSTRUCT,                                    \\\n-    .destruct           = netdev_windows_destruct,                      \\\n-    .dealloc            = netdev_windows_dealloc,                       \\\n-    .get_etheraddr      = netdev_windows_get_etheraddr,                 \\\n-    .set_etheraddr      = netdev_windows_set_etheraddr,                 \\\n-    .update_flags       = netdev_windows_update_flags,                  \\\n-    .get_next_hop       = netdev_windows_get_next_hop,                  \\\n-    .arp_lookup         = netdev_windows_arp_lookup,                    \\\n-}\n-\n-const struct netdev_class netdev_windows_class =\n-    NETDEV_WINDOWS_CLASS(\n-        \"system\",\n-        netdev_windows_system_construct);\n-\n-const struct netdev_class netdev_internal_class =\n-    NETDEV_WINDOWS_CLASS(\n-        \"internal\",\n-        netdev_windows_internal_construct);\ndiff --git a/lib/netdev.c b/lib/netdev.c\nindex daa428736..5796286d2 100644\n--- a/lib/netdev.c\n+++ b/lib/netdev.c\n@@ -24,12 +24,9 @@\n #include <stdlib.h>\n #include <string.h>\n #include <unistd.h>\n-\n-#ifndef _WIN32\n #include <ifaddrs.h>\n #include <net/if.h>\n #include <sys/ioctl.h>\n-#endif\n \n #include \"cmap.h\"\n #include \"coverage.h\"\n@@ -161,11 +158,6 @@ netdev_initialize(void)\n #if defined(__FreeBSD__) || defined(__NetBSD__)\n         netdev_register_provider(&netdev_tap_class);\n         netdev_register_provider(&netdev_bsd_class);\n-#endif\n-#ifdef _WIN32\n-        netdev_register_provider(&netdev_windows_class);\n-        netdev_register_provider(&netdev_internal_class);\n-        netdev_vport_tunnel_register();\n #endif\n         ovsthread_once_done(&once);\n     }\n@@ -2306,7 +2298,6 @@ netdev_get_change_seq(const struct netdev *netdev)\n     return change_seq;\n }\n \n-#ifndef _WIN32\n /* This implementation is shared by Linux and BSD. */\n \n static struct ifaddrs *if_addr_list;\n@@ -2401,7 +2392,6 @@ retry:\n     }\n     return 0;\n }\n-#endif\n \n void\n netdev_wait_reconf_required(struct netdev *netdev)\ndiff --git a/lib/netdev.h b/lib/netdev.h\nindex 40f1621ec..5daf1093a 100644\n--- a/lib/netdev.h\n+++ b/lib/netdev.h\n@@ -388,11 +388,9 @@ int netdev_dump_queue_stats(const struct netdev *,\n \n extern struct seq *tnl_conf_seq;\n \n-#ifndef _WIN32\n void netdev_get_addrs_list_flush(void);\n int netdev_get_addrs(const char dev[], struct in6_addr **paddr,\n                      struct in6_addr **pmask, int *n_in6);\n-#endif\n \n /* Offload-capable (HW) netdev information. */\n struct netdev_hw_info {\ndiff --git a/lib/netlink-conntrack.c b/lib/netlink-conntrack.c\nindex 0b3a8adf5..b02000253 100644\n--- a/lib/netlink-conntrack.c\n+++ b/lib/netlink-conntrack.c\n@@ -284,14 +284,6 @@ nl_ct_flush_zone_with_cta_zone(uint16_t flush_zone)\n     return err;\n }\n \n-#ifdef _WIN32\n-int\n-nl_ct_flush_zone(uint16_t flush_zone)\n-{\n-    return nl_ct_flush_zone_with_cta_zone(flush_zone);\n-}\n-#else\n-\n static bool\n netlink_flush_supports_zone(void)\n {\n@@ -387,7 +379,6 @@ nl_ct_flush_zone(uint16_t flush_zone)\n      * have a parent connection anymore */\n     return 0;\n }\n-#endif\n \n /* Conntrack netlink parsing. */\n \n@@ -659,10 +650,6 @@ nl_ct_put_ct_tuple(struct ofpbuf *buf, const struct ct_dpif_tuple *tuple,\n static uint8_t\n nl_ct_tcp_state_to_dpif(uint8_t state)\n {\n-#ifdef _WIN32\n-    /* Windows currently sends up CT_DPIF_TCP state */\n-    return state;\n-#else\n     switch (state) {\n     case TCP_CONNTRACK_NONE:\n         return CT_DPIF_TCPS_CLOSED;\n@@ -687,23 +674,17 @@ nl_ct_tcp_state_to_dpif(uint8_t state)\n     default:\n         return CT_DPIF_TCPS_CLOSED;\n     }\n-#endif\n }\n \n static uint8_t\n ip_ct_tcp_flags_to_dpif(uint8_t flags)\n {\n-#ifdef _WIN32\n-    /* Windows currently sends up CT_DPIF_TCP flags */\n-    return flags;\n-#else\n     uint8_t ret = 0;\n #define CT_DPIF_TCP_FLAG(FLAG) \\\n         ret |= (flags & IP_CT_TCP_FLAG_##FLAG) ? CT_DPIF_TCPF_##FLAG : 0;\n     CT_DPIF_TCP_FLAGS\n #undef CT_DPIF_TCP_FLAG\n     return ret;\n-#endif\n }\n \n static bool\n@@ -771,10 +752,6 @@ nl_ct_parse_protoinfo_tcp(struct nlattr *nla,\n static uint8_t\n nl_ct_sctp_state_to_dpif(uint8_t state)\n {\n-#ifdef _WIN32\n-    /* For now, return the CT_DPIF_SCTP state. Not sure what windows does. */\n-    return state;\n-#else\n     switch (state) {\n     case SCTP_CONNTRACK_COOKIE_WAIT:\n         return CT_DPIF_SCTP_STATE_COOKIE_WAIT;\n@@ -799,7 +776,6 @@ nl_ct_sctp_state_to_dpif(uint8_t state)\n     default:\n         return CT_DPIF_SCTP_STATE_CLOSED;\n     }\n-#endif\n }\n \n static bool\n@@ -1378,8 +1354,4 @@ nl_msg_put_nfgenmsg(struct ofpbuf *msg, size_t expected_payload,\n     nfm->nfgen_family = family;\n     nfm->version = NFNETLINK_V0;\n     nfm->res_id = 0;\n-#ifdef _WIN32\n-    /* nfgenmsg contains ovsHdr padding in windows */\n-    nfm->ovsHdr.dp_ifindex = 0;\n-#endif\n }\ndiff --git a/lib/netlink-socket.c b/lib/netlink-socket.c\nindex 976ed15e8..69a3f18b1 100644\n--- a/lib/netlink-socket.c\n+++ b/lib/netlink-socket.c\n@@ -59,37 +59,11 @@ static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(60, 600);\n static uint32_t nl_sock_allocate_seq(struct nl_sock *, unsigned int n);\n static void log_nlmsg(const char *function, int error,\n                       const void *message, size_t size, int protocol);\n-#ifdef _WIN32\n-static int get_sock_pid_from_kernel(struct nl_sock *sock);\n-static int set_sock_property(struct nl_sock *sock);\n-static int nl_sock_transact(struct nl_sock *sock, const struct ofpbuf *request,\n-                            struct ofpbuf **replyp);\n-\n-/* In the case DeviceIoControl failed and GetLastError returns with\n- * ERROR_NOT_FOUND means we lost communication with the kernel device.\n- * CloseHandle will fail because the handle in 'theory' does not exist.\n- * The only remaining option is to crash and allow the service to be restarted\n- * via service manager.  This is the only way to close the handle from both\n- * userspace and kernel. */\n-void\n-lost_communication(DWORD last_err)\n-{\n-    if (last_err == ERROR_NOT_FOUND) {\n-        ovs_abort(0, \"lost communication with the kernel device\");\n-    }\n-}\n-#endif\n \f\n /* Netlink sockets. */\n \n struct nl_sock {\n-#ifdef _WIN32\n-    HANDLE handle;\n-    OVERLAPPED overlapped;\n-    DWORD read_ioctl;\n-#else\n     int fd;\n-#endif\n     uint32_t next_seq;\n     uint32_t pid;\n     int protocol;\n@@ -117,10 +91,8 @@ nl_sock_create(int protocol, struct nl_sock **sockp)\n {\n     static struct ovsthread_once once = OVSTHREAD_ONCE_INITIALIZER;\n     struct nl_sock *sock;\n-#ifndef _WIN32\n     struct sockaddr_nl local, remote;\n     int one = 1;\n-#endif\n     socklen_t local_size;\n     int rcvbuf;\n     int retval = 0;\n@@ -146,50 +118,16 @@ nl_sock_create(int protocol, struct nl_sock **sockp)\n     *sockp = NULL;\n     sock = xmalloc(sizeof *sock);\n \n-#ifdef _WIN32\n-    sock->overlapped.hEvent = NULL;\n-    sock->handle = CreateFile(OVS_DEVICE_NAME_USER,\n-                              GENERIC_READ | GENERIC_WRITE,\n-                              FILE_SHARE_READ | FILE_SHARE_WRITE,\n-                              NULL, OPEN_EXISTING,\n-                              FILE_FLAG_OVERLAPPED, NULL);\n-\n-    if (sock->handle == INVALID_HANDLE_VALUE) {\n-        VLOG_ERR(\"fcntl: %s\", ovs_lasterror_to_string());\n-        goto error;\n-    }\n-\n-    memset(&sock->overlapped, 0, sizeof sock->overlapped);\n-    sock->overlapped.hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);\n-    if (sock->overlapped.hEvent == NULL) {\n-        VLOG_ERR(\"fcntl: %s\", ovs_lasterror_to_string());\n-        goto error;\n-    }\n-    /* Initialize the type/ioctl to Generic */\n-    sock->read_ioctl = OVS_IOCTL_READ;\n-#else\n     sock->fd = socket(AF_NETLINK, SOCK_RAW, protocol);\n     if (sock->fd < 0) {\n         VLOG_ERR(\"fcntl: %s\", ovs_strerror(errno));\n         goto error;\n     }\n-#endif\n \n     sock->protocol = protocol;\n     sock->next_seq = 1;\n \n     rcvbuf = 1024 * 1024 * 4;\n-#ifdef _WIN32\n-    sock->rcvbuf = rcvbuf;\n-    retval = get_sock_pid_from_kernel(sock);\n-    if (retval != 0) {\n-        goto error;\n-    }\n-    retval = set_sock_property(sock);\n-    if (retval != 0) {\n-        goto error;\n-    }\n-#else\n     if (setsockopt(sock->fd, SOL_NETLINK, NETLINK_EXT_ACK, &one, sizeof one)) {\n         VLOG_WARN_RL(&rl, \"setting extended ack support failed (%s)\",\n                      ovs_strerror(errno));\n@@ -244,7 +182,6 @@ nl_sock_create(int protocol, struct nl_sock **sockp)\n         goto error;\n     }\n     sock->pid = local.nl_pid;\n-#endif\n \n     *sockp = sock;\n     return 0;\n@@ -256,18 +193,9 @@ error:\n             retval = EINVAL;\n         }\n     }\n-#ifdef _WIN32\n-    if (sock->overlapped.hEvent) {\n-        CloseHandle(sock->overlapped.hEvent);\n-    }\n-    if (sock->handle != INVALID_HANDLE_VALUE) {\n-        CloseHandle(sock->handle);\n-    }\n-#else\n     if (sock->fd >= 0) {\n         close(sock->fd);\n     }\n-#endif\n     free(sock);\n     return retval;\n }\n@@ -286,143 +214,11 @@ void\n nl_sock_destroy(struct nl_sock *sock)\n {\n     if (sock) {\n-#ifdef _WIN32\n-        if (sock->overlapped.hEvent) {\n-            CloseHandle(sock->overlapped.hEvent);\n-        }\n-        CloseHandle(sock->handle);\n-#else\n         close(sock->fd);\n-#endif\n         free(sock);\n     }\n }\n \n-#ifdef _WIN32\n-/* Reads the pid for 'sock' generated in the kernel datapath. The function\n- * uses a separate IOCTL instead of a transaction semantic to avoid unnecessary\n- * message overhead. */\n-static int\n-get_sock_pid_from_kernel(struct nl_sock *sock)\n-{\n-    uint32_t pid = 0;\n-    int retval = 0;\n-    DWORD bytes = 0;\n-\n-    if (!DeviceIoControl(sock->handle, OVS_IOCTL_GET_PID,\n-                         NULL, 0, &pid, sizeof(pid),\n-                         &bytes, NULL)) {\n-        lost_communication(GetLastError());\n-        retval = EINVAL;\n-    } else {\n-        if (bytes < sizeof(pid)) {\n-            retval = EINVAL;\n-        } else {\n-            sock->pid = pid;\n-        }\n-    }\n-\n-    return retval;\n-}\n-\n-/* Used for setting and managing socket properties in userspace and kernel.\n- * Currently two attributes are tracked - pid and protocol\n- * protocol - supplied by userspace based on the netlink family. Windows uses\n- *            this property to set the value in kernel datapath.\n- *            eg: (NETLINK_GENERIC/ NETLINK_NETFILTER)\n- * pid -      generated by windows kernel and set in userspace. The property\n- *            is not modified.\n- * Also verify if Protocol and PID in Kernel reflects the values in userspace\n- * */\n-static int\n-set_sock_property(struct nl_sock *sock)\n-{\n-    static const struct nl_policy ovs_socket_policy[] = {\n-        [OVS_NL_ATTR_SOCK_PROTO] = { .type = NL_A_BE32, .optional = true },\n-        [OVS_NL_ATTR_SOCK_PID] = { .type = NL_A_BE32, .optional = true }\n-    };\n-\n-    struct ofpbuf request, *reply;\n-    struct ovs_header *ovs_header;\n-    struct nlattr *attrs[ARRAY_SIZE(ovs_socket_policy)];\n-    int retval = 0;\n-    int error;\n-\n-    ofpbuf_init(&request, 0);\n-    nl_msg_put_genlmsghdr(&request, 0, OVS_WIN_NL_CTRL_FAMILY_ID, 0,\n-                          OVS_CTRL_CMD_SOCK_PROP, OVS_WIN_CONTROL_VERSION);\n-    ovs_header = ofpbuf_put_uninit(&request, sizeof *ovs_header);\n-    ovs_header->dp_ifindex = 0;\n-\n-    nl_msg_put_be32(&request, OVS_NL_ATTR_SOCK_PROTO, sock->protocol);\n-    /* pid is already set as part of get_sock_pid_from_kernel()\n-     * This is added to maintain consistency\n-     */\n-    nl_msg_put_be32(&request, OVS_NL_ATTR_SOCK_PID, sock->pid);\n-\n-    error = nl_sock_transact(sock, &request, &reply);\n-    ofpbuf_uninit(&request);\n-    if (error) {\n-        retval = EINVAL;\n-    }\n-\n-    if (!nl_policy_parse(reply,\n-                         NLMSG_HDRLEN + GENL_HDRLEN + sizeof *ovs_header,\n-                         ovs_socket_policy, attrs,\n-                         ARRAY_SIZE(ovs_socket_policy))) {\n-        ofpbuf_delete(reply);\n-        retval = EINVAL;\n-    }\n-    /* Verify if the properties are setup properly */\n-    if (attrs[OVS_NL_ATTR_SOCK_PROTO]) {\n-        int protocol = nl_attr_get_be32(attrs[OVS_NL_ATTR_SOCK_PROTO]);\n-        if (protocol != sock->protocol) {\n-            VLOG_ERR(\"Invalid protocol returned:%d expected:%d\",\n-                     protocol, sock->protocol);\n-            retval = EINVAL;\n-        }\n-    }\n-\n-    if (attrs[OVS_NL_ATTR_SOCK_PID]) {\n-        int pid = nl_attr_get_be32(attrs[OVS_NL_ATTR_SOCK_PID]);\n-        if (pid != sock->pid) {\n-            VLOG_ERR(\"Invalid pid returned:%d expected:%d\",\n-                     pid, sock->pid);\n-            retval = EINVAL;\n-        }\n-    }\n-\n-    return retval;\n-}\n-#endif  /* _WIN32 */\n-\n-#ifdef _WIN32\n-static int __inline\n-nl_sock_mcgroup(struct nl_sock *sock, unsigned int multicast_group, bool join)\n-{\n-    struct ofpbuf request;\n-    uint64_t request_stub[128];\n-    struct ovs_header *ovs_header;\n-    struct nlmsghdr *nlmsg;\n-    int error;\n-\n-    ofpbuf_use_stub(&request, request_stub, sizeof request_stub);\n-\n-    nl_msg_put_genlmsghdr(&request, 0, OVS_WIN_NL_CTRL_FAMILY_ID, 0,\n-                          OVS_CTRL_CMD_MC_SUBSCRIBE_REQ,\n-                          OVS_WIN_CONTROL_VERSION);\n-\n-    ovs_header = ofpbuf_put_uninit(&request, sizeof *ovs_header);\n-    ovs_header->dp_ifindex = 0;\n-\n-    nl_msg_put_u32(&request, OVS_NL_ATTR_MCAST_GRP, multicast_group);\n-    nl_msg_put_u8(&request, OVS_NL_ATTR_MCAST_JOIN, join ? 1 : 0);\n-\n-    error = nl_sock_send(sock, &request, true);\n-    ofpbuf_uninit(&request);\n-    return error;\n-}\n-#endif\n /* Tries to add 'sock' as a listener for 'multicast_group'.  Returns 0 if\n  * successful, otherwise a positive errno value.\n  *\n@@ -437,24 +233,12 @@ nl_sock_mcgroup(struct nl_sock *sock, unsigned int multicast_group, bool join)\n int\n nl_sock_join_mcgroup(struct nl_sock *sock, unsigned int multicast_group)\n {\n-#ifdef _WIN32\n-    /* Set the socket type as a \"multicast\" socket */\n-    sock->read_ioctl = OVS_IOCTL_READ_EVENT;\n-    int error = nl_sock_mcgroup(sock, multicast_group, true);\n-    if (error) {\n-        sock->read_ioctl = OVS_IOCTL_READ;\n-        VLOG_WARN(\"could not join multicast group %u (%s)\",\n-                  multicast_group, ovs_strerror(error));\n-        return error;\n-    }\n-#else\n     if (setsockopt(sock->fd, SOL_NETLINK, NETLINK_ADD_MEMBERSHIP,\n                    &multicast_group, sizeof multicast_group) < 0) {\n         VLOG_WARN(\"could not join multicast group %u (%s)\",\n                   multicast_group, ovs_strerror(errno));\n         return errno;\n     }\n-#endif\n     return 0;\n }\n \n@@ -472,7 +256,6 @@ nl_sock_listen_all_nsid(struct nl_sock *sock, bool enable)\n     int error;\n     int val = enable ? 1 : 0;\n \n-#ifndef _WIN32\n     if (setsockopt(sock->fd, SOL_NETLINK, NETLINK_LISTEN_ALL_NSID, &val,\n                    sizeof val) < 0) {\n         error = errno;\n@@ -480,73 +263,10 @@ nl_sock_listen_all_nsid(struct nl_sock *sock, bool enable)\n                   enable ? \"enable\" : \"disable\", ovs_strerror(error));\n         return errno;\n     }\n-#endif\n \n     return 0;\n }\n \n-#ifdef _WIN32\n-int\n-nl_sock_subscribe_packet__(struct nl_sock *sock, bool subscribe)\n-{\n-    struct ofpbuf request;\n-    uint64_t request_stub[128];\n-    struct ovs_header *ovs_header;\n-    struct nlmsghdr *nlmsg;\n-    int error;\n-\n-    ofpbuf_use_stub(&request, request_stub, sizeof request_stub);\n-    nl_msg_put_genlmsghdr(&request, 0, OVS_WIN_NL_CTRL_FAMILY_ID, 0,\n-                          OVS_CTRL_CMD_PACKET_SUBSCRIBE_REQ,\n-                          OVS_WIN_CONTROL_VERSION);\n-\n-    ovs_header = ofpbuf_put_uninit(&request, sizeof *ovs_header);\n-    ovs_header->dp_ifindex = 0;\n-    nl_msg_put_u8(&request, OVS_NL_ATTR_PACKET_SUBSCRIBE, subscribe ? 1 : 0);\n-    nl_msg_put_u32(&request, OVS_NL_ATTR_PACKET_PID, sock->pid);\n-\n-    error = nl_sock_send(sock, &request, true);\n-    ofpbuf_uninit(&request);\n-    return error;\n-}\n-\n-int\n-nl_sock_subscribe_packets(struct nl_sock *sock)\n-{\n-    int error;\n-\n-    if (sock->read_ioctl != OVS_IOCTL_READ) {\n-        return EINVAL;\n-    }\n-\n-    error = nl_sock_subscribe_packet__(sock, true);\n-    if (error) {\n-        VLOG_WARN(\"could not subscribe packets (%s)\",\n-                  ovs_strerror(error));\n-        return error;\n-    }\n-    sock->read_ioctl = OVS_IOCTL_READ_PACKET;\n-\n-    return 0;\n-}\n-\n-int\n-nl_sock_unsubscribe_packets(struct nl_sock *sock)\n-{\n-    ovs_assert(sock->read_ioctl == OVS_IOCTL_READ_PACKET);\n-\n-    int error = nl_sock_subscribe_packet__(sock, false);\n-    if (error) {\n-        VLOG_WARN(\"could not unsubscribe to packets (%s)\",\n-                  ovs_strerror(error));\n-        return error;\n-    }\n-\n-    sock->read_ioctl = OVS_IOCTL_READ;\n-    return 0;\n-}\n-#endif\n-\n /* Tries to make 'sock' stop listening to 'multicast_group'.  Returns 0 if\n  * successful, otherwise a positive errno value.\n  *\n@@ -560,22 +280,12 @@ nl_sock_unsubscribe_packets(struct nl_sock *sock)\n int\n nl_sock_leave_mcgroup(struct nl_sock *sock, unsigned int multicast_group)\n {\n-#ifdef _WIN32\n-    int error = nl_sock_mcgroup(sock, multicast_group, false);\n-    if (error) {\n-        VLOG_WARN(\"could not leave multicast group %u (%s)\",\n-                   multicast_group, ovs_strerror(error));\n-        return error;\n-    }\n-    sock->read_ioctl = OVS_IOCTL_READ;\n-#else\n     if (setsockopt(sock->fd, SOL_NETLINK, NETLINK_DROP_MEMBERSHIP,\n                    &multicast_group, sizeof multicast_group) < 0) {\n         VLOG_WARN(\"could not leave multicast group %u (%s)\",\n                   multicast_group, ovs_strerror(errno));\n         return errno;\n     }\n-#endif\n     return 0;\n }\n \n@@ -591,25 +301,8 @@ nl_sock_send__(struct nl_sock *sock, const struct ofpbuf *msg,\n     nlmsg->nlmsg_pid = sock->pid;\n     do {\n         int retval;\n-#ifdef _WIN32\n-        DWORD bytes;\n-\n-        if (!DeviceIoControl(sock->handle, OVS_IOCTL_WRITE,\n-                             msg->data, msg->size, NULL, 0,\n-                             &bytes, NULL)) {\n-            lost_communication(GetLastError());\n-            retval = -1;\n-            /* XXX: Map to a more appropriate error based on GetLastError(). */\n-            errno = EINVAL;\n-            VLOG_DBG_RL(&rl, \"fatal driver failure in write: %s\",\n-                        ovs_lasterror_to_string());\n-        } else {\n-            retval = msg->size;\n-        }\n-#else\n         retval = send(sock->fd, msg->data, msg->size,\n                       wait ? 0 : MSG_DONTWAIT);\n-#endif\n         error = retval < 0 ? errno : 0;\n     } while (error == EINTR);\n     log_nlmsg(__func__, error, msg->data, msg->size, sock->protocol);\n@@ -693,34 +386,7 @@ nl_sock_recv__(struct nl_sock *sock, struct ofpbuf *buf, int *nsid, bool wait)\n     nlmsghdr = buf->base;\n     do {\n         nlmsghdr->nlmsg_len = UINT32_MAX;\n-#ifdef _WIN32\n-        DWORD bytes;\n-        if (!DeviceIoControl(sock->handle, sock->read_ioctl,\n-                             NULL, 0, tail, sizeof tail, &bytes, NULL)) {\n-            lost_communication(GetLastError());\n-            VLOG_DBG_RL(&rl, \"fatal driver failure in transact: %s\",\n-                        ovs_lasterror_to_string());\n-            retval = -1;\n-            /* XXX: Map to a more appropriate error. */\n-            errno = EINVAL;\n-        } else {\n-            retval = bytes;\n-            if (retval == 0) {\n-                retval = -1;\n-                errno = EAGAIN;\n-            } else {\n-                if (retval >= buf->allocated) {\n-                    ofpbuf_reinit(buf, retval);\n-                    nlmsghdr = buf->base;\n-                    nlmsghdr->nlmsg_len = UINT32_MAX;\n-                }\n-                memcpy(buf->data, tail, retval);\n-                buf->size = retval;\n-            }\n-        }\n-#else\n         retval = recvmsg(sock->fd, &msg, wait ? 0 : MSG_DONTWAIT);\n-#endif\n         error = (retval < 0 ? errno\n                  : retval == 0 ? ECONNRESET /* not possible? */\n                  : nlmsghdr->nlmsg_len != UINT32_MAX ? 0\n@@ -748,13 +414,12 @@ nl_sock_recv__(struct nl_sock *sock, struct ofpbuf *buf, int *nsid, bool wait)\n                     retval, sizeof *nlmsghdr);\n         return EPROTO;\n     }\n-#ifndef _WIN32\n+\n     buf->size = MIN(retval, buf->allocated);\n     if (retval > buf->allocated) {\n         COVERAGE_INC(netlink_recv_jumbo);\n         ofpbuf_put(buf, tail, retval - buf->allocated);\n     }\n-#endif\n \n     if (nsid) {\n         /* The network namespace id from which the message was sent comes\n@@ -763,7 +428,7 @@ nl_sock_recv__(struct nl_sock *sock, struct ofpbuf *buf, int *nsid, bool wait)\n          * namespace (no id). Latest kernels return a valid ID only if\n          * available or nothing. */\n         netnsid_set_local(nsid);\n-#ifndef _WIN32\n+\n         cmsg = CMSG_FIRSTHDR(&msg);\n         while (cmsg != NULL) {\n             if (cmsg->cmsg_level == SOL_NETLINK\n@@ -788,7 +453,6 @@ nl_sock_recv__(struct nl_sock *sock, struct ofpbuf *buf, int *nsid, bool wait)\n \n             cmsg = CMSG_NXTHDR(&msg, cmsg);\n         }\n-#endif\n     }\n \n     log_nlmsg(__func__, 0, buf->data, buf->size, sock->protocol);\n@@ -866,7 +530,6 @@ nl_sock_transact_multiple__(struct nl_sock *sock,\n         iovs[i].iov_len = txn->request->size;\n     }\n \n-#ifndef _WIN32\n     memset(&msg, 0, sizeof msg);\n     msg.msg_iov = iovs;\n     msg.msg_iovlen = n;\n@@ -959,95 +622,6 @@ nl_sock_transact_multiple__(struct nl_sock *sock,\n         base_seq += i + 1;\n     }\n     ofpbuf_uninit(&tmp_reply);\n-#else\n-    error = 0;\n-    uint8_t reply_buf[65536];\n-    for (i = 0; i < n; i++) {\n-        DWORD reply_len;\n-        bool ret;\n-        struct nl_transaction *txn = transactions[i];\n-        struct nlmsghdr *request_nlmsg, *reply_nlmsg;\n-\n-        ret = DeviceIoControl(sock->handle, OVS_IOCTL_TRANSACT,\n-                              txn->request->data,\n-                              txn->request->size,\n-                              reply_buf, sizeof reply_buf,\n-                              &reply_len, NULL);\n-\n-        if (ret && reply_len == 0) {\n-            /*\n-             * The current transaction did not produce any data to read and that\n-             * is not an error as such. Continue with the remainder of the\n-             * transactions.\n-             */\n-            txn->error = 0;\n-            if (txn->reply) {\n-                ofpbuf_clear(txn->reply);\n-            }\n-        } else if (!ret) {\n-            /* XXX: Map to a more appropriate error. */\n-            lost_communication(GetLastError());\n-            error = EINVAL;\n-            VLOG_DBG_RL(&rl, \"fatal driver failure: %s\",\n-                ovs_lasterror_to_string());\n-            break;\n-        }\n-\n-        if (reply_len != 0) {\n-            request_nlmsg = nl_msg_nlmsghdr(txn->request);\n-\n-            if (reply_len < sizeof *reply_nlmsg) {\n-                nl_sock_record_errors__(transactions, n, 0);\n-                VLOG_DBG_RL(&rl, \"insufficient length of reply %#\"PRIu32\n-                    \" for seq: %#\"PRIx32, reply_len, request_nlmsg->nlmsg_seq);\n-                break;\n-            }\n-\n-            /* Validate the sequence number in the reply. */\n-            reply_nlmsg = (struct nlmsghdr *)reply_buf;\n-\n-            if (request_nlmsg->nlmsg_seq != reply_nlmsg->nlmsg_seq) {\n-                ovs_assert(request_nlmsg->nlmsg_seq == reply_nlmsg->nlmsg_seq);\n-                VLOG_DBG_RL(&rl, \"mismatched seq request %#\"PRIx32\n-                    \", reply %#\"PRIx32, request_nlmsg->nlmsg_seq,\n-                    reply_nlmsg->nlmsg_seq);\n-                break;\n-            }\n-\n-            /* Handle errors embedded within the netlink message. */\n-            ofpbuf_use_stub(&tmp_reply, reply_buf, sizeof reply_buf);\n-            tmp_reply.size = sizeof reply_buf;\n-            if (nl_msg_nlmsgerr(&tmp_reply, &txn->error, NULL)) {\n-                if (txn->reply) {\n-                    ofpbuf_clear(txn->reply);\n-                }\n-                if (txn->error) {\n-                    VLOG_DBG_RL(&rl, \"received NAK error=%d (%s)\",\n-                                error, ovs_strerror(txn->error));\n-                }\n-            } else {\n-                txn->error = 0;\n-                if (txn->reply) {\n-                    /* Copy the reply to the buffer specified by the caller. */\n-                    if (reply_len > txn->reply->allocated) {\n-                        ofpbuf_reinit(txn->reply, reply_len);\n-                    }\n-                    memcpy(txn->reply->data, reply_buf, reply_len);\n-                    txn->reply->size = reply_len;\n-                }\n-            }\n-            ofpbuf_uninit(&tmp_reply);\n-        }\n-\n-        /* Count the number of successful transactions. */\n-        (*done)++;\n-\n-    }\n-\n-    if (!error) {\n-        COVERAGE_ADD(netlink_sent, n);\n-    }\n-#endif\n \n     return error;\n }\n@@ -1141,11 +715,7 @@ nl_sock_transact(struct nl_sock *sock, const struct ofpbuf *request,\n int\n nl_sock_drain(struct nl_sock *sock)\n {\n-#ifdef _WIN32\n-    return 0;\n-#else\n     return drain_rcvbuf(sock->fd);\n-#endif\n }\n \n /* Starts a Netlink \"dump\" operation, by sending 'request' to the kernel on a\n@@ -1337,90 +907,14 @@ nl_dump_done(struct nl_dump *dump)\n     return status == EOF ? 0 : status;\n }\n \n-#ifdef _WIN32\n-/* Pend an I/O request in the driver. The driver completes the I/O whenever\n- * an event or a packet is ready to be read. Once the I/O is completed\n- * the overlapped structure event associated with the pending I/O will be set\n- */\n-static int\n-pend_io_request(struct nl_sock *sock)\n-{\n-    struct ofpbuf request;\n-    uint64_t request_stub[128];\n-    struct ovs_header *ovs_header;\n-    struct nlmsghdr *nlmsg;\n-    uint32_t seq;\n-    int retval = 0;\n-    int error;\n-    DWORD bytes;\n-    OVERLAPPED *overlapped = CONST_CAST(OVERLAPPED *, &sock->overlapped);\n-    uint16_t cmd = OVS_CTRL_CMD_WIN_PEND_PACKET_REQ;\n-\n-    ovs_assert(sock->read_ioctl == OVS_IOCTL_READ_PACKET ||\n-               sock->read_ioctl  == OVS_IOCTL_READ_EVENT);\n-    if (sock->read_ioctl == OVS_IOCTL_READ_EVENT) {\n-        cmd = OVS_CTRL_CMD_WIN_PEND_REQ;\n-    }\n-\n-    int ovs_msg_size = sizeof (struct nlmsghdr) + sizeof (struct genlmsghdr) +\n-                               sizeof (struct ovs_header);\n-\n-    ofpbuf_use_stub(&request, request_stub, sizeof request_stub);\n-\n-    seq = nl_sock_allocate_seq(sock, 1);\n-    nl_msg_put_genlmsghdr(&request, 0, OVS_WIN_NL_CTRL_FAMILY_ID, 0,\n-                          cmd, OVS_WIN_CONTROL_VERSION);\n-    nlmsg = nl_msg_nlmsghdr(&request);\n-    nlmsg->nlmsg_seq = seq;\n-    nlmsg->nlmsg_pid = sock->pid;\n-\n-    ovs_header = ofpbuf_put_uninit(&request, sizeof *ovs_header);\n-    ovs_header->dp_ifindex = 0;\n-    nlmsg->nlmsg_len = request.size;\n-\n-    if (!DeviceIoControl(sock->handle, OVS_IOCTL_WRITE,\n-                         request.data, request.size,\n-                         NULL, 0, &bytes, overlapped)) {\n-        error = GetLastError();\n-        /* Check if the I/O got pended */\n-        if (error != ERROR_IO_INCOMPLETE && error != ERROR_IO_PENDING) {\n-            lost_communication(error);\n-            VLOG_ERR(\"nl_sock_wait failed - %s\\n\", ovs_format_message(error));\n-            retval = EINVAL;\n-        }\n-    } else {\n-        retval = EAGAIN;\n-    }\n-\n-done:\n-    ofpbuf_uninit(&request);\n-    return retval;\n-}\n-#endif  /* _WIN32 */\n-\n /* Causes poll_block() to wake up when any of the specified 'events' (which is\n- * a OR'd combination of POLLIN, POLLOUT, etc.) occur on 'sock'.\n- * On Windows, 'sock' is not treated as const, and may be modified. */\n+ * a OR'd combination of POLLIN, POLLOUT, etc.) occur on 'sock'. */\n void\n nl_sock_wait(const struct nl_sock *sock, short int events)\n {\n-#ifdef _WIN32\n-    if (sock->overlapped.Internal != STATUS_PENDING) {\n-        int ret = pend_io_request(CONST_CAST(struct nl_sock *, sock));\n-        if (ret == 0) {\n-            poll_wevent_wait(sock->overlapped.hEvent);\n-        } else {\n-            poll_immediate_wake();\n-        }\n-    } else {\n-        poll_wevent_wait(sock->overlapped.hEvent);\n-    }\n-#else\n     poll_fd_wait(sock->fd, events);\n-#endif\n }\n \n-#ifndef _WIN32\n /* Returns the underlying fd for 'sock', for use in \"poll()\"-like operations\n  * that can't use nl_sock_wait().\n  *\n@@ -1433,7 +927,6 @@ nl_sock_fd(const struct nl_sock *sock)\n {\n     return sock->fd;\n }\n-#endif\n \n /* Returns the PID associated with this socket. */\n uint32_t\n@@ -1500,7 +993,6 @@ genl_family_to_name(uint16_t id)\n     }\n }\n \n-#ifndef _WIN32\n static int\n do_lookup_genl_family(const char *name, struct nlattr **attrs,\n                       struct ofpbuf **replyp)\n@@ -1538,107 +1030,6 @@ do_lookup_genl_family(const char *name, struct nlattr **attrs,\n     *replyp = reply;\n     return 0;\n }\n-#else\n-static int\n-do_lookup_genl_family(const char *name, struct nlattr **attrs,\n-                      struct ofpbuf **replyp)\n-{\n-    struct nlmsghdr *nlmsg;\n-    struct ofpbuf *reply;\n-    int error;\n-    uint16_t family_id;\n-    const char *family_name;\n-    uint32_t family_version;\n-    uint32_t family_attrmax;\n-    uint32_t mcgrp_id = OVS_WIN_NL_INVALID_MCGRP_ID;\n-    const char *mcgrp_name = NULL;\n-\n-    *replyp = NULL;\n-    reply = ofpbuf_new(1024);\n-\n-    /* CTRL_ATTR_MCAST_GROUPS is supported only for VPORT family. */\n-    if (!strcmp(name, OVS_WIN_CONTROL_FAMILY)) {\n-        family_id = OVS_WIN_NL_CTRL_FAMILY_ID;\n-        family_name = OVS_WIN_CONTROL_FAMILY;\n-        family_version = OVS_WIN_CONTROL_VERSION;\n-        family_attrmax = OVS_WIN_CONTROL_ATTR_MAX;\n-    } else if (!strcmp(name, OVS_DATAPATH_FAMILY)) {\n-        family_id = OVS_WIN_NL_DATAPATH_FAMILY_ID;\n-        family_name = OVS_DATAPATH_FAMILY;\n-        family_version = OVS_DATAPATH_VERSION;\n-        family_attrmax = OVS_DP_ATTR_MAX;\n-    } else if (!strcmp(name, OVS_PACKET_FAMILY)) {\n-        family_id = OVS_WIN_NL_PACKET_FAMILY_ID;\n-        family_name = OVS_PACKET_FAMILY;\n-        family_version = OVS_PACKET_VERSION;\n-        family_attrmax = OVS_PACKET_ATTR_MAX;\n-    } else if (!strcmp(name, OVS_VPORT_FAMILY)) {\n-        family_id = OVS_WIN_NL_VPORT_FAMILY_ID;\n-        family_name = OVS_VPORT_FAMILY;\n-        family_version = OVS_VPORT_VERSION;\n-        family_attrmax = OVS_VPORT_ATTR_MAX;\n-        mcgrp_id = OVS_WIN_NL_VPORT_MCGRP_ID;\n-        mcgrp_name = OVS_VPORT_MCGROUP;\n-    } else if (!strcmp(name, OVS_FLOW_FAMILY)) {\n-        family_id = OVS_WIN_NL_FLOW_FAMILY_ID;\n-        family_name = OVS_FLOW_FAMILY;\n-        family_version = OVS_FLOW_VERSION;\n-        family_attrmax = OVS_FLOW_ATTR_MAX;\n-    } else if (!strcmp(name, OVS_METER_FAMILY)) {\n-        family_id =  OVS_WIN_NL_METER_FAMILY_ID;\n-        family_name = OVS_METER_FAMILY;\n-        family_version = OVS_METER_VERSION;\n-        family_attrmax = __OVS_METER_ATTR_MAX;\n-    } else if (!strcmp(name, OVS_WIN_NETDEV_FAMILY)) {\n-        family_id = OVS_WIN_NL_NETDEV_FAMILY_ID;\n-        family_name = OVS_WIN_NETDEV_FAMILY;\n-        family_version = OVS_WIN_NETDEV_VERSION;\n-        family_attrmax = OVS_WIN_NETDEV_ATTR_MAX;\n-    } else if (!strcmp(name, OVS_CT_LIMIT_FAMILY)) {\n-        family_id = OVS_WIN_NL_CTLIMIT_FAMILY_ID;\n-        family_name = OVS_CT_LIMIT_FAMILY;\n-        family_version = OVS_CT_LIMIT_VERSION;\n-        family_attrmax = OVS_CT_LIMIT_ATTR_MAX;\n-    } else {\n-        ofpbuf_delete(reply);\n-        return EINVAL;\n-    }\n-\n-    nl_msg_put_genlmsghdr(reply, 0, GENL_ID_CTRL, 0,\n-                          CTRL_CMD_NEWFAMILY, family_version);\n-    /* CTRL_ATTR_HDRSIZE and CTRL_ATTR_OPS are not populated, but the\n-     * callers do not seem to need them. */\n-    nl_msg_put_u16(reply, CTRL_ATTR_FAMILY_ID, family_id);\n-    nl_msg_put_string(reply, CTRL_ATTR_FAMILY_NAME, family_name);\n-    nl_msg_put_u32(reply, CTRL_ATTR_VERSION, family_version);\n-    nl_msg_put_u32(reply, CTRL_ATTR_MAXATTR, family_attrmax);\n-\n-    if (mcgrp_id != OVS_WIN_NL_INVALID_MCGRP_ID) {\n-        size_t mcgrp_ofs1 = nl_msg_start_nested(reply, CTRL_ATTR_MCAST_GROUPS);\n-        size_t mcgrp_ofs2= nl_msg_start_nested(reply,\n-            OVS_WIN_NL_VPORT_MCGRP_ID - OVS_WIN_NL_MCGRP_START_ID);\n-        nl_msg_put_u32(reply, CTRL_ATTR_MCAST_GRP_ID, mcgrp_id);\n-        ovs_assert(mcgrp_name != NULL);\n-        nl_msg_put_string(reply, CTRL_ATTR_MCAST_GRP_NAME, mcgrp_name);\n-        nl_msg_end_nested(reply, mcgrp_ofs2);\n-        nl_msg_end_nested(reply, mcgrp_ofs1);\n-    }\n-\n-    /* Set the total length of the netlink message. */\n-    nlmsg = nl_msg_nlmsghdr(reply);\n-    nlmsg->nlmsg_len = reply->size;\n-\n-    if (!nl_policy_parse(reply, NLMSG_HDRLEN + GENL_HDRLEN,\n-                         family_policy, attrs, ARRAY_SIZE(family_policy))\n-        || nl_attr_get_u16(attrs[CTRL_ATTR_FAMILY_ID]) == 0) {\n-        ofpbuf_delete(reply);\n-        return EPROTO;\n-    }\n-\n-    *replyp = reply;\n-    return 0;\n-}\n-#endif\n \n /* Finds the multicast group called 'group_name' in genl family 'family_name'.\n  * When successful, writes its result to 'multicast_group' and returns 0.\ndiff --git a/lib/netlink-socket.h b/lib/netlink-socket.h\nindex 7852ad052..4d087bcae 100644\n--- a/lib/netlink-socket.h\n+++ b/lib/netlink-socket.h\n@@ -151,14 +151,6 @@\n  *\n  *       nl_sock_recv() reads notifications sent this way.\n  *\n- *       Specifically on Windows platform, the datapath needs to allocate a\n- *       queue for packets, and it does so only when userspace \"subscribe\"'s to\n- *       packets on that netlink socket.  Before closing the netlink socket,\n- *       userspace needs to \"unsubscribe\" packets on that netlink socket.\n- *\n- *       nl_sock_subscribe_packets() and nl_sock_unsubscribe_packets() are\n- *       Windows specific.\n- *\n  *       Messages received this way can overflow, just like multicast\n  *       subscription messages, and they are reported the same way.  Because\n  *       packet notification messages do not report the state of a table, there\n@@ -200,10 +192,8 @@\n struct nl_sock;\n \n #ifndef HAVE_NETLINK\n-#ifndef _WIN32\n #error \"netlink-socket.h is only for hosts that support Netlink sockets\"\n #endif\n-#endif\n \n /* Netlink sockets. */\n int nl_sock_create(int protocol, struct nl_sock **);\n@@ -215,11 +205,6 @@ int nl_sock_leave_mcgroup(struct nl_sock *, unsigned int multicast_group);\n \n int nl_sock_listen_all_nsid(struct nl_sock *, bool enable);\n \n-#ifdef _WIN32\n-int nl_sock_subscribe_packets(struct nl_sock *sock);\n-int nl_sock_unsubscribe_packets(struct nl_sock *sock);\n-#endif\n-\n int nl_sock_send(struct nl_sock *, const struct ofpbuf *, bool wait);\n int nl_sock_send_seq(struct nl_sock *, const struct ofpbuf *,\n                      uint32_t nlmsg_seq, bool wait);\n@@ -228,9 +213,7 @@ int nl_sock_recv(struct nl_sock *, struct ofpbuf *, int *nsid, bool wait);\n int nl_sock_drain(struct nl_sock *);\n \n void nl_sock_wait(const struct nl_sock *, short int events);\n-#ifndef _WIN32\n int nl_sock_fd(const struct nl_sock *);\n-#endif\n \n uint32_t nl_sock_pid(const struct nl_sock *);\n \ndiff --git a/lib/ovs-atomic-msvc.h b/lib/ovs-atomic-msvc.h\ndeleted file mode 100644\nindex 3a71f61ae..000000000\n--- a/lib/ovs-atomic-msvc.h\n+++ /dev/null\n@@ -1,462 +0,0 @@\n-/*\n- * Copyright (c) 2014 Nicira, Inc.\n- *\n- * Licensed under the Apache License, Version 2.0 (the \"License\");\n- * you may not use this file except in compliance with the License.\n- * You may obtain a copy of the License at:\n- *\n- *     http://www.apache.org/licenses/LICENSE-2.0\n- *\n- * Unless required by applicable law or agreed to in writing, software\n- * distributed under the License is distributed on an \"AS IS\" BASIS,\n- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n- * See the License for the specific language governing permissions and\n- * limitations under the License.\n- */\n-\n-/* This header implements atomic operation primitives for MSVC\n- * on i586 or greater platforms (32 bit). */\n-#ifndef IN_OVS_ATOMIC_H\n-#error \"This header should only be included indirectly via ovs-atomic.h.\"\n-#endif\n-\n-/* From msdn documentation: With Visual Studio 2003, volatile to volatile\n- * references are ordered; the compiler will not re-order volatile variable\n- * access. With Visual Studio 2005, the compiler also uses acquire semantics\n- * for read operations on volatile variables and release semantics for write\n- * operations on volatile variables (when supported by the CPU).\n- *\n- * Though there is no clear documentation that states that anything greater\n- * than VS 2005 has the same behavior as described above, looking through MSVCs\n- * C++ atomics library in VS2013 shows that the compiler still takes\n- * acquire/release semantics on volatile variables. */\n-#define ATOMIC(TYPE) TYPE volatile\n-\n-typedef enum {\n-    memory_order_relaxed,\n-    memory_order_consume,\n-    memory_order_acquire,\n-    memory_order_release,\n-    memory_order_acq_rel,\n-    memory_order_seq_cst\n-} memory_order;\n-\n-#if _MSC_VER > 1800 && defined(_M_IX86)\n-/* From WDK 10 _InlineInterlocked* functions are renamed to\n- * _InlineInterlocked* although the documentation does not specify it */\n-#define _InterlockedExchangeAdd64 _InlineInterlockedExchangeAdd64\n-#define _InterlockedExchange64 _InlineInterlockedExchange64\n-#endif\n-\n-#define ATOMIC_BOOL_LOCK_FREE 2\n-#define ATOMIC_CHAR_LOCK_FREE 2\n-#define ATOMIC_SHORT_LOCK_FREE 2\n-#define ATOMIC_INT_LOCK_FREE 2\n-#define ATOMIC_LONG_LOCK_FREE 2\n-#define ATOMIC_LLONG_LOCK_FREE 2\n-#define ATOMIC_POINTER_LOCK_FREE 2\n-\n-#define IS_LOCKLESS_ATOMIC(OBJECT)                      \\\n-    (sizeof(OBJECT) <= 8 && IS_POW2(sizeof(OBJECT)))\n-\n-#define atomic_init(OBJECT, VALUE) (*(OBJECT) = (VALUE), (void) 0)\n-\n-static inline void\n-atomic_compiler_barrier(memory_order order)\n-{\n-    /* In case of 'memory_order_consume', it is implicitly assumed that\n-     * the compiler will not move instructions that have data-dependency\n-     * on the variable in question before the barrier. */\n-    if (order > memory_order_consume) {\n-        _ReadWriteBarrier();\n-    }\n-}\n-\n-static inline void\n-atomic_thread_fence(memory_order order)\n-{\n-    /* x86 is strongly ordered and acquire/release semantics come\n-     * automatically. */\n-    atomic_compiler_barrier(order);\n-    if (order == memory_order_seq_cst) {\n-        MemoryBarrier();\n-        atomic_compiler_barrier(order);\n-    }\n-}\n-\n-static inline void\n-atomic_signal_fence(memory_order order)\n-{\n-    atomic_compiler_barrier(order);\n-}\n-\n-/* 1, 2 and 4 bytes loads and stores are atomic on aligned memory. In addition,\n- * since the compiler automatically takes acquire and release semantics on\n- * volatile variables, for any order lesser than 'memory_order_seq_cst', we\n- * can directly assign or read values. */\n-\n-#define atomic_store32(DST, SRC, ORDER)                                 \\\n-    if (ORDER == memory_order_seq_cst) {                                \\\n-        InterlockedExchange((long volatile *) (DST),                    \\\n-                               (long) (SRC));                           \\\n-    } else {                                                            \\\n-        *(DST) = (SRC);                                                 \\\n-    }\n-\n-/* MSVC converts 64 bit writes into two instructions. So there is\n- * a possibility that an interrupt can make a 64 bit write non-atomic even\n- * when 8 byte aligned. So use InterlockedExchange64().\n- *\n- * For atomic stores, 'consume' and 'acquire' semantics are not valid. But we\n- * are using 'Exchange' to get atomic stores here and we only have\n- * InterlockedExchange64(), InterlockedExchangeNoFence64() and\n- * InterlockedExchange64Acquire() available. So we are forced to use\n- * InterlockedExchange64() which uses full memory barrier for everything\n- * greater than 'memory_order_relaxed'. */\n-#ifdef _M_IX86\n-#define atomic_store64(DST, SRC, ORDER)                                    \\\n-    if (ORDER == memory_order_relaxed) {                                   \\\n-        InterlockedExchangeNoFence64((int64_t volatile *) (DST),           \\\n-                                     (int64_t) (SRC));                     \\\n-    } else {                                                               \\\n-        InterlockedExchange64((int64_t volatile *) (DST), (int64_t) (SRC));\\\n-    }\n-#elif _M_X64\n-/* 64 bit writes are atomic on amd64 if 64 bit aligned. */\n-#define atomic_store64(DST, SRC, ORDER)                                    \\\n-    if (ORDER == memory_order_seq_cst) {                                   \\\n-        InterlockedExchange64((int64_t volatile *) (DST),                  \\\n-                               (int64_t) (SRC));                           \\\n-    } else {                                                               \\\n-        *(DST) = (SRC);                                                    \\\n-    }\n-#endif\n-\n-#define atomic_store8(DST, SRC, ORDER)                                     \\\n-    if (ORDER == memory_order_seq_cst) {                                   \\\n-        InterlockedExchange8((char volatile *) (DST), (char) (SRC));       \\\n-    } else {                                                               \\\n-        *(DST) = (SRC);                                                    \\\n-    }\n-\n-#define atomic_store16(DST, SRC, ORDER)                                    \\\n-    if (ORDER == memory_order_seq_cst) {                                   \\\n-        InterlockedExchange16((short volatile *) (DST), (short) (SRC));    \\\n-    } else {                                                               \\\n-        *(DST) = (SRC);                                                    \\\n-    }\n-\n-#define atomic_store(DST, SRC)                               \\\n-        atomic_store_explicit(DST, SRC, memory_order_seq_cst)\n-\n-#define atomic_store_explicit(DST, SRC, ORDER)                           \\\n-    if (sizeof *(DST) == 1) {                                            \\\n-        atomic_store8(DST, SRC, ORDER)                                   \\\n-    } else if (sizeof *(DST) == 2) {                                     \\\n-        atomic_store16( DST, SRC, ORDER)                                 \\\n-    } else if (sizeof *(DST) == 4) {                                     \\\n-        atomic_store32(DST, SRC, ORDER)                                  \\\n-    } else if (sizeof *(DST) == 8) {                                     \\\n-        atomic_store64(DST, SRC, ORDER)                                  \\\n-    } else {                                                             \\\n-        abort();                                                         \\\n-    }\n-\n-/* On x86, for 'memory_order_seq_cst', if stores are locked, the corresponding\n- * reads don't need to be locked (based on the following in Intel Developers\n- * manual:\n- * “Locked operations are atomic with respect to all other memory operations\n- * and all externally visible events. Only instruction fetch and page table\n- * accesses can pass locked instructions. Locked instructions can be used to\n- * synchronize data written by one processor and read by another processor.\n- * For the P6 family processors, locked operations serialize all outstanding\n- * load and store operations (that is, wait for them to complete). This rule\n- * is also true for the Pentium 4 and Intel Xeon processors, with one\n- * exception. Load operations that reference weakly ordered memory types\n- * (such as the WC memory type) may not be serialized.\"). */\n-\n- /* For 8, 16 and 32 bit variations. */\n-#define atomic_readX(SRC, DST, ORDER)                                      \\\n-    *(DST) = *(SRC);\n-\n-/* MSVC converts 64 bit reads into two instructions. So there is\n- * a possibility that an interrupt can make a 64 bit read non-atomic even\n- * when 8 byte aligned. So use fully memory barrier InterlockedOr64(). */\n-#ifdef _M_IX86\n-#define atomic_read64(SRC, DST, ORDER)                                     \\\n-    __pragma (warning(push))                                               \\\n-    __pragma (warning(disable:4047))                                       \\\n-    *(DST) = InterlockedOr64((int64_t volatile *) (SRC), 0);               \\\n-    __pragma (warning(pop))\n-#elif _M_X64\n-/* 64 bit reads are atomic on amd64 if 64 bit aligned. */\n-#define atomic_read64(SRC, DST, ORDER)                                     \\\n-    *(DST) = *(SRC);\n-#endif\n-\n-#define atomic_read(SRC, DST)                               \\\n-        atomic_read_explicit(SRC, DST, memory_order_seq_cst)\n-\n-#define atomic_read_explicit(SRC, DST, ORDER)                             \\\n-    if (sizeof *(DST) == 1 || sizeof *(DST) == 2 || sizeof *(DST) == 4) { \\\n-        atomic_readX(SRC, DST, ORDER)                                     \\\n-    } else if (sizeof *(DST) == 8) {                                      \\\n-        atomic_read64(SRC, DST, ORDER)                                    \\\n-    } else {                                                              \\\n-        abort();                                                          \\\n-    }\n-\n-/* For add, sub, and logical operations, for 8, 16 and 64 bit data types,\n- * functions for all the different memory orders does not exist\n- * (though documentation exists for some of them).  The MSVC C++ library which\n- * implements the c11 atomics simply calls the full memory barrier function\n- * for everything in x86(see xatomic.h). So do the same here. */\n-\n-/* For 8, 16 and 64 bit variations. */\n-#define atomic_op(OP, X, RMW, ARG, ORIG, ORDER)                         \\\n-    atomic_##OP##_generic(X, RMW, ARG, ORIG, ORDER)\n-\n-/* Arithmetic addition calls. */\n-\n-#define atomic_add8(RMW, ARG, ORIG, ORDER)                        \\\n-    *(ORIG) = _InterlockedExchangeAdd8((char volatile *) (RMW),   \\\n-                                      (char) (ARG));\n-\n-#define atomic_add16(RMW, ARG, ORIG, ORDER)                        \\\n-    *(ORIG) = _InterlockedExchangeAdd16((short volatile *) (RMW),   \\\n-                                      (short) (ARG));\n-\n-#define atomic_add32(RMW, ARG, ORIG, ORDER)                        \\\n-    *(ORIG) = InterlockedExchangeAdd((long volatile *) (RMW),   \\\n-                                      (long) (ARG));\n-#define atomic_add64(RMW, ARG, ORIG, ORDER)                        \\\n-    *(ORIG) = _InterlockedExchangeAdd64((int64_t volatile *) (RMW),   \\\n-                                      (int64_t) (ARG));\n-\n-#define atomic_add(RMW, ARG, ORIG)                               \\\n-        atomic_add_explicit(RMW, ARG, ORIG, memory_order_seq_cst)\n-\n-#define atomic_add_explicit(RMW, ARG, ORIG, ORDER)             \\\n-    if (sizeof *(RMW) == 1) {                                  \\\n-        atomic_add8(RMW, ARG, ORIG, ORDER)               \\\n-    } else if (sizeof *(RMW) == 2) {                           \\\n-        atomic_add16(RMW, ARG, ORIG, ORDER)              \\\n-    } else if (sizeof *(RMW) == 4) {                           \\\n-        atomic_add32(RMW, ARG, ORIG, ORDER)                    \\\n-    } else if (sizeof *(RMW) == 8) {                           \\\n-        atomic_add64(RMW, ARG, ORIG, ORDER)              \\\n-    } else {                                                   \\\n-        abort();                                               \\\n-    }\n-\n-/* Arithmetic subtraction calls. */\n-\n-#define atomic_sub(RMW, ARG, ORIG)                             \\\n-        atomic_add_explicit(RMW, (0 - (ARG)), ORIG, memory_order_seq_cst)\n-\n-#define atomic_sub_explicit(RMW, ARG, ORIG, ORDER)           \\\n-        atomic_add_explicit(RMW, (0 - (ARG)), ORIG, ORDER)\n-\n-/* Logical 'and' calls. */\n-\n-#define atomic_and32(RMW, ARG, ORIG, ORDER)                        \\\n-    *(ORIG) = InterlockedAnd((int32_t volatile *) (RMW), (int32_t) (ARG));\n-\n-/* For 8, 16 and 64 bit variations. */\n-#define atomic_and_generic(X, RMW, ARG, ORIG, ORDER)                        \\\n-    *(ORIG) = InterlockedAnd##X((int##X##_t volatile *) (RMW),              \\\n-                                (int##X##_t) (ARG));\n-\n-#define atomic_and(RMW, ARG, ORIG)                               \\\n-        atomic_and_explicit(RMW, ARG, ORIG, memory_order_seq_cst)\n-\n-#define atomic_and_explicit(RMW, ARG, ORIG, ORDER)             \\\n-    if (sizeof *(RMW) == 1) {                                  \\\n-        atomic_op(and, 8, RMW, ARG, ORIG, ORDER)               \\\n-    } else if (sizeof *(RMW) == 2) {                           \\\n-        atomic_op(and, 16, RMW, ARG, ORIG, ORDER)              \\\n-    } else if (sizeof *(RMW) == 4) {                           \\\n-        atomic_and32(RMW, ARG, ORIG, ORDER)                    \\\n-    } else if (sizeof *(RMW) == 8) {                           \\\n-        atomic_op(and, 64, RMW, ARG, ORIG, ORDER)              \\\n-    } else {                                                   \\\n-        abort();                                               \\\n-    }\n-\n-/* Logical 'Or' calls. */\n-\n-#define atomic_or32(RMW, ARG, ORIG, ORDER)                        \\\n-    *(ORIG) = InterlockedOr((int32_t volatile *) (RMW), (int32_t) (ARG));\n-\n-/* For 8, 16 and 64 bit variations. */\n-#define atomic_or_generic(X, RMW, ARG, ORIG, ORDER)                        \\\n-    *(ORIG) = InterlockedOr##X((int##X##_t volatile *) (RMW),              \\\n-                               (int##X##_t) (ARG));\n-\n-#define atomic_or(RMW, ARG, ORIG)                               \\\n-        atomic_or_explicit(RMW, ARG, ORIG, memory_order_seq_cst)\n-\n-#define atomic_or_explicit(RMW, ARG, ORIG, ORDER)              \\\n-    if (sizeof *(RMW) == 1) {                                  \\\n-        atomic_op(or, 8, RMW, ARG, ORIG, ORDER)                \\\n-    } else if (sizeof *(RMW) == 2) {                           \\\n-        atomic_op(or, 16, RMW, ARG, ORIG, ORDER)               \\\n-    } else if (sizeof *(RMW) == 4) {                           \\\n-        atomic_or32(RMW, ARG, ORIG, ORDER)                     \\\n-    } else if (sizeof *(RMW) == 8) {                           \\\n-        atomic_op(or, 64, RMW, ARG, ORIG, ORDER)               \\\n-    } else {                                                   \\\n-        abort();                                               \\\n-    }\n-\n-/* Logical Xor calls. */\n-\n-#define atomic_xor32(RMW, ARG, ORIG, ORDER)                        \\\n-    *(ORIG) = InterlockedXor((int32_t volatile *) (RMW), (int32_t) (ARG));\n-\n-/* For 8, 16 and 64 bit variations. */\n-#define atomic_xor_generic(X, RMW, ARG, ORIG, ORDER)                        \\\n-    *(ORIG) = InterlockedXor##X((int##X##_t volatile *) (RMW),              \\\n-                                (int##X##_t) (ARG));\n-\n-#define atomic_xor(RMW, ARG, ORIG)                               \\\n-        atomic_xor_explicit(RMW, ARG, ORIG, memory_order_seq_cst)\n-\n-#define atomic_xor_explicit(RMW, ARG, ORIG, ORDER)             \\\n-    if (sizeof *(RMW) == 1) {                                  \\\n-        atomic_op(xor, 8, RMW, ARG, ORIG, ORDER)               \\\n-    } else if (sizeof *(RMW) == 2) {                           \\\n-        atomic_op(xor, 16, RMW, ARG, ORIG, ORDER)              \\\n-    } else if (sizeof *(RMW) == 4) {                           \\\n-        atomic_xor32(RMW, ARG, ORIG, ORDER);                   \\\n-    } else if (sizeof *(RMW) == 8) {                           \\\n-        atomic_op(xor, 64, RMW, ARG, ORIG, ORDER)              \\\n-    } else {                                                   \\\n-        abort();                                               \\\n-    }\n-\n-#define atomic_compare_exchange_strong(DST, EXP, SRC)   \\\n-    atomic_compare_exchange_strong_explicit(DST, EXP, SRC, \\\n-                                            memory_order_seq_cst, \\\n-                                            memory_order_seq_cst)\n-\n-#define atomic_compare_exchange_weak atomic_compare_exchange_strong\n-#define atomic_compare_exchange_weak_explicit \\\n-        atomic_compare_exchange_strong_explicit\n-\n-/* While intrinsics offering different memory ordering\n- * are available in MSVC C compiler, they are not defined\n- * in the C++ compiler. Ignore for compatibility.\n- *\n- * Use nested ternary operators as the GNU extension ({})\n- * is not available.\n- */\n-\n-#define atomic_exchange_explicit(DST, SRC, ORDER) \\\n-    ((sizeof *(DST) == 1) ? \\\n-        _InterlockedExchange8((char volatile *) DST, SRC) \\\n-    : (sizeof *(DST) == 2) ? \\\n-        _InterlockedExchange16((short volatile *) DST, SRC) \\\n-    : (sizeof *(DST) == 4) ? \\\n-        _InterlockedExchange((long int volatile *) DST, SRC) \\\n-    : (sizeof *(DST) == 8) ? \\\n-        _InterlockedExchange64((__int64 volatile *) DST, SRC) \\\n-    : (abort(), 0))\n-\n-#define atomic_exchange(DST, SRC) \\\n-        atomic_exchange_explicit(DST, SRC, memory_order_seq_cst)\n-\n-/* MSVCs c++ compiler implements c11 atomics and looking through its\n- * implementation (in xatomic.h), orders are ignored for x86 platform.\n- * Do the same here. */\n-static inline bool\n-atomic_compare_exchange8(int8_t volatile *dst, int8_t *expected, int8_t src)\n-{\n-    int8_t previous = _InterlockedCompareExchange8((char volatile *)dst,\n-                                                   src, *expected);\n-    if (previous == *expected) {\n-        return true;\n-    } else {\n-        *expected = previous;\n-        return false;\n-    }\n-}\n-\n-static inline bool\n-atomic_compare_exchange16(int16_t volatile *dst, int16_t *expected,\n-                          int16_t src)\n-{\n-    int16_t previous = InterlockedCompareExchange16(dst, src, *expected);\n-    if (previous == *expected) {\n-        return true;\n-    } else {\n-        *expected = previous;\n-        return false;\n-    }\n-}\n-\n-static inline bool\n-atomic_compare_exchange32(int32_t volatile *dst, int32_t *expected,\n-                          int32_t src)\n-{\n-    int32_t previous = InterlockedCompareExchange((long volatile *)dst,\n-                                                  src, *expected);\n-    if (previous == *expected) {\n-        return true;\n-    } else {\n-        *expected = previous;\n-        return false;\n-    }\n-}\n-\n-static inline bool\n-atomic_compare_exchange64(int64_t volatile *dst, int64_t *expected,\n-                          int64_t src)\n-{\n-    int64_t previous = InterlockedCompareExchange64(dst, src, *expected);\n-    if (previous == *expected) {\n-        return true;\n-    } else {\n-        *expected = previous;\n-        return false;\n-    }\n-}\n-\n-static inline bool\n-atomic_compare_unreachable()\n-{\n-    return true;\n-}\n-\n-#define atomic_compare_exchange_strong_explicit(DST, EXP, SRC, ORD1, ORD2)    \\\n-    (sizeof *(DST) == 1                                                       \\\n-     ? atomic_compare_exchange8((int8_t volatile *) (DST), (int8_t *) (EXP),  \\\n-                                (int8_t) (SRC))                               \\\n-     : (sizeof *(DST) == 2                                                    \\\n-     ? atomic_compare_exchange16((int16_t volatile *) (DST),                  \\\n-                                 (int16_t *) (EXP), (int16_t) (SRC))          \\\n-     : (sizeof *(DST) == 4                                                    \\\n-     ? atomic_compare_exchange32((int32_t volatile *) (DST),                  \\\n-                                 (int32_t *) (EXP), (int32_t) (SRC))          \\\n-     : (sizeof *(DST) == 8                                                    \\\n-     ? atomic_compare_exchange64((int64_t volatile *) (DST),                  \\\n-                                 (int64_t *) (EXP), (int64_t) (SRC))          \\\n-     : ovs_fatal(0, \"atomic operation with size greater than 8 bytes\"),       \\\n-       atomic_compare_unreachable()))))\n-\n-\f\n-/* atomic_flag */\n-\n-typedef ATOMIC(int32_t) atomic_flag;\n-#define ATOMIC_FLAG_INIT 0\n-\n-#define atomic_flag_test_and_set(FLAG)                 \\\n-    (bool) InterlockedBitTestAndSet(FLAG, 0)\n-\n-#define atomic_flag_test_and_set_explicit(FLAG, ORDER) \\\n-        atomic_flag_test_and_set(FLAG)\n-\n-#define atomic_flag_clear_explicit(FLAG, ORDER) \\\n-        atomic_flag_clear()\n-#define atomic_flag_clear(FLAG)                 \\\n-    InterlockedBitTestAndReset(FLAG, 0)\ndiff --git a/lib/ovs-atomic.h b/lib/ovs-atomic.h\nindex f140d25fe..dc571743b 100644\n--- a/lib/ovs-atomic.h\n+++ b/lib/ovs-atomic.h\n@@ -344,8 +344,6 @@\n         #include \"ovs-atomic-i586.h\"\n     #elif HAVE_GCC4_ATOMICS\n         #include \"ovs-atomic-gcc4+.h\"\n-    #elif _MSC_VER\n-        #include \"ovs-atomic-msvc.h\"\n     #else\n         /* ovs-atomic-pthreads implementation is provided for portability.\n          * It might be too slow for real use because Open vSwitch is\ndiff --git a/lib/ovs-lldp.c b/lib/ovs-lldp.c\nindex 152777248..4470b5d92 100644\n--- a/lib/ovs-lldp.c\n+++ b/lib/ovs-lldp.c\n@@ -798,9 +798,7 @@ lldp_create(const struct netdev *netdev,\n     hw = lldpd_alloc_hardware(lldp->lldpd, netdev_get_name(netdev), 0);\n \n     ovs_refcount_init(&lldp->ref_cnt);\n-#ifndef _WIN32\n     hw->h_flags |= IFF_RUNNING;\n-#endif\n     hw->h_mtu = mtu;\n     hw->h_lport.p_id_subtype = LLDP_PORTID_SUBTYPE_IFNAME;\n     hw->h_lport.p_id = xstrdup(netdev_get_name(netdev));\n@@ -882,9 +880,7 @@ lldp_create_dummy(void)\n     hw = lldpd_alloc_hardware(lldp->lldpd, \"dummy-hw\", 0);\n \n     ovs_refcount_init(&lldp->ref_cnt);\n-#ifndef _WIN32\n     hw->h_flags |= IFF_RUNNING;\n-#endif\n     hw->h_mtu = 1500;\n     hw->h_lport.p_id_subtype = LLDP_PORTID_SUBTYPE_IFNAME;\n     hw->h_lport.p_id = \"dummy-port\";\ndiff --git a/lib/ovs-rcu.c b/lib/ovs-rcu.c\nindex 49afcc55c..757668eec 100644\n--- a/lib/ovs-rcu.c\n+++ b/lib/ovs-rcu.c\n@@ -415,12 +415,7 @@ ovsrcu_thread_exit_cb(void *perthread)\n     ovsrcu_unregister__(perthread);\n }\n \n-/* Cancels the callback to ovsrcu_thread_exit_cb().\n- *\n- * Cancelling the call to the destructor during the main thread exit\n- * is needed while using pthreads-win32 library in Windows. It has been\n- * observed that in pthreads-win32, a call to the destructor during\n- * main thread exit causes undefined behavior. */\n+/* Cancels the callback to ovsrcu_thread_exit_cb(). */\n static void\n ovsrcu_cancel_thread_exit_cb(void *aux OVS_UNUSED)\n {\ndiff --git a/lib/ovs-thread.c b/lib/ovs-thread.c\nindex 243791de8..bbb5f0656 100644\n--- a/lib/ovs-thread.c\n+++ b/lib/ovs-thread.c\n@@ -18,9 +18,7 @@\n #include \"ovs-thread.h\"\n #include <errno.h>\n #include <poll.h>\n-#ifndef _WIN32\n #include <signal.h>\n-#endif\n #include <stdlib.h>\n #include <unistd.h>\n #include \"compiler.h\"\n@@ -194,9 +192,7 @@ XPTHREAD_FUNC2(pthread_key_create, pthread_key_t *, destructor_func *);\n XPTHREAD_FUNC1(pthread_key_delete, pthread_key_t);\n XPTHREAD_FUNC2(pthread_setspecific, pthread_key_t, const void *);\n \n-#ifndef _WIN32\n XPTHREAD_FUNC3(pthread_sigmask, int, const sigset_t *, sigset_t *);\n-#endif\n \n static void\n ovs_mutex_init__(struct ovs_mutex *l, int type)\n@@ -254,9 +250,6 @@ ovs_rwlock_init(struct ovs_rwlock *l)\n     error = pthread_rwlock_init(&l->lock, &attr);\n     xpthread_rwlockattr_destroy(&attr);\n #else\n-    /* It is important to avoid passing a rwlockattr in this case because\n-     * Windows pthreads 2.9.1 (and earlier) fail and abort if passed one, even\n-     * one without any special attributes. */\n     error = pthread_rwlock_init(&l->lock, NULL);\n #endif\n \n@@ -542,7 +535,6 @@ assert_single_threaded_at(const char *where)\n     }\n }\n \n-#ifndef _WIN32\n /* Forks the current process (checking that this is allowed).  Aborts with\n  * VLOG_FATAL if fork() returns an error, and otherwise returns the value\n  * returned by fork().\n@@ -566,7 +558,6 @@ xfork_at(const char *where)\n     }\n     return pid;\n }\n-#endif\n \n /* Notes that the process must not call fork() from now on, for the specified\n  * 'reason'.  (The process may still fork() if it execs itself immediately\n@@ -638,13 +629,7 @@ count_cpu_cores__(void)\n {\n     long int n_cores;\n \n-#ifndef _WIN32\n     n_cores = sysconf(_SC_NPROCESSORS_ONLN);\n-#else\n-    SYSTEM_INFO sysinfo;\n-    GetSystemInfo(&sysinfo);\n-    n_cores = sysinfo.dwNumberOfProcessors;\n-#endif\n #ifdef __linux__\n     if (n_cores > 0) {\n         cpu_set_t *set = CPU_ALLOC(n_cores);\n@@ -694,13 +679,7 @@ count_total_cores(void)\n {\n     long int n_cores;\n \n-#ifndef _WIN32\n     n_cores = sysconf(_SC_NPROCESSORS_CONF);\n-#else\n-    n_cores = 0;\n-    errno = ENOTSUP;\n-#endif\n-\n     return n_cores > 0 ? n_cores : 0;\n }\n \n@@ -799,12 +778,7 @@ ovsthread_key_destruct__(void *slots_)\n     free(slots);\n }\n \n-/* Cancels the callback to ovsthread_key_destruct__().\n- *\n- * Cancelling the call to the destructor during the main thread exit\n- * is needed while using pthreads-win32 library in Windows. It has been\n- * observed that in pthreads-win32, a call to the destructor during\n- * main thread exit causes undefined behavior. */\n+/* Cancels the callback to ovsthread_key_destruct__(). */\n static void\n ovsthread_cancel_ovsthread_key_destruct__(void *aux OVS_UNUSED)\n {\ndiff --git a/lib/ovs-thread.h b/lib/ovs-thread.h\nindex d37f4ffc4..50bd5a099 100644\n--- a/lib/ovs-thread.h\n+++ b/lib/ovs-thread.h\n@@ -117,9 +117,7 @@ void xpthread_key_create(pthread_key_t *, void (*destructor)(void *));\n void xpthread_key_delete(pthread_key_t);\n void xpthread_setspecific(pthread_key_t, const void *);\n \n-#ifndef _WIN32\n void xpthread_sigmask(int, const sigset_t *, sigset_t *);\n-#endif\n \n pthread_t ovs_thread_create(const char *name, void *(*)(void *), void *);\n void xpthread_join(pthread_t, void **);\n@@ -511,10 +509,8 @@ bool single_threaded(void);\n void assert_single_threaded_at(const char *where);\n #define assert_single_threaded() assert_single_threaded_at(OVS_SOURCE_LOCATOR)\n \n-#ifndef _WIN32\n pid_t xfork_at(const char *where);\n #define xfork() xfork_at(OVS_SOURCE_LOCATOR)\n-#endif\n \n void forbid_forking(const char *reason);\n bool may_fork(void);\ndiff --git a/lib/poll-loop.c b/lib/poll-loop.c\nindex 70fabeb8a..cbeb6990b 100644\n--- a/lib/poll-loop.c\n+++ b/lib/poll-loop.c\n@@ -77,20 +77,10 @@ find_poll_node(struct poll_loop *loop, int fd, HANDLE wevent)\n     return NULL;\n }\n \n-/* On Unix based systems:\n- *\n- *     Registers 'fd' as waiting for the specified 'events' (which should be\n- *     POLLIN or POLLOUT or POLLIN | POLLOUT).  The following call to\n- *     poll_block() will wake up when 'fd' becomes ready for one or more of the\n- *     requested events. The 'fd's are given to poll() function later.\n- *\n- * On Windows system:\n- *\n- *     If 'fd' is specified, create a new 'wevent'. Association of 'fd' and\n- *     'wevent' for 'events' happens in poll_block(). If 'wevent' is specified,\n- *     it is assumed that it is unrelated to any sockets and poll_block()\n- *     will wake up on any event on that 'wevent'. It is an error to pass\n- *     both 'wevent' and 'fd'.\n+/* Registers 'fd' as waiting for the specified 'events' (which should be\n+ * POLLIN or POLLOUT or POLLIN | POLLOUT).  The following call to\n+ * poll_block() will wake up when 'fd' becomes ready for one or more of the\n+ * requested events. The 'fd's are given to poll() function later.\n  *\n  * The event registration is one-shot: only the following call to\n  * poll_block() is affected.  The event will need to be re-registered after\n@@ -120,11 +110,6 @@ poll_create_node(int fd, HANDLE wevent, short int events, const char *where)\n                     hash_2words(fd, (uint32_t)wevent));\n         node->pollfd.fd = fd;\n         node->pollfd.events = events;\n-#ifdef _WIN32\n-        if (!wevent) {\n-            wevent = CreateEvent(NULL, FALSE, FALSE, NULL);\n-        }\n-#endif\n         node->wevent = wevent;\n         node->where = where;\n     }\n@@ -134,8 +119,6 @@ poll_create_node(int fd, HANDLE wevent, short int events, const char *where)\n  * or POLLOUT or POLLIN | POLLOUT).  The following call to poll_block() will\n  * wake up when 'fd' becomes ready for one or more of the requested events.\n  *\n- * On Windows, 'fd' must be a socket.\n- *\n  * The event registration is one-shot: only the following call to poll_block()\n  * is affected.  The event will need to be re-registered after poll_block() is\n  * called if it is to persist.\n@@ -149,24 +132,6 @@ poll_fd_wait_at(int fd, short int events, const char *where)\n     poll_create_node(fd, 0, events, where);\n }\n \n-#ifdef _WIN32\n-/* Registers for the next call to poll_block() to wake up when 'wevent' is\n- * signaled.\n- *\n- * The event registration is one-shot: only the following call to poll_block()\n- * is affected.  The event will need to be re-registered after poll_block() is\n- * called if it is to persist.\n- *\n- * ('where' is used in debug logging.  Commonly one would use\n- * poll_wevent_wait() to automatically provide the caller's source file and\n- * line number for 'where'.) */\n-void\n-poll_wevent_wait_at(HANDLE wevent, const char *where)\n-{\n-    poll_create_node(0, wevent, 0, where);\n-}\n-#endif /* _WIN32 */\n-\n /* Causes the following call to poll_block() to block for no more than 'msec'\n  * milliseconds.  If 'msec' is nonpositive, the following call to poll_block()\n  * will not block at all.\n@@ -302,12 +267,6 @@ free_poll_nodes(struct poll_loop *loop)\n \n     HMAP_FOR_EACH_SAFE (node, hmap_node, &loop->poll_nodes) {\n         hmap_remove(&loop->poll_nodes, &node->hmap_node);\n-#ifdef _WIN32\n-        if (node->wevent && node->pollfd.fd) {\n-            WSAEventSelect(node->pollfd.fd, NULL, 0);\n-            CloseHandle(node->wevent);\n-        }\n-#endif\n         free(node);\n     }\n }\n@@ -337,28 +296,10 @@ poll_block(void)\n     timewarp_run();\n     pollfds = xmalloc(hmap_count(&loop->poll_nodes) * sizeof *pollfds);\n \n-#ifdef _WIN32\n-    wevents = xmalloc(hmap_count(&loop->poll_nodes) * sizeof *wevents);\n-#endif\n-\n     /* Populate with all the fds and events. */\n     i = 0;\n     HMAP_FOR_EACH (node, hmap_node, &loop->poll_nodes) {\n-        pollfds[i] = node->pollfd;\n-#ifdef _WIN32\n-        wevents[i] = node->wevent;\n-        if (node->pollfd.fd && node->wevent) {\n-            short int wsa_events = 0;\n-            if (node->pollfd.events & POLLIN) {\n-                wsa_events |= FD_READ | FD_ACCEPT | FD_CLOSE;\n-            }\n-            if (node->pollfd.events & POLLOUT) {\n-                wsa_events |= FD_WRITE | FD_CONNECT | FD_CLOSE;\n-            }\n-            WSAEventSelect(node->pollfd.fd, node->wevent, wsa_events);\n-        }\n-#endif\n-        i++;\n+        pollfds[i++] = node->pollfd;\n     }\n \n     retval = time_poll(pollfds, hmap_count(&loop->poll_nodes), wevents,\ndiff --git a/lib/process.c b/lib/process.c\nindex b5ec02823..7328800f2 100644\n--- a/lib/process.c\n+++ b/lib/process.c\n@@ -87,7 +87,6 @@ static void sigchld_handler(int signr OVS_UNUSED);\n void\n process_init(void)\n {\n-#ifndef _WIN32\n     static bool inited;\n     struct sigaction sa;\n \n@@ -106,7 +105,6 @@ process_init(void)\n     sigemptyset(&sa.sa_mask);\n     sa.sa_flags = SA_NOCLDSTOP | SA_RESTART;\n     xsigaction(SIGCHLD, &sa, NULL);\n-#endif\n }\n \n char *\n@@ -184,7 +182,6 @@ process_register(const char *name, pid_t pid)\n     return p;\n }\n \n-#ifndef _WIN32\n static bool\n rlim_is_finite(rlim_t limit)\n {\n@@ -225,7 +222,6 @@ get_max_fds(void)\n \n     return max_fds;\n }\n-#endif /* _WIN32 */\n \n /* Starts a subprocess with the arguments in the null-terminated argv[] array.\n  * argv[0] is used as the name of the process.  Searches the PATH environment\n@@ -242,7 +238,6 @@ get_max_fds(void)\n int\n process_start(char **argv, struct process **pp)\n {\n-#ifndef _WIN32\n     pid_t pid;\n     int error;\n     sigset_t prev_mask;\n@@ -282,10 +277,6 @@ process_start(char **argv, struct process **pp)\n     }\n     xpthread_sigmask(SIG_SETMASK, &prev_mask, NULL);\n     return error;\n-#else\n-    *pp = NULL;\n-    return ENOSYS;\n-#endif\n }\n \n /* Destroys process 'p'. */\n@@ -304,13 +295,9 @@ process_destroy(struct process *p)\n int\n process_kill(const struct process *p, int signr)\n {\n-#ifndef _WIN32\n     return (p->exited ? ESRCH\n             : !kill(p->pid, signr) ? 0\n             : errno);\n-#else\n-    return ENOSYS;\n-#endif\n }\n \n /* Returns the pid of process 'p'. */\n@@ -528,7 +515,6 @@ char *\n process_status_msg(int status)\n {\n     struct ds ds = DS_EMPTY_INITIALIZER;\n-#ifndef _WIN32\n     if (WIFEXITED(status)) {\n         ds_put_format(&ds, \"exit status %d\", WEXITSTATUS(status));\n     } else if (WIFSIGNALED(status)) {\n@@ -547,9 +533,6 @@ process_status_msg(int status)\n     if (WCOREDUMP(status)) {\n         ds_put_cstr(&ds, \", core dumped\");\n     }\n-#else\n-    ds_put_cstr(&ds, \"function not supported.\");\n-#endif\n     return ds_cstr(&ds);\n }\n \n@@ -557,7 +540,6 @@ process_status_msg(int status)\n void\n process_run(void)\n {\n-#ifndef _WIN32\n     char buf[_POSIX_PIPE_BUF];\n \n     if (!ovs_list_is_empty(&all_processes) && read(fds[0], buf, sizeof buf) > 0) {\n@@ -580,7 +562,6 @@ process_run(void)\n             }\n         }\n     }\n-#endif\n }\n \n /* Causes the next call to poll_block() to wake up when process 'p' has\n@@ -588,15 +569,11 @@ process_run(void)\n void\n process_wait(struct process *p)\n {\n-#ifndef _WIN32\n     if (p->exited) {\n         poll_immediate_wake();\n     } else {\n         poll_fd_wait(fds[0], POLLIN);\n     }\n-#else\n-    OVS_NOT_REACHED();\n-#endif\n }\n \n char *\ndiff --git a/lib/rconn.c b/lib/rconn.c\nindex 60fb8a664..0a5584239 100644\n--- a/lib/rconn.c\n+++ b/lib/rconn.c\n@@ -1155,14 +1155,7 @@ static void\n report_error(struct rconn *rc, int error)\n     OVS_REQUIRES(rc->mutex)\n {\n-    /* On Windows, when a peer terminates without calling a closesocket()\n-     * on socket fd, we get WSAECONNRESET. Don't print warning messages\n-     * for that case. */\n-    if (error == EOF\n-#ifdef _WIN32\n-        || error == WSAECONNRESET\n-#endif\n-        ) {\n+    if (error == EOF) {\n         /* If 'rc' isn't reliable, then we don't really expect this connection\n          * to last forever anyway (probably it's a connection that we received\n          * via accept()), so use DBG level to avoid cluttering the logs. */\ndiff --git a/lib/route-table-stub.c b/lib/route-table-stub.c\ndeleted file mode 100644\nindex dd0b096d4..000000000\n--- a/lib/route-table-stub.c\n+++ /dev/null\n@@ -1,50 +0,0 @@\n-/* Copyright (c) 2012, 2013, 2014 Nicira, Inc.\n- *\n- * Licensed under the Apache License, Version 2.0 (the \"License\");\n- * you may not use this file except in compliance with the License.\n- * You may obtain a copy of the License at:\n- *\n- *     http://www.apache.org/licenses/LICENSE-2.0\n- *\n- * Unless required by applicable law or agreed to in writing, software\n- * distributed under the License is distributed on an \"AS IS\" BASIS,\n- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n- * See the License for the specific language governing permissions and\n- * limitations under the License. */\n-\n-#include <config.h>\n-\n-#include \"compiler.h\"\n-#include \"ovs-router.h\"\n-#include \"route-table.h\"\n-\n-bool\n-route_table_fallback_lookup(const struct in6_addr *ip6_dst OVS_UNUSED,\n-                            char name[] OVS_UNUSED,\n-                            struct in6_addr *gw6)\n-{\n-    *gw6 = in6addr_any;\n-    return false;\n-}\n-\n-uint64_t\n-route_table_get_change_seq(void)\n-{\n-    return 0;\n-}\n-\n-void\n-route_table_init(void)\n-{\n-    ovs_router_init();\n-}\n-\n-void\n-route_table_run(void)\n-{\n-}\n-\n-void\n-route_table_wait(void)\n-{\n-}\ndiff --git a/lib/service-syn.man b/lib/service-syn.man\ndeleted file mode 100644\nindex d029f22e8..000000000\n--- a/lib/service-syn.man\n+++ /dev/null\n@@ -1,3 +0,0 @@\n-.IP \"Service options:\"\n-[\\fB\\-\\-service\\fR]\n-[\\fB\\-\\-service\\-monitor\\fR]\ndiff --git a/lib/service.man b/lib/service.man\ndeleted file mode 100644\nindex df36af937..000000000\n--- a/lib/service.man\n+++ /dev/null\n@@ -1,12 +0,0 @@\n-The following options are valid only on Windows platform.\n-.TP\n-\\fB\\-\\-service\\fR\n-Causes \\fB\\*(PN\\fR to run as a service in the background. The service\n-should already have been created through external tools like \\fBSC.exe\\fR.\n-.\n-.TP\n-\\fB\\-\\-service\\-monitor\\fR\n-Causes the \\fB\\*(PN\\fR service to be automatically restarted by the Windows\n-services manager if the service dies or exits for unexpected reasons.\n-.IP\n-When \\fB\\-\\-service\\fR is not specified, this option has no effect.\ndiff --git a/lib/sflow.h b/lib/sflow.h\nindex 95bedd968..5f4580cb7 100644\n--- a/lib/sflow.h\n+++ b/lib/sflow.h\n@@ -8,10 +8,6 @@\n #ifndef SFLOW_H\n #define SFLOW_H 1\n \n-#ifdef _WIN32\n-#include \"windefs.h\"\n-#endif\n-\n #include \"openvswitch/types.h\"\n \n typedef enum {\ndiff --git a/lib/socket-util.c b/lib/socket-util.c\nindex c569b7d16..6afd01ed6 100644\n--- a/lib/socket-util.c\n+++ b/lib/socket-util.c\n@@ -70,7 +70,6 @@ static bool parse_sockaddr_components(struct sockaddr_storage *ss,\n int\n set_nonblocking(int fd)\n {\n-#ifndef _WIN32\n     int flags = fcntl(fd, F_GETFL, 0);\n     if (flags != -1) {\n         if (fcntl(fd, F_SETFL, flags | O_NONBLOCK) != -1) {\n@@ -83,15 +82,6 @@ set_nonblocking(int fd)\n         VLOG_ERR(\"fcntl(F_GETFL) failed: %s\", ovs_strerror(errno));\n         return errno;\n     }\n-#else\n-    unsigned long arg = 1;\n-    if (ioctlsocket(fd, FIONBIO, &arg)) {\n-        int error = sock_errno();\n-        VLOG_ERR(\"set_nonblocking failed: %s\", sock_strerror(error));\n-        return error;\n-    }\n-    return 0;\n-#endif\n }\n \n void\n@@ -124,11 +114,6 @@ set_dscp(int fd, int family, uint8_t dscp)\n     int retval;\n     int val;\n \n-#ifdef _WIN32\n-    /* XXX: Consider using QoS2 APIs for Windows to set dscp. */\n-    return 0;\n-#endif\n-\n     if (dscp > 63) {\n         return EINVAL;\n     }\n@@ -262,29 +247,10 @@ check_connection_completion(int fd)\n     pfd.fd = fd;\n     pfd.events = POLLOUT;\n \n-#ifndef _WIN32\n     do {\n         retval = poll(&pfd, 1, 0);\n     } while (retval < 0 && errno == EINTR);\n-#else\n-    fd_set wrset, exset;\n-    FD_ZERO(&wrset);\n-    FD_ZERO(&exset);\n-    FD_SET(fd, &exset);\n-    FD_SET(fd, &wrset);\n-    pfd.revents = 0;\n-    struct timeval tv = { 0, 0 };\n-    /* WSAPoll is broken on Windows, instead do a select */\n-    retval = select(0, NULL, &wrset, &exset, &tv);\n-    if (retval == 1) {\n-        if (FD_ISSET(fd, &wrset)) {\n-            pfd.revents |= pfd.events;\n-        }\n-        if (FD_ISSET(fd, &exset)) {\n-            pfd.revents |= POLLERR;\n-        }\n-    }\n-#endif\n+\n     if (retval == 1) {\n         if (pfd.revents & (POLLERR | POLLHUP)) {\n             ssize_t n = send(fd, \"\", 1, 0);\n@@ -624,11 +590,7 @@ inet_open_active(int style, const char *target, int default_port,\n     error = connect(fd, (struct sockaddr *) &ss, ss_length(&ss)) == 0\n                     ? 0\n                     : sock_errno();\n-    if (error == EINPROGRESS\n-#ifdef _WIN32\n-        || error == WSAEALREADY || error == WSAEWOULDBLOCK\n-#endif\n-        ) {\n+    if (error == EINPROGRESS) {\n         error = EAGAIN;\n     }\n \n@@ -869,7 +831,6 @@ int\n fsync_parent_dir(const char *file_name)\n {\n     int error = 0;\n-#ifndef _WIN32\n     char *dir;\n     int fd;\n \n@@ -891,7 +852,6 @@ fsync_parent_dir(const char *file_name)\n         VLOG_ERR(\"%s: open failed (%s)\", dir, ovs_strerror(error));\n     }\n     free(dir);\n-#endif\n \n     return error;\n }\n@@ -958,7 +918,6 @@ describe_sockaddr(struct ds *string, int fd,\n         if (ss.ss_family == AF_INET || ss.ss_family == AF_INET6) {\n             ss_format_address(&ss, string);\n             ds_put_format(string, \":%\"PRIu16, ss_get_port(&ss));\n-#ifndef _WIN32\n         } else if (ss.ss_family == AF_UNIX) {\n             struct sockaddr_un sun;\n             const char *null;\n@@ -969,7 +928,6 @@ describe_sockaddr(struct ds *string, int fd,\n             null = memchr(sun.sun_path, '\\0', maxlen);\n             ds_put_buffer(string, sun.sun_path,\n                           null ? null - sun.sun_path : maxlen);\n-#endif\n         }\n #ifdef HAVE_NETLINK\n         else if (ss.ss_family == AF_NETLINK) {\n@@ -1060,7 +1018,6 @@ describe_fd(int fd)\n     struct stat s;\n \n     ds_init(&string);\n-#ifndef _WIN32\n     if (fstat(fd, &s)) {\n         ds_put_format(&string, \"fstat failed (%s)\", ovs_strerror(errno));\n     } else if (S_ISSOCK(s.st_mode)) {\n@@ -1080,9 +1037,6 @@ describe_fd(int fd)\n         put_fd_filename(&string, fd);\n #endif\n     }\n-#else\n-    ds_put_format(&string,\"file descriptor\");\n-#endif /* _WIN32 */\n     return ds_steal_cstr(&string);\n }\n \f\n@@ -1254,20 +1208,10 @@ ss_length(const struct sockaddr_storage *ss)\n     return sa_length(sa_cast(ss));\n }\n \f\n-/* For Windows socket calls, 'errno' is not set.  One has to call\n- * WSAGetLastError() to get the error number and then pass it to\n- * this function to get the correct error string.\n- *\n- * ovs_strerror() calls strerror_r() and would not get the correct error\n- * string for Windows sockets, but is good for POSIX. */\n const char *\n sock_strerror(int error)\n {\n-#ifdef _WIN32\n-    return ovs_format_message(error);\n-#else\n     return ovs_strerror(error);\n-#endif\n }\n \f\n #ifdef __linux__\ndiff --git a/lib/socket-util.h b/lib/socket-util.h\nindex 4eec627e3..2ed5dc370 100644\n--- a/lib/socket-util.h\n+++ b/lib/socket-util.h\n@@ -96,7 +96,6 @@ size_t ss_length(const struct sockaddr_storage *);\n \n const char *sock_strerror(int error);\n \n-#ifndef _WIN32\n void xpipe(int fds[2]);\n void xpipe_nonblocking(int fds[2]);\n \n@@ -144,43 +143,10 @@ int af_inet_ifreq_ioctl(const char *name, struct ifreq *,\n                         unsigned long int cmd, const char *cmd_name);\n \n #define closesocket close\n-#endif\n-\n-#ifdef _WIN32\n-static inline int make_unix_socket(int style, bool nonblock,\n-                                   const char *bind_path,\n-                                   const char *connect_path)\n-{\n-    return -EINVAL;\n-}\n-\n-/* Windows defines the 'optval' argument as char * instead of void *. */\n-#define setsockopt(sock, level, optname, optval, optlen) \\\n-    rpl_setsockopt(sock, level, optname, optval, optlen)\n-static inline int rpl_setsockopt(int sock, int level, int optname,\n-                                 const void *optval, socklen_t optlen)\n-{\n-    return (setsockopt)(sock, level, optname, (const char *)optval, optlen);\n-}\n \n-#define getsockopt(sock, level, optname, optval, optlen) \\\n-    rpl_getsockopt(sock, level, optname, optval, optlen)\n-static inline int rpl_getsockopt(int sock, int level, int optname,\n-                                 void *optval, socklen_t *optlen)\n-{\n-    return (getsockopt)(sock, level, optname, (char *)optval, optlen);\n-}\n-#endif\n-\n-/* In Windows platform, errno is not set for socket calls.\n- * The last error has to be gotten from WSAGetLastError(). */\n static inline int sock_errno(void)\n {\n-#ifdef _WIN32\n-    return WSAGetLastError();\n-#else\n     return errno;\n-#endif\n }\n \n #endif /* socket-util.h */\ndiff --git a/lib/stdio.c b/lib/stdio.c\ndeleted file mode 100644\nindex 5c5c92466..000000000\n--- a/lib/stdio.c\n+++ /dev/null\n@@ -1,60 +0,0 @@\n-/*\n- * Copyright (c) 2013 Nicira, Inc.\n- *\n- * Licensed under the Apache License, Version 2.0 (the \"License\");\n- * you may not use this file except in compliance with the License.\n- * You may obtain a copy of the License at:\n- *\n- *     http://www.apache.org/licenses/LICENSE-2.0\n- *\n- * Unless required by applicable law or agreed to in writing, software\n- * distributed under the License is distributed on an \"AS IS\" BASIS,\n- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n- * See the License for the specific language governing permissions and\n- * limitations under the License.\n- */\n-\n-#include <config.h>\n-\n-#include <stdio.h>\n-#include <sys/types.h>\n-\n-#ifdef _WIN32\n-#undef snprintf\n-#undef vsnprintf\n-\n-int\n-ovs_snprintf(char *s, size_t n, const char *format, ... )\n-{\n-    va_list args;\n-    int len;\n-\n-    va_start(args, format);\n-    len = ovs_vsnprintf(s, n, format, args);\n-    va_end(args);\n-\n-    return len;\n-}\n-\n-int\n-ovs_vsnprintf(char *s, size_t n, const char *format, va_list args)\n-{\n-    int needed = _vscprintf(format, args);\n-    if (s && n) {\n-        vsnprintf(s, n, format, args);\n-        s[n - 1] = '\\0';\n-    }\n-    return needed;\n-}\n-\n-int\n-fseeko(FILE *stream, off_t offset, int whence)\n-{\n-    int error;\n-    error = _fseeki64(stream, offset, whence);\n-    if (error) {\n-        return -1;\n-    }\n-    return error;\n-}\n-#endif  /* _WIN32 */\ndiff --git a/lib/stdio.h.in b/lib/stdio.h.in\ndeleted file mode 100644\nindex 7adb9ed2a..000000000\n--- a/lib/stdio.h.in\n+++ /dev/null\n@@ -1,46 +0,0 @@\n-/*\n- * Copyright (c) 2013 Nicira, Inc.\n- *\n- * Licensed under the Apache License, Version 2.0 (the \"License\");\n- * you may not use this file except in compliance with the License.\n- * You may obtain a copy of the License at:\n- *\n- *     http://www.apache.org/licenses/LICENSE-2.0\n- *\n- * Unless required by applicable law or agreed to in writing, software\n- * distributed under the License is distributed on an \"AS IS\" BASIS,\n- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n- * See the License for the specific language governing permissions and\n- * limitations under the License.\n- */\n-\n-#@INCLUDE_NEXT@ @NEXT_STDIO_H@\n-\n-#if !defined STDIO_H_WRAPPER\n-#define STDIO_H_WRAPPER 1\n-\n-#ifdef _WIN32\n-\n-#include <stdarg.h>\n-#include <stddef.h>\n-#include <sys/types.h>\n-\n-/* Windows libc has defective snprintf() and vsnprintf():\n- *\n- *     - They return -1 if the output won't fit.\n- *\n- *     - They don't null-terminate the output if it won't fit.\n- *\n- * We need working versions so here we define substitutes. */\n-#undef snprintf\n-#define snprintf ovs_snprintf\n-int ovs_snprintf(char *, size_t, const char *, ...);\n-\n-#undef vsnprintf\n-#define vsnprintf ovs_vsnprintf\n-int ovs_vsnprintf(char *, size_t, const char *, va_list);\n-\n-int fseeko(FILE *stream, off_t offset, int whence);\n-#endif /* _WIN32 */\n-\n-#endif /* stdio.h wrapper */\ndiff --git a/lib/stream-fd.c b/lib/stream-fd.c\nindex 46ee7ae27..1b1b4c85e 100644\n--- a/lib/stream-fd.c\n+++ b/lib/stream-fd.c\n@@ -107,11 +107,6 @@ fd_recv(struct stream *stream, void *buffer, size_t n)\n     retval = recv(s->fd, buffer, n, 0);\n     if (retval < 0) {\n         error = sock_errno();\n-#ifdef _WIN32\n-        if (error == WSAEWOULDBLOCK) {\n-           error = EAGAIN;\n-        }\n-#endif\n         if (error != EAGAIN) {\n             VLOG_DBG_RL(&rl, \"recv: %s\", sock_strerror(error));\n         }\n@@ -130,11 +125,6 @@ fd_send(struct stream *stream, const void *buffer, size_t n)\n     retval = send(s->fd, buffer, n, 0);\n     if (retval < 0) {\n         error = sock_errno();\n-#ifdef _WIN32\n-        if (error == WSAEWOULDBLOCK) {\n-           error = EAGAIN;\n-        }\n-#endif\n         if (error != EAGAIN) {\n             VLOG_DBG_RL(&rl, \"send: %s\", sock_strerror(error));\n         }\n@@ -247,11 +237,6 @@ pfd_accept(struct pstream *pstream, struct stream **new_streamp)\n     new_fd = accept(ps->fd, (struct sockaddr *) &ss, &ss_len);\n     if (new_fd < 0) {\n         retval = sock_errno();\n-#ifdef _WIN32\n-        if (retval == WSAEWOULDBLOCK) {\n-            retval = EAGAIN;\n-        }\n-#endif\n         if (retval != EAGAIN) {\n             VLOG_DBG_RL(&rl, \"accept: %s\", sock_strerror(retval));\n         }\ndiff --git a/lib/stream-fd.h b/lib/stream-fd.h\nindex 24639900b..7b30171d6 100644\n--- a/lib/stream-fd.h\n+++ b/lib/stream-fd.h\n@@ -12,9 +12,6 @@\n  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  * See the License for the specific language governing permissions and\n  * limitations under the License.\n- *\n- * Note on windows platform, stream fd can only handle sockets, on unix any\n- * fd is acceptable.\n  */\n \n #ifndef STREAM_FD_H\ndiff --git a/lib/stream-provider.h b/lib/stream-provider.h\nindex ddd468b09..b76c4e347 100644\n--- a/lib/stream-provider.h\n+++ b/lib/stream-provider.h\n@@ -192,14 +192,9 @@ struct pstream_class {\n /* Active and passive stream classes. */\n extern const struct stream_class tcp_stream_class;\n extern const struct pstream_class ptcp_pstream_class;\n-#ifndef _WIN32\n extern const struct stream_class unix_stream_class;\n extern const struct pstream_class punix_pstream_class;\n extern const struct pstream_class pfd_pstream_class;\n-#else\n-extern const struct stream_class windows_stream_class;\n-extern const struct pstream_class pwindows_pstream_class;\n-#endif\n #ifdef HAVE_OPENSSL\n extern const struct stream_class ssl_stream_class;\n extern const struct pstream_class pssl_pstream_class;\ndiff --git a/lib/stream-ssl.c b/lib/stream-ssl.c\nindex 9b468e0fa..e89774a5a 100644\n--- a/lib/stream-ssl.c\n+++ b/lib/stream-ssl.c\n@@ -49,21 +49,6 @@\n #include \"timeval.h\"\n #include \"openvswitch/vlog.h\"\n \n-#ifdef _WIN32\n-/* Ref: https://www.openssl.org/support/faq.html#PROG2\n- * Your application must link against the same version of the Win32 C-Runtime\n- * against which your openssl libraries were linked.  The default version for\n- * OpenSSL is /MD - \"Multithreaded DLL\". If we compile Open vSwitch with\n- * something other than /MD, instead of re-compiling OpenSSL\n- * toolkit, openssl/applink.c can be #included. Also, it is important\n- * to add CRYPTO_malloc_init prior first call to OpenSSL.\n- *\n- * XXX: The behavior of the following #include when Open vSwitch is\n- * compiled with /MD is not tested. */\n-#include <openssl/applink.c>\n-#define SHUT_RDWR SD_BOTH\n-#endif\n-\n VLOG_DEFINE_THIS_MODULE(stream_ssl);\n \n /* Active SSL/TLS. */\n@@ -272,12 +257,8 @@ new_ssl_stream(char *name, char *server_name, int fd, enum session_type type,\n         goto error;\n     }\n \n-    /* Disable Nagle.\n-     * On windows platforms, this can only be called upon TCP connected.\n-     */\n-    if (state == STATE_SSL_CONNECTING) {\n-        setsockopt_tcp_nodelay(fd);\n-    }\n+    /* Disable Nagle. */\n+    setsockopt_tcp_nodelay(fd);\n \n     /* Create and configure OpenSSL stream. */\n     ssl = SSL_new(ctx);\n@@ -948,11 +929,6 @@ pssl_accept(struct pstream *pstream, struct stream **new_streamp)\n     new_fd = accept(pssl->fd, (struct sockaddr *) &ss, &ss_len);\n     if (new_fd < 0) {\n         error = sock_errno();\n-#ifdef _WIN32\n-        if (error == WSAEWOULDBLOCK) {\n-            error = EAGAIN;\n-        }\n-#endif\n         if (error != EAGAIN) {\n             VLOG_DBG_RL(&rl, \"accept: %s\", sock_strerror(error));\n         }\ndiff --git a/lib/stream-windows.c b/lib/stream-windows.c\ndeleted file mode 100644\nindex 5c4c55e5d..000000000\n--- a/lib/stream-windows.c\n+++ /dev/null\n@@ -1,704 +0,0 @@\n-/*\n- * Copyright (c) 2016, 2017 Cloudbase Solutions Srl\n- *\n- * Licensed under the Apache License, Version 2.0 (the \"License\");\n- * you may not use this file except in compliance with the License.\n- * You may obtain a copy of the License at\n- *\n- *     http://www.apache.org/licenses/LICENSE-2.0\n- *\n- * Unless required by applicable law or agreed to in writing, software\n- * distributed under the License is distributed on an \"AS IS\" BASIS,\n- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n- * See the License for the specific language governing permissions and\n- * limitations under the License.\n- */\n-\n-#include <config.h>\n-#include <errno.h>\n-#include <sys/types.h>\n-#include <stdlib.h>\n-#include <string.h>\n-#include <unistd.h>\n-#include \"openvswitch/poll-loop.h\"\n-#include \"dirs.h\"\n-#include \"fatal-signal.h\"\n-#include \"util.h\"\n-#include \"stream-provider.h\"\n-#include \"openvswitch/vlog.h\"\n-\n-VLOG_DEFINE_THIS_MODULE(stream_windows);\n-\n-static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(10, 25);\n-\n-static void maybe_unlink_and_free(char *path);\n-\n-/* Suggested buffer size at the creation of the named pipe for reading and\n- * and writing operations. */\n-#define BUFSIZE 65000\n-\n-/* Default prefix of a local named pipe. */\n-#define LOCAL_PREFIX \"\\\\\\\\.\\\\pipe\\\\\"\n-\n-/* Size of the allowed PSIDs for securing Named Pipe. */\n-#define ALLOWED_PSIDS_SIZE 3\n-\n-/* This function has the purpose to remove all the slashes received in s. */\n-static char *\n-remove_slashes(char *s)\n-{\n-    char *p1, *p2;\n-    p1 = p2 = s;\n-\n-    while (*p1) {\n-        if ((*p1) == '\\\\' || (*p1) == '/') {\n-            p1++;\n-        } else {\n-            *p2 = *p1;\n-            p2++;\n-            p1++;\n-        }\n-    }\n-    *p2 = '\\0';\n-    return s;\n-}\n-\n-/* Active named pipe. */\n-struct windows_stream\n-{\n-    struct stream stream;\n-    HANDLE fd;\n-    /* Overlapped operations used for reading/writing. */\n-    OVERLAPPED read;\n-    OVERLAPPED write;\n-    /* Flag to check if a reading/writing operation is pending. */\n-    bool read_pending;\n-    bool write_pending;\n-    /* Flag to check if fd is a server HANDLE.  In the case of a server handle\n-     * we have to issue a disconnect before closing the actual handle. */\n-    bool server;\n-    bool retry_connect;\n-    char *pipe_path;\n-};\n-\n-static struct windows_stream *\n-stream_windows_cast(struct stream *stream)\n-{\n-    stream_assert_class(stream, &windows_stream_class);\n-    return CONTAINER_OF(stream, struct windows_stream, stream);\n-}\n-\n-static HANDLE\n-create_snpipe(char *path)\n-{\n-    return CreateFile(path, GENERIC_READ | GENERIC_WRITE, 0, NULL,\n-                      OPEN_EXISTING,\n-                      FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED |\n-                      FILE_FLAG_NO_BUFFERING,\n-                      NULL);\n-}\n-\n-/* Active named pipe open. */\n-static int\n-windows_open(const char *name, char *suffix, struct stream **streamp,\n-             uint8_t dscp OVS_UNUSED)\n-{\n-    char *connect_path;\n-    HANDLE npipe;\n-    DWORD mode = PIPE_READMODE_BYTE;\n-    char *path;\n-    FILE *file;\n-    bool retry = false;\n-    /* If the path does not contain a ':', assume it is relative to\n-     * OVS_RUNDIR. */\n-    if (!strchr(suffix, ':')) {\n-        path = xasprintf(\"%s/%s\", ovs_rundir(), suffix);\n-    } else {\n-        path = xstrdup(suffix);\n-    }\n-\n-    /* In case of \"unix:\" argument, the assumption is that there is a file\n-     * created in the path (name). */\n-    file = fopen(path, \"r\");\n-    if (!file) {\n-        free(path);\n-        VLOG_DBG_RL(&rl, \"%s: could not open %s (%s)\", name, suffix,\n-                    ovs_strerror(errno));\n-        return ENOENT;\n-    } else {\n-        fclose(file);\n-    }\n-\n-    /* Valid pipe names do not have slashes.  The assumption is that the named\n-     * pipe was created with the name \"path\", with slashes removed and the\n-     * default prefix \\\\.\\pipe\\ appended.\n-     * Strip the slashes from the parameter name and append the default prefix.\n-     */\n-    connect_path = xasprintf(\"%s%s\", LOCAL_PREFIX, remove_slashes(path));\n-    free(path);\n-\n-    /* Try to connect to the named pipe.  In case all pipe instances are\n-     * busy we set the retry flag to true and retry again during the\n-     * connect function.  Use overlapped flag and file no buffering to ensure\n-     * asynchronous operations. */\n-    npipe = create_snpipe(connect_path);\n-\n-    if (npipe == INVALID_HANDLE_VALUE && GetLastError() == ERROR_PIPE_BUSY) {\n-        retry = true;\n-    }\n-\n-    if (!retry && npipe == INVALID_HANDLE_VALUE) {\n-        VLOG_ERR_RL(&rl, \"Could not connect to named pipe: %s\",\n-                    ovs_lasterror_to_string());\n-        free(connect_path);\n-        return ENOENT;\n-    }\n-    if (!retry && !SetNamedPipeHandleState(npipe, &mode, NULL, NULL)) {\n-        VLOG_ERR_RL(&rl, \"Could not set named pipe options: %s\",\n-                    ovs_lasterror_to_string());\n-        free(connect_path);\n-        CloseHandle(npipe);\n-        return ENOENT;\n-    }\n-    struct windows_stream *s = xmalloc(sizeof *s);\n-    stream_init(&s->stream, &windows_stream_class, 0, xstrdup(name));\n-    s->pipe_path = connect_path;\n-    s->fd = npipe;\n-    /* This is an active stream. */\n-    s->server = false;\n-    /* Create events for reading and writing to be signaled later. */\n-    memset(&s->read, 0, sizeof(s->read));\n-    memset(&s->write, 0, sizeof(s->write));\n-    s->read.hEvent = CreateEvent(NULL, TRUE, TRUE, NULL);\n-    s->write.hEvent = CreateEvent(NULL, TRUE, TRUE, NULL);\n-    /* Initial read and write operations are not pending. */\n-    s->read_pending = false;\n-    s->write_pending = false;\n-    s->retry_connect = retry;\n-    *streamp = &s->stream;\n-    return 0;\n-}\n-\n-/* Active named pipe close. */\n-static void\n-windows_close(struct stream *stream)\n-{\n-    struct windows_stream *s = stream_windows_cast(stream);\n-    /* Disconnect the named pipe in case it was created from a passive stream.\n-     */\n-    if (s->server) {\n-        /* Flush the pipe to allow the client to read the pipe's contents\n-         * before disconnecting. */\n-        FlushFileBuffers(s->fd);\n-        DisconnectNamedPipe(s->fd);\n-    }\n-    CloseHandle(s->fd);\n-    CloseHandle(s->read.hEvent);\n-    CloseHandle(s->write.hEvent);\n-    if (s->pipe_path) {\n-        free(s->pipe_path);\n-    }\n-    free(s);\n-}\n-\n-/* Active named pipe connect. */\n-static int\n-windows_connect(struct stream *stream)\n-{\n-    struct windows_stream *s = stream_windows_cast(stream);\n-\n-    if (!s->retry_connect) {\n-        return 0;\n-    } else {\n-        HANDLE npipe;\n-        npipe = create_snpipe(s->pipe_path);\n-        if (npipe == INVALID_HANDLE_VALUE) {\n-            if (GetLastError() == ERROR_PIPE_BUSY) {\n-                return EAGAIN;\n-            } else {\n-                s->retry_connect = false;\n-                return ENOENT;\n-            }\n-        }\n-        s->retry_connect = false;\n-        s->fd = npipe;\n-        return 0;\n-    }\n-}\n-\n-/* Active named pipe receive. */\n-static ssize_t\n-windows_recv(struct stream *stream, void *buffer, size_t n)\n-{\n-    struct windows_stream *s = stream_windows_cast(stream);\n-    ssize_t retval = 0;\n-    boolean result = false;\n-    DWORD last_error = 0;\n-    LPOVERLAPPED  ov = NULL;\n-    ov = &s->read;\n-\n-    /* If the read operation was pending, we verify its result. */\n-    if (s->read_pending) {\n-        if (!GetOverlappedResult(s->fd, ov, &(DWORD)retval, FALSE)) {\n-            last_error = GetLastError();\n-            if (last_error == ERROR_IO_INCOMPLETE) {\n-                /* If the operation is still pending, retry again. */\n-                s->read_pending = true;\n-                return -EAGAIN;\n-            } else if (last_error == ERROR_PIPE_NOT_CONNECTED\n-                       || last_error == ERROR_BAD_PIPE\n-                       || last_error == ERROR_NO_DATA\n-                       || last_error == ERROR_BROKEN_PIPE) {\n-                /* If the pipe was disconnected, return 0. */\n-                return 0;\n-            } else {\n-                VLOG_ERR_RL(&rl, \"Could not receive data on named pipe. Last \"\n-                            \"error: %s\", ovs_lasterror_to_string());\n-                return -EINVAL;\n-            }\n-        }\n-        s->read_pending = false;\n-        return retval;\n-    }\n-\n-    result = ReadFile(s->fd, buffer, n, &(DWORD)retval, ov);\n-\n-    if (!result && GetLastError() == ERROR_IO_PENDING) {\n-        /* Mark the read operation as pending. */\n-        s->read_pending = true;\n-        return -EAGAIN;\n-    } else if (!result) {\n-        last_error = GetLastError();\n-        if (last_error == ERROR_PIPE_NOT_CONNECTED\n-            || last_error == ERROR_BAD_PIPE\n-            || last_error == ERROR_NO_DATA\n-            || last_error == ERROR_BROKEN_PIPE) {\n-            /* If the pipe was disconnected, return 0. */\n-            return 0;\n-        }\n-        VLOG_ERR_RL(&rl, \"Could not receive data synchronous on named pipe.\"\n-                    \"Last error: %s\", ovs_lasterror_to_string());\n-        return -EINVAL;\n-    }\n-\n-    return retval;\n-}\n-\n-/* Active named pipe send. */\n-static ssize_t\n-windows_send(struct stream *stream, const void *buffer, size_t n)\n-{\n-    struct windows_stream *s = stream_windows_cast(stream);\n-    ssize_t retval = 0;\n-    boolean result = false;\n-    DWORD last_error = 0;\n-    LPOVERLAPPED  ov = NULL;\n-    ov = &s->write;\n-\n-    /* If the send operation was pending, we verify the result. */\n-    if (s->write_pending) {\n-        if (!GetOverlappedResult(s->fd, ov, &(DWORD)retval, FALSE)) {\n-            last_error = GetLastError();\n-            if (last_error == ERROR_IO_INCOMPLETE) {\n-                /* If the operation is still pending, retry again. */\n-                s->write_pending = true;\n-                return -EAGAIN;\n-            } else if (last_error == ERROR_PIPE_NOT_CONNECTED\n-                       || last_error == ERROR_BAD_PIPE\n-                       || last_error == ERROR_NO_DATA\n-                       || last_error == ERROR_BROKEN_PIPE) {\n-                /* If the pipe was disconnected, return connection reset. */\n-                return -EPIPE;\n-            } else {\n-                VLOG_ERR_RL(&rl, \"Could not send data on named pipe. Last \"\n-                            \"error: %s\", ovs_lasterror_to_string());\n-                return -EINVAL;\n-            }\n-        }\n-        s->write_pending = false;\n-        return retval;\n-    }\n-\n-    result = WriteFile(s->fd, buffer, n, &(DWORD)retval, ov);\n-    last_error = GetLastError();\n-    if (!result && last_error == ERROR_IO_PENDING) {\n-        /* Mark the send operation as pending. */\n-        s->write_pending = true;\n-        return -EAGAIN;\n-    } else if (!result && (last_error == ERROR_PIPE_NOT_CONNECTED\n-                           || last_error == ERROR_BAD_PIPE\n-                           || last_error == ERROR_NO_DATA\n-                           || last_error == ERROR_BROKEN_PIPE)) {\n-        /* If the pipe was disconnected, return connection reset. */\n-        return -EPIPE;\n-    } else if (!result) {\n-        VLOG_ERR_RL(&rl, \"Could not send data on synchronous named pipe. Last \"\n-                    \"error: %s\", ovs_lasterror_to_string());\n-        return -EINVAL;\n-    }\n-    return (retval > 0 ? retval : -EAGAIN);\n-}\n-\n-/* Active named pipe wait. */\n-static void\n-windows_wait(struct stream *stream, enum stream_wait_type wait)\n-{\n-    struct windows_stream *s = stream_windows_cast(stream);\n-    switch (wait) {\n-    case STREAM_SEND:\n-        poll_wevent_wait(s->write.hEvent);\n-        break;\n-\n-    case STREAM_CONNECT:\n-        poll_immediate_wake();\n-        break;\n-\n-    case STREAM_RECV:\n-        poll_wevent_wait(s->read.hEvent);\n-        break;\n-\n-    default:\n-        OVS_NOT_REACHED();\n-    }\n-}\n-\n-/* Passive named pipe. */\n-const struct stream_class windows_stream_class = {\n-    \"unix\",                     /* name */\n-    false,                      /* needs_probes */\n-    windows_open,               /* open */\n-    windows_close,              /* close */\n-    windows_connect,            /* connect */\n-    windows_recv,               /* recv */\n-    windows_send,               /* send */\n-    NULL,                       /* run */\n-    NULL,                       /* run_wait */\n-    windows_wait,               /* wait */\n-};\n-\n-struct pwindows_pstream\n-{\n-    struct pstream pstream;\n-    HANDLE fd;\n-    /* Unlink path to be deleted during close. */\n-    char *unlink_path;\n-    /* Overlapped operation used for connect. */\n-    OVERLAPPED connect;\n-    /* Flag to check if an operation is pending. */\n-    bool pending;\n-    /* String used to create the named pipe. */\n-    char *pipe_path;\n-};\n-\n-const struct pstream_class pwindows_pstream_class;\n-\n-static struct pwindows_pstream *\n-pwindows_pstream_cast(struct pstream *pstream)\n-{\n-    pstream_assert_class(pstream, &pwindows_pstream_class);\n-    return CONTAINER_OF(pstream, struct pwindows_pstream, pstream);\n-}\n-\n-/* Create a named pipe with read/write access, overlapped, message mode for\n- * writing, byte mode for reading and with a maximum of 64 active instances. */\n-static HANDLE\n-create_pnpipe(char *name)\n-{\n-    SECURITY_ATTRIBUTES sa;\n-    SID_IDENTIFIER_AUTHORITY sia = SECURITY_NT_AUTHORITY;\n-    DWORD aclSize;\n-    PSID allowedPsid[ALLOWED_PSIDS_SIZE];\n-    PSID remoteAccessSid;\n-    PACL acl = NULL;\n-    PSECURITY_DESCRIPTOR psd = NULL;\n-    HANDLE npipe;\n-    HANDLE hToken = NULL;\n-    DWORD dwBufSize = 0;\n-    PTOKEN_USER pTokenUsr = NULL;\n-\n-    /* Disable access over network. */\n-    if (!AllocateAndInitializeSid(&sia, 1, SECURITY_NETWORK_RID,\n-                                  0, 0, 0, 0, 0, 0, 0, &remoteAccessSid)) {\n-        VLOG_ERR_RL(&rl, \"Error creating Remote Access SID.\");\n-        goto handle_error;\n-    }\n-\n-    aclSize = sizeof(ACL) + sizeof(ACCESS_DENIED_ACE) +\n-              GetLengthSid(remoteAccessSid) - sizeof(DWORD);\n-\n-    /* Allow Windows Services to access the Named Pipe. */\n-    if (!AllocateAndInitializeSid(&sia, 1, SECURITY_LOCAL_SYSTEM_RID,\n-                                  0, 0, 0, 0, 0, 0, 0, &allowedPsid[0])) {\n-        VLOG_ERR_RL(&rl, \"Error creating Services SID.\");\n-        goto handle_error;\n-    }\n-\n-    /* Allow Administrators to access the Named Pipe. */\n-    if (!AllocateAndInitializeSid(&sia, 2, SECURITY_BUILTIN_DOMAIN_RID,\n-                                  DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0,\n-                                  &allowedPsid[1])) {\n-        VLOG_ERR_RL(&rl, \"Error creating Administrator SID.\");\n-        goto handle_error;\n-    }\n-\n-    /* Open the access token of calling process */\n-    if (!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &hToken)) {\n-        VLOG_ERR_RL(&rl, \"Error opening access token of calling process.\");\n-        goto handle_error;\n-    }\n-\n-    /* get the buffer size buffer needed for SID */\n-    GetTokenInformation(hToken, TokenUser, NULL, 0, &dwBufSize);\n-\n-    pTokenUsr = xmalloc(dwBufSize);\n-    memset(pTokenUsr, 0, dwBufSize);\n-\n-    /* Retrieve the token information in a TOKEN_USER structure. */\n-    if (!GetTokenInformation(hToken, TokenUser, pTokenUsr, dwBufSize,\n-        &dwBufSize)) {\n-        VLOG_ERR_RL(&rl, \"Error retrieving token information.\");\n-        goto handle_error;\n-    }\n-    CloseHandle(hToken);\n-\n-    if (!IsValidSid(pTokenUsr->User.Sid)) {\n-        VLOG_ERR_RL(&rl, \"Invalid SID.\");\n-        goto handle_error;\n-    }\n-    allowedPsid[2] = pTokenUsr->User.Sid;\n-\n-    for (int i = 0; i < ALLOWED_PSIDS_SIZE; i++) {\n-        aclSize += sizeof(ACCESS_ALLOWED_ACE) +\n-                   GetLengthSid(allowedPsid[i]) -\n-                   sizeof(DWORD);\n-    }\n-\n-    acl = xmalloc(aclSize);\n-    if (!InitializeAcl(acl, aclSize, ACL_REVISION)) {\n-        VLOG_ERR_RL(&rl, \"Error initializing ACL.\");\n-        goto handle_error;\n-    }\n-\n-    /* Add denied ACL. */\n-    if (!AddAccessDeniedAce(acl, ACL_REVISION,\n-                            GENERIC_ALL, remoteAccessSid)) {\n-        VLOG_ERR_RL(&rl, \"Error adding remote access ACE.\");\n-        goto handle_error;\n-    }\n-\n-    /* Add allowed ACLs. */\n-    for (int i = 0; i < ALLOWED_PSIDS_SIZE; i++) {\n-        if (!AddAccessAllowedAce(acl, ACL_REVISION,\n-                                 GENERIC_ALL, allowedPsid[i])) {\n-            VLOG_ERR_RL(&rl, \"Error adding ACE.\");\n-            goto handle_error;\n-        }\n-    }\n-\n-    psd = xmalloc(SECURITY_DESCRIPTOR_MIN_LENGTH);\n-    if (!InitializeSecurityDescriptor(psd, SECURITY_DESCRIPTOR_REVISION)) {\n-        VLOG_ERR_RL(&rl, \"Error initializing Security Descriptor.\");\n-        goto handle_error;\n-    }\n-\n-    /* Set DACL. */\n-    if (!SetSecurityDescriptorDacl(psd, TRUE, acl, FALSE)) {\n-        VLOG_ERR_RL(&rl, \"Error while setting DACL.\");\n-        goto handle_error;\n-    }\n-\n-    sa.nLength = sizeof sa;\n-    sa.bInheritHandle = TRUE;\n-    sa.lpSecurityDescriptor = psd;\n-\n-    if (strlen(name) > 256) {\n-        VLOG_ERR_RL(&rl, \"Named pipe name too long.\");\n-        goto handle_error;\n-    }\n-\n-    npipe = CreateNamedPipe(name, PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED,\n-                            PIPE_TYPE_MESSAGE | PIPE_READMODE_BYTE | PIPE_WAIT,\n-                            64, BUFSIZE, BUFSIZE, 0, &sa);\n-    free(pTokenUsr);\n-    free(acl);\n-    free(psd);\n-    return npipe;\n-\n-handle_error:\n-    free(pTokenUsr);\n-    free(acl);\n-    free(psd);\n-    return INVALID_HANDLE_VALUE;\n-}\n-\n-/* Passive named pipe connect.  This function creates a new named pipe and\n- * passes the old handle to the active stream. */\n-static int\n-pwindows_accept(struct pstream *pstream, struct stream **new_streamp)\n-{\n-    struct pwindows_pstream *p = pwindows_pstream_cast(pstream);\n-    DWORD last_error = 0;\n-    DWORD cbRet;\n-    HANDLE npipe;\n-\n-    /* If the connect operation was pending, verify the result. */\n-    if (p->pending) {\n-        if (!GetOverlappedResult(p->fd, &p->connect, &cbRet, FALSE)) {\n-            last_error = GetLastError();\n-            if (last_error == ERROR_IO_INCOMPLETE) {\n-                /* If the operation is still pending, retry again. */\n-                p->pending = true;\n-                return EAGAIN;\n-            } else {\n-                VLOG_ERR_RL(&rl, \"Could not connect named pipe. Last \"\n-                            \"error: %s\", ovs_lasterror_to_string());\n-                DisconnectNamedPipe(p->fd);\n-                return EINVAL;\n-            }\n-        }\n-        p->pending = false;\n-    }\n-\n-    if (!p->pending && !ConnectNamedPipe(p->fd, &p->connect)) {\n-        last_error = GetLastError();\n-        if (last_error == ERROR_IO_PENDING) {\n-            /* Mark the accept operation as pending. */\n-            p->pending = true;\n-            return EAGAIN;\n-        } else if (last_error != ERROR_PIPE_CONNECTED) {\n-            VLOG_ERR_RL(&rl, \"Could not connect synchronous named pipe. Last \"\n-                        \"error: %s\", ovs_lasterror_to_string());\n-            DisconnectNamedPipe(p->fd);\n-            return EINVAL;\n-        } else {\n-            /* If the pipe is connected, signal an event. */\n-            SetEvent(&p->connect.hEvent);\n-        }\n-    }\n-\n-    npipe = create_pnpipe(p->pipe_path);\n-    if (npipe == INVALID_HANDLE_VALUE) {\n-        VLOG_ERR_RL(&rl, \"Could not create a new named pipe after connect. \",\n-                    ovs_lasterror_to_string());\n-        return ENOENT;\n-    }\n-\n-    /* Give the handle p->fd to the new created active stream and specify it\n-     * was created by an active stream. */\n-    struct windows_stream *p_temp = xmalloc(sizeof *p_temp);\n-    stream_init(&p_temp->stream, &windows_stream_class, 0, xstrdup(\"unix\"));\n-    p_temp->fd = p->fd;\n-    /* Specify it was created by a passive stream. */\n-    p_temp->server = true;\n-    /* Create events for read/write operations. */\n-    memset(&p_temp->read, 0, sizeof(p_temp->read));\n-    memset(&p_temp->write, 0, sizeof(p_temp->write));\n-    p_temp->read.hEvent = CreateEvent(NULL, TRUE, TRUE, NULL);\n-    p_temp->write.hEvent = CreateEvent(NULL, TRUE, TRUE, NULL);\n-    p_temp->read_pending = false;\n-    p_temp->write_pending = false;\n-    p_temp->retry_connect = false;\n-    p_temp->pipe_path = NULL;\n-    *new_streamp = &p_temp->stream;\n-\n-    /* The passive handle p->fd will be the new created handle. */\n-    p->fd = npipe;\n-    memset(&p->connect, 0, sizeof(p->connect));\n-    p->connect.hEvent = CreateEvent(NULL, TRUE, TRUE, NULL);\n-    p->pending = false;\n-    return 0;\n-}\n-\n-/* Passive named pipe close. */\n-static void\n-pwindows_close(struct pstream *pstream)\n-{\n-    struct pwindows_pstream *p = pwindows_pstream_cast(pstream);\n-    DisconnectNamedPipe(p->fd);\n-    CloseHandle(p->fd);\n-    CloseHandle(p->connect.hEvent);\n-    maybe_unlink_and_free(p->unlink_path);\n-    free(p->pipe_path);\n-    free(p);\n-}\n-\n-/* Passive named pipe wait. */\n-static void\n-pwindows_wait(struct pstream *pstream)\n-{\n-    struct pwindows_pstream *p = pwindows_pstream_cast(pstream);\n-    poll_wevent_wait(p->connect.hEvent);\n-}\n-\n-/* Passive named pipe. */\n-static int\n-pwindows_open(const char *name OVS_UNUSED, char *suffix,\n-              struct pstream **pstreamp, uint8_t dscp OVS_UNUSED)\n-{\n-    char *bind_path;\n-    int error;\n-    HANDLE npipe;\n-    char *orig_path;\n-\n-    char *path;\n-    if (!strchr(suffix, ':')) {\n-        path = xasprintf(\"%s/%s\", ovs_rundir(), suffix);\n-    } else {\n-        path = xstrdup(suffix);\n-    }\n-\n-    /* Try to create a file under the path location. */\n-    FILE *file = fopen(path, \"w\");\n-    if (!file) {\n-        free(path);\n-        error = errno;\n-        VLOG_DBG_RL(&rl, \"could not open %s (%s)\", path, ovs_strerror(error));\n-        return error;\n-    } else {\n-        fclose(file);\n-    }\n-\n-    orig_path = xstrdup(path);\n-    /* Strip slashes from path and create a named pipe using that newly created\n-     * string. */\n-    bind_path = xasprintf(\"%s%s\", LOCAL_PREFIX, remove_slashes(path));\n-    free(path);\n-\n-    npipe = create_pnpipe(bind_path);\n-\n-    if (npipe == INVALID_HANDLE_VALUE) {\n-        VLOG_ERR_RL(&rl, \"Could not create named pipe. Last error: %s\",\n-                    ovs_lasterror_to_string());\n-        return ENOENT;\n-    }\n-\n-    struct pwindows_pstream *p = xmalloc(sizeof *p);\n-    pstream_init(&p->pstream, &pwindows_pstream_class, xstrdup(name));\n-    p->fd = npipe;\n-    p->unlink_path = orig_path;\n-    memset(&p->connect, 0, sizeof(p->connect));\n-    p->connect.hEvent = CreateEvent(NULL, TRUE, TRUE, NULL);\n-    p->pending = false;\n-    p->pipe_path = bind_path;\n-    *pstreamp = &p->pstream;\n-    return 0;\n-}\n-\n-const struct pstream_class pwindows_pstream_class = {\n-    \"punix\",\n-    false,                   /* probes */\n-    pwindows_open,           /* open */\n-    pwindows_close,          /* close */\n-    pwindows_accept,         /* accept */\n-    pwindows_wait,           /* wait */\n-};\n-\n-/* Helper functions. */\n-static void\n-maybe_unlink_and_free(char *path)\n-{\n-    if (path) {\n-        fatal_signal_unlink_file_now(path);\n-        free(path);\n-    }\n-}\ndiff --git a/lib/stream.c b/lib/stream.c\nindex b3b21588a..0d7e5261c 100644\n--- a/lib/stream.c\n+++ b/lib/stream.c\n@@ -55,11 +55,7 @@ enum stream_state {\n \n static const struct stream_class *stream_classes[] = {\n     &tcp_stream_class,\n-#ifndef _WIN32\n     &unix_stream_class,\n-#else\n-    &windows_stream_class,\n-#endif\n #ifdef HAVE_OPENSSL\n     &ssl_stream_class,\n #endif\n@@ -67,12 +63,8 @@ static const struct stream_class *stream_classes[] = {\n \n static const struct pstream_class *pstream_classes[] = {\n     &ptcp_pstream_class,\n-#ifndef _WIN32\n     &punix_pstream_class,\n     &pfd_pstream_class,\n-#else\n-    &pwindows_pstream_class,\n-#endif\n #ifdef HAVE_OPENSSL\n     &pssl_pstream_class,\n #endif\n@@ -148,10 +140,8 @@ stream_usage(const char *name, bool active, bool passive,\n #endif\n         printf(\"  punix:FILE              \"\n                \"listen on Unix domain socket FILE\\n\");\n-#ifndef _WIN32\n         printf(\"  pfd:FD                  \"\n                \"listen on pre-opened file descriptor FD\\n\");\n-#endif\n     }\n \n #ifdef HAVE_OPENSSL\ndiff --git a/lib/string.c b/lib/string.c\nindex e7e265bdf..42034b5e2 100644\n--- a/lib/string.c\n+++ b/lib/string.c\n@@ -28,19 +28,3 @@ strnlen(const char *s, size_t maxlen)\n     return end ? end - s : maxlen;\n }\n #endif\n-\n-#ifdef _WIN32\n-char *strcasestr(const char *str, const char *substr)\n-{\n-    do {\n-        for (size_t i = 0; ; i++) {\n-            if (!substr[i]) {\n-                return CONST_CAST(char *, str);\n-            } else if (tolower(substr[i]) != tolower(str[i])) {\n-                break;\n-            }\n-        }\n-    } while (*str++);\n-    return NULL;\n-}\n-#endif\ndiff --git a/lib/string.h.in b/lib/string.h.in\nindex 7a8e18f41..45716f25d 100644\n--- a/lib/string.h.in\n+++ b/lib/string.h.in\n@@ -31,14 +31,6 @@\n #undef strtok_r\n #endif\n \n-#ifdef _WIN32\n-#define strtok_r strtok_s\n-#define strcasecmp _stricmp\n-#define strncasecmp _strnicmp\n-#define strerror_r(errnum, buf, buflen) strerror_s(buf, buflen, errnum)\n-char *strcasestr(const char *, const char *);\n-#endif\n-\n #ifndef HAVE_STRNLEN\n #undef strnlen\n #define strnlen rpl_strnlen\ndiff --git a/lib/strsep.c b/lib/strsep.c\ndeleted file mode 100644\nindex 3ec7a2626..000000000\n--- a/lib/strsep.c\n+++ /dev/null\n@@ -1,73 +0,0 @@\n-/*-\n- * Copyright (c) 1990, 1993\n- *\tThe Regents of the University of California.  All rights reserved.\n- *\n- * Redistribution and use in source and binary forms, with or without\n- * modification, are permitted provided that the following conditions\n- * are met:\n- * 1. Redistributions of source code must retain the above copyright\n- *    notice, this list of conditions and the following disclaimer.\n- * 2. Redistributions in binary form must reproduce the above copyright\n- *    notice, this list of conditions and the following disclaimer in the\n- *    documentation and/or other materials provided with the distribution.\n- * 3. Neither the name of the University nor the names of its contributors\n- *    may be used to endorse or promote products derived from this software\n- *    without specific prior written permission.\n- *\n- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n- * SUCH DAMAGE.\n- */\n-\n-#include <config.h>\n-#include \"util.h\"\n-\n-/*\n- * Get next token from string *stringp, where tokens are possibly-empty\n- * strings separated by characters from delim.\n- *\n- * Writes NULs into the string at *stringp to end tokens.\n- * delim need not remain constant from call to call.\n- * On return, *stringp points past the last NUL written (if there might\n- * be further tokens), or is NULL (if there are definitely no more tokens).\n- *\n- * If *stringp is NULL, strsep returns NULL.\n- */\n-#define _DIAGASSERT(q) ovs_assert(q)\n-char *\n-strsep(char **stringp, const char *delim)\n-{\n-\tchar *s;\n-\tconst char *spanp;\n-\tint c, sc;\n-\tchar *tok;\n-\n-\t_DIAGASSERT(stringp != NULL);\n-\t_DIAGASSERT(delim != NULL);\n-\n-\tif ((s = *stringp) == NULL)\n-\t\treturn (NULL);\n-\tfor (tok = s;;) {\n-\t\tc = *s++;\n-\t\tspanp = delim;\n-\t\tdo {\n-\t\t\tif ((sc = *spanp++) == c) {\n-\t\t\t\tif (c == 0)\n-\t\t\t\t\ts = NULL;\n-\t\t\t\telse\n-\t\t\t\t\ts[-1] = 0;\n-\t\t\t\t*stringp = s;\n-\t\t\t\treturn (tok);\n-\t\t\t}\n-\t\t} while (sc != 0);\n-\t}\n-\t/* NOTREACHED */\n-}\ndiff --git a/lib/timeval.c b/lib/timeval.c\nindex 8258e89d9..e1fc35b27 100644\n--- a/lib/timeval.c\n+++ b/lib/timeval.c\n@@ -56,11 +56,6 @@ static int clock_gettime(clock_t id, struct timespec *ts);\n #endif\n #endif /* !defined(HAVE_CLOCK_GETTIME) */\n \n-#ifdef _WIN32\n-/* Number of 100 ns intervals from January 1, 1601 till January 1, 1970. */\n-const static unsigned long long unix_epoch = 116444736000000000;\n-#endif /* _WIN32 */\n-\n /* Structure set by unixctl time/warp command. */\n struct large_warp {\n     struct unixctl_conn *conn; /* Connection waiting for warp response. */\n@@ -326,37 +321,17 @@ time_poll(struct pollfd *pollfds, int n_pollfds, HANDLE *handles OVS_UNUSED,\n             }\n         }\n \n-#ifndef _WIN32\n         retval = poll(pollfds, n_pollfds, time_left);\n         if (retval < 0) {\n             retval = -errno;\n         }\n-#else\n-        if (n_pollfds > MAXIMUM_WAIT_OBJECTS) {\n-            VLOG_ERR(\"Cannot handle more than maximum wait objects\\n\");\n-        } else if (n_pollfds != 0) {\n-            retval = WaitForMultipleObjects(n_pollfds, handles, FALSE,\n-                                            time_left);\n-        }\n-        if (retval < 0) {\n-            /* XXX This will be replace by a win error to errno\n-               conversion function */\n-            retval = -WSAGetLastError();\n-            retval = -EINVAL;\n-        }\n-#endif\n \n         if (!quiescent && time_left) {\n             ovsrcu_quiesce_end();\n         }\n \n         if (deadline <= time_msec()) {\n-#ifndef _WIN32\n             fatal_signal_handler(SIGALRM);\n-#else\n-            VLOG_ERR(\"wake up from WaitForMultipleObjects after deadline\");\n-            fatal_signal_handler(SIGTERM);\n-#endif\n             if (retval < 0) {\n                 retval = 0;\n             }\n@@ -406,57 +381,6 @@ time_boot_msec(void)\n     return boot_time;\n }\n \n-#ifdef _WIN32\n-static ULARGE_INTEGER\n-xgetfiletime(void)\n-{\n-    ULARGE_INTEGER current_time;\n-    FILETIME current_time_ft;\n-\n-    /* Returns current time in UTC as a 64-bit value representing the number\n-     * of 100-nanosecond intervals since January 1, 1601 . */\n-    GetSystemTimePreciseAsFileTime(&current_time_ft);\n-    current_time.LowPart = current_time_ft.dwLowDateTime;\n-    current_time.HighPart = current_time_ft.dwHighDateTime;\n-\n-    return current_time;\n-}\n-\n-static int\n-clock_gettime(clock_t id, struct timespec *ts)\n-{\n-    if (id == CLOCK_MONOTONIC) {\n-        static LARGE_INTEGER freq;\n-        LARGE_INTEGER count;\n-        long long int ns;\n-\n-        if (!freq.QuadPart) {\n-            /* Number of counts per second. */\n-            QueryPerformanceFrequency(&freq);\n-        }\n-        /* Total number of counts from a starting point. */\n-        QueryPerformanceCounter(&count);\n-\n-        /* Total nano seconds from a starting point. */\n-        ns = (double) count.QuadPart / freq.QuadPart * 1000000000;\n-\n-        ts->tv_sec = count.QuadPart / freq.QuadPart;\n-        ts->tv_nsec = ns % 1000000000;\n-    } else if (id == CLOCK_REALTIME) {\n-        ULARGE_INTEGER current_time = xgetfiletime();\n-\n-        /* Time from Epoch to now. */\n-        ts->tv_sec = (current_time.QuadPart - unix_epoch) / 10000000;\n-        ts->tv_nsec = ((current_time.QuadPart - unix_epoch) %\n-                       10000000) * 100;\n-    } else {\n-        return -1;\n-    }\n-\n-    return 0;\n-}\n-#endif /* _WIN32 */\n-\n #if defined(__MACH__) && !defined(HAVE_CLOCK_GETTIME)\n #include <mach/clock.h>\n #include <mach/mach.h>\n@@ -488,17 +412,9 @@ clock_gettime(clock_t id, struct timespec *ts)\n void\n xgettimeofday(struct timeval *tv)\n {\n-#ifndef _WIN32\n     if (gettimeofday(tv, NULL) == -1) {\n         VLOG_FATAL(\"gettimeofday failed (%s)\", ovs_strerror(errno));\n     }\n-#else\n-    ULARGE_INTEGER current_time = xgetfiletime();\n-\n-    tv->tv_sec = (current_time.QuadPart - unix_epoch) / 10000000;\n-    tv->tv_usec = ((current_time.QuadPart - unix_epoch) %\n-                   10000000) / 10;\n-#endif\n }\n \n void\n@@ -572,11 +488,7 @@ timewarp_work(void)\n     seq_change(timewarp_seq);\n \n     /* give threads (eg. monitor) some chances to run */\n-#ifndef _WIN32\n     poll(NULL, 0, 10);\n-#else\n-    Sleep(10);\n-#endif\n }\n \n /* Perform work needed for \"timewarp_seq\"'s producer and consumers. */\ndiff --git a/lib/timeval.h b/lib/timeval.h\nindex 1c40530e2..422db8c63 100644\n--- a/lib/timeval.h\n+++ b/lib/timeval.h\n@@ -40,11 +40,6 @@ BUILD_ASSERT_DECL(TYPE_IS_SIGNED(time_t));\n #define TIME_MAX TYPE_MAXIMUM(time_t)\n #define TIME_MIN TYPE_MINIMUM(time_t)\n \n-#ifdef _WIN32\n-#define localtime_r(timep, result) localtime_s(result, timep)\n-#define gmtime_r(timep, result) gmtime_s(result, timep)\n-#endif /* _WIN32 */\n-\n struct tm_msec {\n   struct tm tm;\n   int msec;\ndiff --git a/lib/unixctl.c b/lib/unixctl.c\nindex 4fd150959..6e9386947 100644\n--- a/lib/unixctl.c\n+++ b/lib/unixctl.c\n@@ -316,15 +316,8 @@ unixctl_command_reply_error(struct unixctl_conn *conn, const char *error)\n  *      - An absolute path (starting with '/') that gives the exact name of\n  *        the Unix domain socket to listen on.\n  *\n- * For Windows, a local named pipe is used. A file is created in 'path'\n- * which may be:\n- *\n- *      - NULL, in which case <rundir>/<program>.ctl is used.\n- *\n- *      - An absolute path that gives the name of the file.\n- *\n- * For both POSIX and Windows, if the path is \"none\", the function will\n- * return successfully but no socket will actually be created.\n+ * If the path is \"none\", the function will return successfully but no socket\n+ * will actually be created.\n  *\n  * A program that (optionally) daemonizes itself should call this function\n  * *after* daemonization, so that the socket name contains the pid of the\n@@ -342,16 +335,9 @@ unixctl_server_create(const char *path, struct unixctl_server **serverp)\n         return 0;\n     }\n \n-#ifdef _WIN32\n-    enum { WINDOWS = 1 };\n-#else\n-    enum { WINDOWS = 0 };\n-#endif\n-\n     long int pid = getpid();\n     char *abs_path\n         = (path ? abs_file_name(ovs_rundir(), path)\n-           : WINDOWS ? xasprintf(\"%s/%s.ctl\", ovs_rundir(), program_name)\n            : xasprintf(\"%s/%s.%ld.ctl\", ovs_rundir(), program_name, pid));\n \n     struct pstream *listener;\n@@ -567,10 +553,6 @@ unixctl_server_get_path(const struct unixctl_server *server)\n  * be the name of a unixctl server socket.  If it does not start with '/', it\n  * will be prefixed with the rundir (e.g. /usr/local/var/run/openvswitch).\n  *\n- * On Windows, connects to a local named pipe. A file which resides in\n- * 'path' is used to mimic the behavior of a Unix domain socket.\n- * 'path' should be an absolute path of the file.\n- *\n  * Returns 0 if successful, otherwise a positive errno value.  If successful,\n  * sets '*client' to the new jsonrpc, otherwise to NULL. */\n int\ndiff --git a/lib/unixctl.man b/lib/unixctl.man\nindex f72eae8d7..8cd37dd88 100644\n--- a/lib/unixctl.man\n+++ b/lib/unixctl.man\n@@ -7,11 +7,5 @@ not used at all, the default socket is\n \\fB@RUNDIR@/\\*(PN.\\fIpid\\fB.ctl\\fR, where \\fIpid\\fR is \\fB\\*(PN\\fR's\n process ID.\n .IP\n-On Windows a local named pipe is used to listen for runtime management\n-commands.  A file is created in the absolute path as pointed by\n-\\fIsocket\\fR or if \\fB\\-\\-unixctl\\fR is not used at all, a file is\n-created as \\fB\\*(PN.ctl\\fR in the configured \\fIOVS_RUNDIR\\fR\n-directory.  The file exists just to mimic the behavior of a Unix domain socket.\n-.IP\n Specifying \\fBnone\\fR for \\fIsocket\\fR disables the control socket\n feature.\ndiff --git a/lib/unixctl.xml b/lib/unixctl.xml\nindex 51bfc5faa..fe2b0d9fc 100644\n--- a/lib/unixctl.xml\n+++ b/lib/unixctl.xml\n@@ -10,14 +10,6 @@\n     the default socket is\n     <code>@RUNDIR@/<var>program</var>.</code><var>pid</var><code>.ctl</code>,\n     where <var>pid</var> is <code><var>program</var></code>'s process ID.\n-  <p>\n-    On Windows a local named pipe is used to listen for runtime management\n-    commands.  A file is created in the absolute path as pointed by\n-    <var>socket</var> or if <code>--unixctl</code> is not used at all,\n-    a file is created as <code><var>program</var></code> in the configured\n-    <var>OVS_RUNDIR</var> directory.  The file exists just to mimic the\n-    behavior of a Unix domain socket.\n-  </p>\n   <p>\n     Specifying <code>none</code> for <var>socket</var> disables the control\n     socket feature.\ndiff --git a/lib/util.c b/lib/util.c\nindex a6da1e481..06a692ea2 100644\n--- a/lib/util.c\n+++ b/lib/util.c\n@@ -42,9 +42,6 @@\n #ifdef HAVE_PTHREAD_SET_NAME_NP\n #include <pthread_np.h>\n #endif\n-#ifdef _WIN32\n-#include <shlwapi.h>\n-#endif\n \n VLOG_DEFINE_THIS_MODULE(util);\n \n@@ -528,10 +525,7 @@ ovs_retval_to_string(int retval)\n             : ovs_strerror(retval));\n }\n \n-/* This function returns the string describing the error number in 'error'\n- * for POSIX platforms.  For Windows, this function can be used for C library\n- * calls.  For socket calls that are also used in Windows, use sock_strerror()\n- * instead.  For WINAPI calls, look at ovs_lasterror_to_string(). */\n+/* This function returns the string describing the error number in 'error'. */\n const char *\n ovs_strerror(int error)\n {\n@@ -592,22 +586,10 @@ ovs_strerror(int error)\n void\n ovs_set_program_name(const char *argv0, const char *version)\n {\n+    const char *slash = strrchr(argv0, '/');\n     char *basename;\n-#ifdef _WIN32\n-    size_t max_len = strlen(argv0) + 1;\n-\n-    SetErrorMode(GetErrorMode() | SEM_NOGPFAULTERRORBOX);\n-#if _MSC_VER < 1900\n-     /* This function is deprecated from 1900 (Visual Studio 2015) */\n-    _set_output_format(_TWO_DIGIT_EXPONENT);\n-#endif\n \n-    basename = xmalloc(max_len);\n-    _splitpath_s(argv0, NULL, 0, NULL, 0, basename, max_len, NULL, 0);\n-#else\n-    const char *slash = strrchr(argv0, '/');\n     basename = xstrdup(slash ? slash + 1 : argv0);\n-#endif\n \n     assert_single_threaded();\n     free(program_name);\n@@ -670,14 +652,8 @@ get_page_size(void)\n     static unsigned int cached;\n \n     if (!cached) {\n-#ifndef _WIN32\n         long int value = sysconf(_SC_PAGESIZE);\n-#else\n-        long int value;\n-        SYSTEM_INFO sysinfo;\n-        GetSystemInfo(&sysinfo);\n-        value = sysinfo.dwPageSize;\n-#endif\n+\n         if (value >= 0) {\n             cached = value;\n         }\n@@ -1087,11 +1063,7 @@ get_cwd(void)\n     size_t size;\n \n     /* Get maximum path length or at least a reasonable estimate. */\n-#ifndef _WIN32\n     path_max = pathconf(\".\", _PC_PATH_MAX);\n-#else\n-    path_max = MAX_PATH;\n-#endif\n     size = (path_max < 0 ? 1024\n             : path_max > 10240 ? 10240\n             : path_max);\n@@ -1121,7 +1093,6 @@ all_slashes_name(const char *s)\n                    : \".\");\n }\n \n-#ifndef _WIN32\n /* Returns the directory name portion of 'file_name' as a malloc()'d string,\n  * similar to the POSIX dirname() function but thread-safe. */\n char *\n@@ -1163,18 +1134,12 @@ base_name(const char *file_name)\n \n     return xmemdup0(file_name + start, end - start);\n }\n-#endif /* _WIN32 */\n \n bool\n is_file_name_absolute(const char *fn)\n {\n-#ifdef _WIN32\n-    /* Use platform specific API */\n-    return !PathIsRelative(fn);\n-#else\n     /* An absolute path begins with /. */\n     return fn[0] == '/';\n-#endif\n }\n \n /* If 'file_name' is absolute, returns a copy of 'file_name'.  Otherwise,\n@@ -1198,15 +1163,6 @@ abs_file_name(const char *dir, const char *file_name)\n         return xasprintf(\"%s%s%s\", dir, separator, file_name);\n     }\n \n-#if _WIN32\n-    /* It's a little complicated to make an absolute path on Windows because a\n-     * relative path might still specify a drive letter.  The OS has a function\n-     * to do the job for us, so use it. */\n-    char abs_path[MAX_PATH];\n-    DWORD n = GetFullPathName(file_name, sizeof abs_path, abs_path, NULL);\n-    return n > 0 && n <= sizeof abs_path ? xmemdup0(abs_path, n) : NULL;\n-#else\n-    /* Outside Windows, do the job ourselves. */\n     char *cwd = get_cwd();\n     if (!cwd) {\n         return NULL;\n@@ -1214,7 +1170,6 @@ abs_file_name(const char *dir, const char *file_name)\n     char *abs_name = xasprintf(\"%s/%s\", cwd, file_name);\n     free(cwd);\n     return abs_name;\n-#endif\n }\n \n /* Like readlink(), but returns the link name as a null-terminated string in\n@@ -1223,10 +1178,6 @@ abs_file_name(const char *dir, const char *file_name)\n static char *\n xreadlink(const char *filename)\n {\n-#ifdef _WIN32\n-    errno = ENOENT;\n-    return NULL;\n-#else\n     size_t size;\n \n     for (size = 64; ; size *= 2) {\n@@ -1245,7 +1196,6 @@ xreadlink(const char *filename)\n             return NULL;\n         }\n     }\n-#endif\n }\n \n /* Returns a version of 'filename' with symlinks in the final component\n@@ -1257,14 +1207,10 @@ xreadlink(const char *filename)\n  *\n  *     - Only symlinks in the final component of 'filename' are dereferenced.\n  *\n- * For Windows platform, this function returns a string that has the same\n- * value as the passed string.\n- *\n  * The caller must eventually free the returned string (with free()). */\n char *\n follow_symlinks(const char *filename)\n {\n-#ifndef _WIN32\n     struct stat s;\n     char *fn;\n     int i;\n@@ -1309,7 +1255,6 @@ follow_symlinks(const char *filename)\n \n     VLOG_WARN(\"%s: too many levels of symlinks\", filename);\n     free(fn);\n-#endif\n     return xstrdup(filename);\n }\n \n@@ -1331,7 +1276,7 @@ english_list_delimiter(size_t index, size_t total)\n }\n \n /* Returns the number of trailing 0-bits in 'n'.  Undefined if 'n' == 0. */\n-#if __GNUC__ >= 4 || _MSC_VER\n+#if __GNUC__ >= 4\n /* Defined inline in util.h. */\n #else\n /* Returns the number of trailing 0-bits in 'n'.  Undefined if 'n' == 0. */\n@@ -2377,18 +2322,13 @@ void\n xsleep(unsigned int seconds)\n {\n     ovsrcu_quiesce_start();\n-#ifdef _WIN32\n-    Sleep(seconds * 1000);\n-#else\n     sleep(seconds);\n-#endif\n     ovsrcu_quiesce_end();\n }\n \n static void\n xnanosleep__(uint64_t nanoseconds)\n {\n-#ifndef _WIN32\n     int retval;\n     struct timespec ts_sleep;\n     nsec_to_timespec(nanoseconds, &ts_sleep);\n@@ -2398,23 +2338,6 @@ xnanosleep__(uint64_t nanoseconds)\n         retval = nanosleep(&ts_sleep, NULL);\n         error = retval < 0 ? errno : 0;\n     } while (error == EINTR);\n-#else\n-    HANDLE timer = CreateWaitableTimer(NULL, FALSE, NULL);\n-    if (timer) {\n-        LARGE_INTEGER duetime;\n-        duetime.QuadPart = -nanoseconds;\n-        if (SetWaitableTimer(timer, &duetime, 0, NULL, NULL, FALSE)) {\n-            WaitForSingleObject(timer, INFINITE);\n-        } else {\n-            VLOG_ERR_ONCE(\"SetWaitableTimer Failed (%s)\",\n-                           ovs_lasterror_to_string());\n-        }\n-        CloseHandle(timer);\n-    } else {\n-        VLOG_ERR_ONCE(\"CreateWaitableTimer Failed (%s)\",\n-                       ovs_lasterror_to_string());\n-    }\n-#endif\n }\n \n /* High resolution sleep with thread quiesce. */\n@@ -2457,55 +2380,6 @@ is_stdout_a_tty(void)\n     return (isatty(STDOUT_FILENO) && t && strcmp(t, \"dumb\") != 0);\n }\n \n-#ifdef _WIN32\n-\f\n-char *\n-ovs_format_message(int error)\n-{\n-    enum { BUFSIZE = sizeof strerror_buffer_get()->s };\n-    char *buffer = strerror_buffer_get()->s;\n-\n-    if (error == 0) {\n-        /* See ovs_strerror */\n-        return \"Success\";\n-    }\n-\n-    FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,\n-                  NULL, error, 0, buffer, BUFSIZE, NULL);\n-    return buffer;\n-}\n-\n-/* Returns a null-terminated string that explains the last error.\n- * Use this function to get the error string for WINAPI calls. */\n-char *\n-ovs_lasterror_to_string(void)\n-{\n-    return ovs_format_message(GetLastError());\n-}\n-\n-int\n-ftruncate(int fd, off_t length)\n-{\n-    int error;\n-\n-    error = _chsize_s(fd, length);\n-    if (error) {\n-        return -1;\n-    }\n-    return 0;\n-}\n-\n-OVS_CONSTRUCTOR(winsock_start) {\n-    WSADATA wsaData;\n-    int error;\n-\n-    error = WSAStartup(MAKEWORD(2, 2), &wsaData);\n-    if (error != 0) {\n-        VLOG_FATAL(\"WSAStartup failed: %s\", sock_strerror(sock_errno()));\n-   }\n-}\n-#endif\n-\n #ifdef __linux__\n bool\n ovs_kernel_is_version_or_newer(int target_major, int target_minor)\ndiff --git a/lib/util.h b/lib/util.h\nindex ef993626a..e8884f4b2 100644\n--- a/lib/util.h\n+++ b/lib/util.h\n@@ -74,11 +74,7 @@ struct Bad_arg_to_ARRAY_SIZE {\n #endif\n BUILD_ASSERT_DECL(IS_POW2(CACHE_LINE_SIZE));\n \n-/* Cacheline marking is typically done using zero-sized array.\n- * However MSVC doesn't like zero-sized array in struct/union.\n- * C4200: https://msdn.microsoft.com/en-us/library/79wf64bc.aspx\n- */\n-typedef uint8_t OVS_CACHE_LINE_MARKER[1];\n+typedef uint8_t OVS_CACHE_LINE_MARKER[0];\n \n static inline void\n ovs_prefetch_range(const void *start, size_t size)\n@@ -118,25 +114,14 @@ ovs_prefetch_range(const void *start, size_t size)\n #define OVS_JOIN(X, Y) OVS_JOIN2(X, Y)\n \n /* Use \"%\"PRIuSIZE to format size_t with printf(). */\n-#ifdef _WIN32\n-#define PRIdSIZE \"Id\"\n-#define PRIiSIZE \"Ii\"\n-#define PRIoSIZE \"Io\"\n-#define PRIuSIZE \"Iu\"\n-#define PRIxSIZE \"Ix\"\n-#define PRIXSIZE \"IX\"\n-#else\n #define PRIdSIZE \"zd\"\n #define PRIiSIZE \"zi\"\n #define PRIoSIZE \"zo\"\n #define PRIuSIZE \"zu\"\n #define PRIxSIZE \"zx\"\n #define PRIXSIZE \"zX\"\n-#endif\n \n-#ifndef _WIN32\n typedef uint32_t HANDLE;\n-#endif\n \n #ifdef  __cplusplus\n extern \"C\" {\n@@ -262,10 +247,8 @@ int parse_int_string(const char *s, uint8_t *valuep, int field_width,\n const char *english_list_delimiter(size_t index, size_t total);\n \n char *get_cwd(void);\n-#ifndef _WIN32\n char *dir_name(const char *file_name);\n char *base_name(const char *file_name);\n-#endif\n char *abs_file_name(const char *dir, const char *file_name);\n bool is_file_name_absolute(const char *);\n \n@@ -291,42 +274,6 @@ raw_clz64(uint64_t n)\n {\n     return __builtin_clzll(n);\n }\n-#elif _MSC_VER\n-static inline int\n-raw_ctz(uint64_t n)\n-{\n-#ifdef _WIN64\n-    unsigned long r = 0;\n-    _BitScanForward64(&r, n);\n-    return r;\n-#else\n-    unsigned long low = n, high, r = 0;\n-    if (_BitScanForward(&r, low)) {\n-        return r;\n-    }\n-    high = n >> 32;\n-    _BitScanForward(&r, high);\n-    return r + 32;\n-#endif\n-}\n-\n-static inline int\n-raw_clz64(uint64_t n)\n-{\n-#ifdef _WIN64\n-    unsigned long r = 0;\n-    _BitScanReverse64(&r, n);\n-    return 63 - r;\n-#else\n-    unsigned long low, high = n >> 32, r = 0;\n-    if (_BitScanReverse(&r, high)) {\n-        return 31 - r;\n-    }\n-    low = n;\n-    _BitScanReverse(&r, low);\n-    return 63 - r;\n-#endif\n-}\n #else\n /* Defined in util.c. */\n int raw_ctz(uint64_t n);\n@@ -597,13 +544,6 @@ void set_timer_resolution(unsigned long nanoseconds);\n \n bool is_stdout_a_tty(void);\n \n-#ifdef _WIN32\n-\f\n-char *ovs_format_message(int error);\n-char *ovs_lasterror_to_string(void);\n-int ftruncate(int fd, off_t length);\n-#endif\n-\n #ifdef  __cplusplus\n }\n #endif\ndiff --git a/lib/uuid.c b/lib/uuid.c\nindex e4caa0ec6..8c8ec5c78 100644\n--- a/lib/uuid.c\n+++ b/lib/uuid.c\n@@ -361,11 +361,9 @@ do_init(void)\n     sha1_update(&sha1_ctx, random_seed, sizeof random_seed);\n     sha1_update(&sha1_ctx, &now, sizeof now);\n     sha1_update_int(&sha1_ctx, getpid());\n-#ifndef _WIN32\n     sha1_update_int(&sha1_ctx, getppid());\n     sha1_update_int(&sha1_ctx, getuid());\n     sha1_update_int(&sha1_ctx, getgid());\n-#endif\n     sha1_final(&sha1_ctx, sha1);\n \n     /* Generate key. */\ndiff --git a/lib/vconn-active.man b/lib/vconn-active.man\nindex 9438ac079..c24c1886c 100644\n--- a/lib/vconn-active.man\n+++ b/lib/vconn-active.man\n@@ -13,7 +13,3 @@ If \\fIport\\fR is not specified, it defaults to 6653.\n .TP\n \\fBunix:\\fIfile\\fR\n On POSIX, a Unix domain server socket named \\fIfile\\fR.\n-.IP\n-On Windows, connect to a local named pipe that is represented by a\n-file created in the path \\fIfile\\fR to mimic the behavior of a Unix\n-domain socket.\ndiff --git a/lib/vlog-unixctl.man b/lib/vlog-unixctl.man\nindex 8539a89b5..498d9bd79 100644\n--- a/lib/vlog-unixctl.man\n+++ b/lib/vlog-unixctl.man\n@@ -16,10 +16,6 @@ module.\n \\fBsyslog\\fR, \\fBconsole\\fR, or \\fBfile\\fR, to limit the log level\n change to only to the system log, to the console, or to a file,\n respectively.\n-.IP\n-On Windows platform, \\fBsyslog\\fR is accepted as a word and is only\n-useful along with the \\fB\\-\\-syslog\\-target\\fR option (the word has no\n-effect otherwise).\n .\n .IP \\(bu \n \\fBoff\\fR, \\fBemer\\fR, \\fBerr\\fR, \\fBwarn\\fR, \\fBinfo\\fR, or\ndiff --git a/lib/vlog.c b/lib/vlog.c\nindex e6cea7e54..00abb490e 100644\n--- a/lib/vlog.c\n+++ b/lib/vlog.c\n@@ -479,7 +479,6 @@ vlog_reopen_log_file(void)\n     }\n }\n \n-#ifndef _WIN32\n /* In case a log file exists, change its owner to new 'user' and 'group'.\n  *\n  * This is useful for handling cases where the --log-file option is\n@@ -506,7 +505,6 @@ vlog_change_owner_unix(uid_t user, gid_t group)\n         VLOG_FATAL(\"%s\", ds_steal_cstr(&err));\n     }\n }\n-#endif\n \n /* Set debugging levels.  Returns null if successful, otherwise an error\n  * message that the caller must free(). */\ndiff --git a/lib/vlog.man b/lib/vlog.man\nindex e09bbc505..ebc44b3c6 100644\n--- a/lib/vlog.man\n+++ b/lib/vlog.man\n@@ -18,10 +18,6 @@ change to only to the system log, to the console, or to a file,\n respectively.  (If \\fB\\-\\-detach\\fR is specified, \\fB\\*(PN\\fR closes\n its standard file descriptors, so logging to the console will have no\n effect.)\n-.IP\n-On Windows platform, \\fBsyslog\\fR is accepted as a word and is only\n-useful along with the \\fB\\-\\-syslog\\-target\\fR option (the word has no\n-effect otherwise).\n .\n .IP \\(bu\n \\fBoff\\fR, \\fBemer\\fR, \\fBerr\\fR, \\fBwarn\\fR, \\fBinfo\\fR, or\ndiff --git a/lib/vlog.xml b/lib/vlog.xml\nindex c3afc0492..3b7c0dea8 100644\n--- a/lib/vlog.xml\n+++ b/lib/vlog.xml\n@@ -25,12 +25,6 @@\n           the daemon closes its standard file descriptors, so logging to the\n           console will have no effect.)\n         </p>\n-\n-        <p>\n-          On Windows platform, <code>syslog</code> is accepted as a word and is\n-          only useful along with the <code>--syslog-target</code> option (the\n-          word has no effect otherwise).\n-        </p>\n       </li>\n \n       <li>\ndiff --git a/lib/wmi.c b/lib/wmi.c\ndeleted file mode 100644\nindex 44c1d75e9..000000000\n--- a/lib/wmi.c\n+++ /dev/null\n@@ -1,1272 +0,0 @@\n-/*\n- * Copyright (c) 2016 Cloudbase Solutions Srl\n- *\n- * Licensed under the Apache License, Version 2.0 (the \"License\");\n- * you may not use this file except in compliance with the License.\n- * You may obtain a copy of the License at\n- *\n- *     http://www.apache.org/licenses/LICENSE-2.0\n- *\n- * Unless required by applicable law or agreed to in writing, software\n- * distributed under the License is distributed on an \"AS IS\" BASIS,\n- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n- * See the License for the specific language governing permissions and\n- * limitations under the License.\n- */\n-\n-#include <config.h>\n-#include \"wmi.h\"\n-#include <stdlib.h>\n-#include <stdio.h>\n-#include <tchar.h>\n-#include \"openvswitch/vlog.h\"\n-#include \"util.h\"\n-\n-VLOG_DEFINE_THIS_MODULE(wmi);\n-\n-/* WMI Job values. */\n-enum job_status\n-{\n-    job_starting = 3,\n-    job_running = 4,\n-    job_completed = 7,\n-    job_wait = 4096\n-};\n-\n-static char *\n-sanitize_port_name(char *name)\n-{\n-    char *p1, *p2;\n-    p1 = p2 = name;\n-\n-    while (*p1) {\n-        if ((*p1) == '\\'' || (*p1) == '\\\"') {\n-            p1++;\n-        } else {\n-            *p2 = *p1;\n-            p2++;\n-            p1++;\n-        }\n-    }\n-    *p2 = '\\0';\n-    return name;\n-}\n-\n-/* This function will output the appropriate message for a given HRESULT.*/\n-static void\n-get_hres_error(HRESULT hres)\n-{\n-    char *error_msg = NULL;\n-\n-    if (FACILITY_WINDOWS == HRESULT_FACILITY(hres)) {\n-        hres = HRESULT_CODE(hres);\n-    }\n-\n-    VLOG_ERR(\"%s\", ovs_format_message(hres));\n-}\n-\n-static boolean\n-check_return_value(HRESULT hres)\n-{\n-    if (FAILED(hres)) {\n-        get_hres_error(hres);\n-        return false;\n-    }\n-\n-    return true;\n-}\n-\n-static HRESULT\n-get_variant_value(IWbemClassObject *pcls_obj, wchar_t *field_name,\n-                  VARIANT *value)\n-{\n-    HRESULT hres;\n-\n-    VariantInit(value);\n-\n-    hres = pcls_obj->lpVtbl->Get(pcls_obj, field_name, 0, value, 0, 0);\n-\n-    if (FAILED(hres)) {\n-        VariantClear(value);\n-    }\n-\n-    return hres;\n-}\n-\n-/* This function retrieves the uint16_t value from a given class object with\n- * the field name field_name. */\n-static HRESULT\n-get_uint16_t_value(IWbemClassObject *pcls_obj, wchar_t *field_name,\n-                   uint16_t *value)\n-{\n-    VARIANT vt_prop;\n-    HRESULT hres = get_variant_value(pcls_obj, field_name, &vt_prop);\n-    *value = V_UI2(&vt_prop);\n-\n-    return hres;\n-}\n-\n-/* This function retrieves the unsigned int values from a given class object\n- * with the field name field_name. */\n-static HRESULT\n-get_uint_value(IWbemClassObject *pcls_obj, wchar_t *field_name,\n-               unsigned int *value)\n-{\n-    VARIANT vt_prop;\n-    HRESULT hres = get_variant_value(pcls_obj, field_name, &vt_prop);\n-    *value = V_UI4(&vt_prop);\n-\n-    return hres;\n-}\n-\n-/* This function retrieves the unsigned short value from a given class object\n- * with the field name field_name. */\n-static HRESULT\n-get_ushort_value(IWbemClassObject *pcls_obj, wchar_t *field_name,\n-                 unsigned short *value)\n-{\n-    VARIANT vt_prop;\n-    HRESULT hres = get_variant_value(pcls_obj, field_name, &vt_prop);\n-    *value = V_UI2(&vt_prop);\n-\n-    return hres;\n-}\n-\n-/* This function retrieves the BSTR value from a given class object with\n- * the field name field_name, to a preallocated destination dest and with the\n- * maximum length max_dest_lgth. */\n-static HRESULT\n-get_str_value(IWbemClassObject *pcls_obj, wchar_t *field_name, wchar_t *dest,\n-              int max_dest_lgth)\n-{\n-    VARIANT vt_prop;\n-    HRESULT hres = get_variant_value(pcls_obj, field_name, &vt_prop);\n-\n-    if (wcscpy_s(dest, max_dest_lgth, vt_prop.bstrVal)) {\n-        VariantClear(&vt_prop);\n-        VLOG_WARN(\"get_str_value, wcscpy_s failed :%s\", ovs_strerror(errno));\n-        return WBEM_E_FAILED;\n-    }\n-\n-    VariantClear(&vt_prop);\n-    return S_OK;\n-}\n-\n-/* This function waits for a WMI job to finish and retrieves the error code\n- * if the job failed */\n-static HRESULT\n-wait_for_job(IWbemServices *psvc, wchar_t *job_path)\n-{\n-    IWbemClassObject *pcls_obj = NULL;\n-    HRESULT retval = 0;\n-    uint16_t job_state = 0;\n-    uint16_t error = 0;\n-\n-    do {\n-        if(!check_return_value(psvc->lpVtbl->GetObject(psvc, job_path, 0, NULL,\n-                                                       &pcls_obj, NULL))) {\n-            retval = WBEM_E_FAILED;\n-            break;\n-        }\n-\n-        retval = get_uint16_t_value(pcls_obj, L\"JobState\", &job_state);\n-        if (FAILED(retval)) {\n-            break;\n-        }\n-\n-        if (job_state == job_starting || job_state == job_running) {\n-            Sleep(200);\n-        } else if (job_state == job_completed) {\n-            break;\n-        } else {\n-            /* Error occurred. */\n-            retval = get_uint16_t_value(pcls_obj, L\"ErrorCode\", &error);\n-            if (FAILED(retval)) {\n-                break;\n-            }\n-            VLOG_WARN(\"Job failed with error: %d\", error);\n-            retval = WBEM_E_FAILED;;\n-            break;\n-        }\n-\n-        if (pcls_obj != NULL) {\n-            pcls_obj->lpVtbl->Release(pcls_obj);\n-            pcls_obj = NULL;\n-        }\n-    } while(TRUE);\n-\n-    if (pcls_obj != NULL) {\n-        pcls_obj->lpVtbl->Release(pcls_obj);\n-        pcls_obj = NULL;\n-    }\n-\n-    return retval;\n-}\n-\n-/* This function will initialize DCOM retrieving the WMI locator's ploc and\n- * the context associated to it. */\n-static boolean\n-initialize_wmi(IWbemLocator **ploc, IWbemContext **pcontext)\n-{\n-    HRESULT hres = 0;\n-\n-    /* Initialize COM. */\n-    hres = CoInitialize(NULL);\n-\n-    if (FAILED(hres)) {\n-        return false;\n-    }\n-\n-    /* Initialize COM security. */\n-    hres = CoInitializeSecurity(NULL,\n-                                -1,\n-                                NULL,\n-                                NULL,\n-                                RPC_C_AUTHN_LEVEL_DEFAULT,\n-                                RPC_C_IMP_LEVEL_IMPERSONATE,\n-                                NULL,\n-                                EOAC_NONE,\n-                                NULL);\n-\n-    if (FAILED(hres)) {\n-        return false;\n-    }\n-\n-    /* Fill context. */\n-    hres = CoCreateInstance(&CLSID_WbemContext,\n-                            NULL,\n-                            CLSCTX_INPROC_SERVER,\n-                            &IID_IWbemContext,\n-                            (void**)pcontext);\n-\n-    if (FAILED(hres)) {\n-        return false;\n-    }\n-\n-    fill_context(*pcontext);\n-\n-    /* Initialize locator's (ploc) to WMI. */\n-    hres = CoCreateInstance(&CLSID_WbemLocator,\n-                            NULL,\n-                            CLSCTX_INPROC_SERVER,\n-                            &IID_IWbemLocator,\n-                            (LPVOID *)ploc);\n-\n-    if (FAILED(hres)) {\n-        return false;\n-    }\n-\n-    return true;\n-}\n-\n-/* This function connects the WMI locator's ploc to a given WMI provider\n- * defined in server and also sets the required security levels for a local\n- * connection to it. */\n-static boolean\n-connect_set_security(IWbemLocator *ploc, IWbemContext *pcontext,\n-                     wchar_t *server, IWbemServices **psvc)\n-{\n-    HRESULT hres = 0;\n-\n-   /* Connect to server. */\n-    hres = ploc->lpVtbl->ConnectServer(ploc,\n-                                       server,\n-                                       NULL,\n-                                       NULL,\n-                                       0,\n-                                       0,\n-                                       0,\n-                                       pcontext,\n-                                       psvc);\n-\n-    if (FAILED(hres)) {\n-        return false;\n-    }\n-\n-    /* Set security levels. */\n-    hres = CoSetProxyBlanket((IUnknown *) *psvc,\n-                             RPC_C_AUTHN_WINNT,\n-                             RPC_C_AUTHZ_NONE,\n-                             NULL,\n-                             RPC_C_AUTHN_LEVEL_CALL,\n-                             RPC_C_IMP_LEVEL_IMPERSONATE,\n-                             NULL,\n-                             EOAC_NONE);\n-\n-    if (FAILED(hres)) {\n-        return false;\n-    }\n-\n-    return true;\n-}\n-\n-/* This function retrieves the first class object of a given enumeration\n- * outputted by a query and fails if it could not retrieve the object or there\n- * was no object to retrieve */\n-static boolean\n-get_first_element(IEnumWbemClassObject *penumerate,\n-                  IWbemClassObject **pcls_obj)\n-{\n-    unsigned long retval = 0;\n-\n-    if (penumerate == NULL) {\n-        VLOG_WARN(\"Enumeration Class Object is NULL. Cannot get the first\"\n-                  \"object\");\n-        return false;\n-    }\n-\n-    HRESULT hres = penumerate->lpVtbl->Next(penumerate, WBEM_INFINITE, 1,\n-                                            pcls_obj, &retval);\n-\n-\n-    if (!check_return_value(hres) || retval == 0) {\n-        return false;\n-    }\n-\n-    return true;\n-}\n-\n-/* This function is a wrapper that transforms a char * into a wchar_t * */\n-static boolean\n-tranform_wide(char *name, wchar_t *wide_name)\n-{\n-    unsigned long size = strlen(name) + 1;\n-    long long ret = 0;\n-\n-    if (wide_name == NULL) {\n-        VLOG_WARN(\"Provided wide string is NULL\");\n-        return false;\n-    }\n-\n-    ret = mbstowcs(wide_name, name, size);\n-\n-    if (ret == -1) {\n-        VLOG_WARN(\"Invalid multibyte character is encountered\");\n-        return false;\n-    } else if (ret == size) {\n-        VLOG_WARN(\"Returned wide string not NULL terminated\");\n-        return false;\n-    }\n-\n-    return true;\n-}\n-\n-#define WMI_QUERY_COUNT 2048\n-\n-/* This function will delete a switch internal port with a given name as input\n- * executing \"RemoveResourceSettings\" as per documentation:\n- * https://msdn.microsoft.com/en-us/library/hh850277%28v=vs.85%29.aspx\n- * allocating the data and populating the needed fields to execute the\n- * method */\n-boolean\n-delete_wmi_port(char *name)\n-{\n-    HRESULT hres = 0;\n-    boolean retval = true;\n-\n-    IWbemLocator *ploc = NULL;\n-    IWbemServices *psvc = NULL;\n-    IWbemContext *pcontext = NULL;\n-    IWbemClassObject *pclass_instance = NULL;\n-    IWbemClassObject *pinput_params = NULL;\n-    IWbemClassObject *pcls_obj = NULL;\n-    IWbemClassObject *pout_params = NULL;\n-    IEnumWbemClassObject *penumerate = NULL;\n-\n-    sanitize_port_name(name);\n-    VARIANT vt_prop;\n-    VARIANT variant_array;\n-    wchar_t *wide_name = NULL;\n-    VariantInit(&vt_prop);\n-    VariantInit(&variant_array);\n-\n-    LONG count[1];\n-    SAFEARRAY* psa = SafeArrayCreateVector(VT_BSTR, 0, 1);\n-    if (psa == NULL) {\n-        VLOG_WARN(\"Could not allocate memory for a SAFEARRAY\");\n-        retval = false;\n-        goto error;\n-    }\n-\n-    if (!initialize_wmi(&ploc, &pcontext)) {\n-        VLOG_WARN(\"Could not initialize DCOM\");\n-        retval = false;\n-        goto error;\n-    }\n-\n-    if (!connect_set_security(ploc, pcontext, L\"Root\\\\Virtualization\\\\v2\",\n-                              &psvc)) {\n-        VLOG_WARN(\"Could not connect and set security for virtualization\");\n-        retval = false;\n-        goto error;\n-    }\n-\n-\n-    /* Get the port with the element name equal to the name input. */\n-    wchar_t internal_port_query[WMI_QUERY_COUNT] = L\"SELECT * from \"\n-        L\"Msvm_EthernetPortAllocationSettingData  WHERE ElementName = \\\"\" ;\n-\n-    wide_name = xmalloc((strlen(name) + 1) * sizeof(wchar_t));\n-\n-    if (!tranform_wide(name, wide_name)) {\n-        retval = false;\n-        goto error;\n-    }\n-    wcscat_s(internal_port_query, WMI_QUERY_COUNT, wide_name);\n-\n-    wcscat_s(internal_port_query, WMI_QUERY_COUNT, L\"\\\"\");\n-\n-    hres = psvc->lpVtbl->ExecQuery(psvc,\n-                                   L\"WQL\",\n-                                   internal_port_query,\n-                                   WBEM_FLAG_FORWARD_ONLY |\n-                                   WBEM_FLAG_RETURN_IMMEDIATELY,\n-                                   NULL,\n-                                   &penumerate);\n-\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-\n-    /* Get the element path on the switch which will be deleted. */\n-    if (!get_first_element(penumerate, &pcls_obj)) {\n-        retval = false;\n-        goto error;\n-    }\n-    penumerate->lpVtbl->Release(penumerate);\n-    penumerate = NULL;\n-\n-    hres = pcls_obj->lpVtbl->Get(pcls_obj, L\"__PATH\", 0, &vt_prop, 0, 0);\n-\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-    pcls_obj->lpVtbl->Release(pcls_obj);\n-    pcls_obj = NULL;\n-\n-    /* Get the class object and the parameters it can have. */\n-    hres = psvc->lpVtbl->GetObject(psvc,\n-        L\"Msvm_VirtualEthernetSwitchManagementService\", 0, NULL, &pcls_obj,\n-        NULL);\n-\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-\n-    hres = pcls_obj->lpVtbl->GetMethod(pcls_obj, L\"RemoveResourceSettings\", 0,\n-                                       &pinput_params, NULL);\n-\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-    pcls_obj->lpVtbl->Release(pcls_obj);\n-    pcls_obj = NULL;\n-\n-    hres = pinput_params->lpVtbl->SpawnInstance(pinput_params, 0,\n-                                                &pclass_instance);\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-\n-    count[0] = 0;\n-\n-    hres = SafeArrayPutElement(psa, count, vt_prop.bstrVal);\n-\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-\n-    VariantClear(&vt_prop);\n-    VariantInit(&vt_prop);\n-    variant_array.vt = VT_ARRAY | VT_BSTR;\n-    variant_array.parray = psa;\n-\n-    hres = pclass_instance->lpVtbl->Put(pclass_instance, L\"ResourceSettings\", 0,\n-                                        &variant_array, 0);\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-\n-    /* Get the object of the Msvm_VirtualEthernetSwitchManagementService which\n-     * we need to invoke the port deletion. */\n-    hres = psvc->lpVtbl->ExecQuery(psvc,\n-                                   L\"WQL\",\n-                                   L\"SELECT * FROM \"\n-                                   L\"Msvm_VirtualEthernetSwitchManagementService\",\n-                                   WBEM_FLAG_FORWARD_ONLY |\n-                                   WBEM_FLAG_RETURN_IMMEDIATELY,\n-                                   NULL,\n-                                   &penumerate);\n-\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-\n-    if (!get_first_element(penumerate, &pcls_obj)) {\n-        retval = false;\n-        goto error;\n-    }\n-    penumerate->lpVtbl->Release(penumerate);\n-    penumerate = NULL;\n-\n-    hres = pcls_obj->lpVtbl->Get(pcls_obj, L\"__PATH\", 0, &vt_prop, 0, 0);\n-\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-\n-    pcls_obj->lpVtbl->Release(pcls_obj);\n-    pcls_obj = NULL;\n-\n-    /* Invoke the delete port method. */\n-    hres = psvc->lpVtbl->ExecMethod(psvc, vt_prop.bstrVal,\n-                                    L\"RemoveResourceSettings\", 0,\n-                                    pcontext, pclass_instance, &pout_params,\n-                                    NULL);\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-    VariantClear(&vt_prop);\n-    VariantInit(&vt_prop);\n-\n-    hres = pout_params->lpVtbl->Get(pout_params, L\"ReturnValue\", 0,\n-                                    &vt_prop, NULL, 0);\n-\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-\n-    unsigned int retvalue = 0;\n-    hres = get_uint_value(pout_params, L\"ReturnValue\", &retvalue);\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-\n-    if (retvalue != 0 && retvalue != job_wait) {\n-        retval = false;\n-        goto error;\n-    }\n-\n-    if (retvalue == job_wait) {\n-        WCHAR job_path[2048];\n-        hres = get_str_value(pout_params, L\"Job\", job_path,\n-                             sizeof(job_path) / sizeof(WCHAR));\n-        if (FAILED(hres)) {\n-            retval = false;\n-            goto error;\n-    }\n-        hres = wait_for_job(psvc, job_path);\n-        if (FAILED(hres)) {\n-            retval = false;\n-        }\n-    }\n-\n-error:\n-    VariantClear(&vt_prop);\n-\n-    if (pcontext != NULL) {\n-        pcontext->lpVtbl->Release(pcontext);\n-        pcontext = NULL;\n-    }\n-    if (psa != NULL) {\n-        SafeArrayDestroy(psa);\n-        psa = NULL;\n-    }\n-    if (pcls_obj != NULL) {\n-        pcls_obj->lpVtbl->Release(pcls_obj);\n-        pcls_obj = NULL;\n-    }\n-    if (wide_name != NULL) {\n-        free(wide_name);\n-        wide_name = NULL;\n-    }\n-    if (!retval) {\n-        get_hres_error(hres);\n-    }\n-    if (pinput_params != NULL) {\n-        pinput_params->lpVtbl->Release(pinput_params);\n-        pinput_params = NULL;\n-    }\n-    if (pout_params != NULL) {\n-        pout_params->lpVtbl->Release(pout_params);\n-        pout_params = NULL;\n-    }\n-    if (psvc != NULL) {\n-        psvc->lpVtbl->Release(psvc);\n-        psvc = NULL;\n-    }\n-    if (ploc != NULL) {\n-        ploc->lpVtbl->Release(ploc);\n-        ploc = NULL;\n-    }\n-    if (pclass_instance != NULL) {\n-        pclass_instance->lpVtbl->Release(pclass_instance);\n-        pclass_instance = NULL;\n-    }\n-    if (penumerate != NULL) {\n-        penumerate->lpVtbl->Release(penumerate);\n-        penumerate = NULL;\n-    }\n-\n-    CoUninitialize();\n-    return retval;\n-}\n-\n-\n-/* This function will create an internal port on the switch given a given name\n- * executing the method AddResourceSettings as per documentation:\n- * https://msdn.microsoft.com/en-us/library/hh850019%28v=vs.85%29.aspx.\n- * It will verify if the port is already defined, in which case it will use\n- * the specific port, and if the forwarding extension \"Open vSwitch Extension\"\n- * is enabled and running only on a single switch.\n- * After the port is created and bound to the switch we will disable the\n- * created net adapter and rename it to match the OVS bridge name .*/\n-boolean\n-create_wmi_port(char *name) {\n-    HRESULT hres = 0;\n-    boolean retval = true;\n-\n-    BSTR text_object_string = NULL;\n-\n-    IWbemLocator *ploc = NULL;\n-    IWbemContext *pcontext = NULL;\n-    IWbemServices *psvc = NULL;\n-    IEnumWbemClassObject *penumerate = NULL;\n-    IWbemClassObject *default_settings_data = NULL;\n-    IWbemClassObject *default_system = NULL;\n-    IWbemClassObject *pcls_obj = NULL;\n-    IWbemClassObject *pclass = NULL;\n-    IWbemClassObject *pinput_params = NULL;\n-    IWbemClassObject *pclass_instance = NULL;\n-    IWbemObjectTextSrc *text_object = NULL;\n-    IWbemClassObject *pout_params = NULL;\n-\n-    wchar_t *wide_name = NULL;\n-    VARIANT vt_prop;\n-    VARIANT switch_setting_path;\n-    VARIANT new_name;\n-    SAFEARRAY *psa = SafeArrayCreateVector(VT_BSTR, 0, 1);\n-    VARIANT variant_array;\n-    LONG count[1];\n-\n-    VariantInit(&vt_prop);\n-    VariantInit(&switch_setting_path);\n-    sanitize_port_name(name);\n-\n-    if (psa == NULL) {\n-        VLOG_WARN(\"Could not allocate memory for a SAFEARRAY\");\n-        retval = false;\n-        goto error;\n-    }\n-\n-    if (!initialize_wmi(&ploc, &pcontext)) {\n-        VLOG_WARN(\"Could not initialize DCOM\");\n-        retval = false;\n-        goto error;\n-    }\n-\n-    if (!connect_set_security(ploc, pcontext, L\"Root\\\\Virtualization\\\\v2\",\n-                              &psvc)) {\n-        VLOG_WARN(\"Could not connect and set security for virtualization\");\n-        retval = false;\n-        goto error;\n-    }\n-\n-    /* Check if the element already exists on the switch. */\n-    wchar_t internal_port_query[WMI_QUERY_COUNT] = L\"SELECT * FROM \"\n-    L\"CIM_EthernetPort WHERE ElementName = \\\"\";\n-\n-    wide_name = xmalloc((strlen(name) + 1) * sizeof(wchar_t));\n-\n-    if (!tranform_wide(name, wide_name)) {\n-        retval = false;\n-        goto error;\n-    }\n-\n-    wcscat_s(internal_port_query, WMI_QUERY_COUNT, wide_name);\n-\n-    wcscat_s(internal_port_query, WMI_QUERY_COUNT, L\"\\\"\");\n-    hres = psvc->lpVtbl->ExecQuery(psvc,\n-                                   L\"WQL\",\n-                                   internal_port_query,\n-                                   WBEM_FLAG_FORWARD_ONLY |\n-                                   WBEM_FLAG_RETURN_IMMEDIATELY,\n-                                   NULL,\n-                                   &penumerate);\n-\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-\n-    if (get_first_element(penumerate, &pcls_obj)) {\n-        VLOG_WARN(\"Port with name: %s already defined on the switch\", name);\n-        goto error;\n-    }\n-    penumerate->lpVtbl->Release(penumerate);\n-    penumerate = NULL;\n-\n-    /* Check if the extension is enabled and running.  Also check if the\n-     * the extension is enabled on more than one switch. */\n-    hres = psvc->lpVtbl->ExecQuery(psvc,\n-                                   L\"WQL\",\n-                                   L\"SELECT * \"\n-                                   L\"FROM Msvm_EthernetSwitchExtension \"\n-                                   L\"WHERE \"\n-                                   L\"ElementName=\\\"Open vSwitch Extension\\\" \"\n-                                   L\"AND EnabledState=2 \"\n-                                   L\"AND HealthState=5\",\n-                                   WBEM_FLAG_FORWARD_ONLY |\n-                                   WBEM_FLAG_RETURN_IMMEDIATELY,\n-                                   NULL,\n-                                   &penumerate);\n-\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-\n-    if (!get_first_element(penumerate, &pcls_obj)) {\n-        VLOG_WARN(\"Open vSwitch Extension is not enabled on any switch\");\n-        retval = false;\n-        goto error;\n-    }\n-    wcscpy_s(internal_port_query, WMI_QUERY_COUNT,\n-             L\"SELECT * FROM Msvm_VirtualEthernetSwitch WHERE Name = \\\"\");\n-\n-    hres = pcls_obj->lpVtbl->Get(pcls_obj, L\"SystemName\", 0,\n-                                 &vt_prop, 0, 0);\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-\n-    wcscat_s(internal_port_query, WMI_QUERY_COUNT,\n-             vt_prop.bstrVal);\n-\n-    VariantClear(&vt_prop);\n-    pcls_obj->lpVtbl->Release(pcls_obj);\n-    pcls_obj = NULL;\n-\n-    if (get_first_element(penumerate, &pcls_obj)) {\n-        VLOG_WARN(\"The extension is activated on more than one switch, \"\n-                  \"aborting operation. Please activate the extension on a \"\n-                  \"single switch\");\n-        retval = false;\n-        goto error;\n-    }\n-    penumerate->lpVtbl->Release(penumerate);\n-    penumerate = NULL;\n-    if (pcls_obj != NULL) {\n-        pcls_obj->lpVtbl->Release(pcls_obj);\n-        pcls_obj = NULL;\n-    }\n-\n-    /* Get the switch object on which the extension is activated. */\n-    wcscat_s(internal_port_query, WMI_QUERY_COUNT, L\"\\\"\");\n-    hres = psvc->lpVtbl->ExecQuery(psvc,\n-                                   L\"WQL\",\n-                                   internal_port_query,\n-                                   WBEM_FLAG_FORWARD_ONLY |\n-                                   WBEM_FLAG_RETURN_IMMEDIATELY,\n-                                   NULL,\n-                                   &penumerate);\n-\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-\n-    if (!get_first_element(penumerate, &pcls_obj)) {\n-        VLOG_WARN(\"Could not get the switch object on which the extension is\"\n-                  \"activated\");\n-        retval = false;\n-        goto error;\n-    }\n-    penumerate->lpVtbl->Release(penumerate);\n-    penumerate = NULL;\n-\n-    hres = pcls_obj->lpVtbl->Get(pcls_obj, L\"ElementName\", 0, &vt_prop, 0, 0);\n-\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-\n-    wcscpy_s(internal_port_query, WMI_QUERY_COUNT,\n-             L\"SELECT * FROM Msvm_VirtualEthernetSwitchSettingData WHERE \"\n-             L\"ElementName = \\\"\");\n-\n-    wcscat_s(internal_port_query, WMI_QUERY_COUNT,\n-             vt_prop.bstrVal);\n-    VariantClear(&vt_prop);\n-\n-    hres = pcls_obj->lpVtbl->Get(pcls_obj, L\"Name\", 0, &vt_prop, 0, 0);\n-\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-    pcls_obj->lpVtbl->Release(pcls_obj);\n-    pcls_obj = NULL;\n-\n-    /* Should be enough to give the InstanceID, from msdn documentation:\n-     * Uniquely identifies an instance of this class. This property is\n-     * inherited from CIM_SettingData and is always\n-     * set to \"Microsoft:GUID\\DeviceSpecificData\". */\n-    wcscat_s(internal_port_query, WMI_QUERY_COUNT,\n-             L\"\\\" AND InstanceID  = \\\"Microsoft:\");\n-    wcscat_s(internal_port_query, WMI_QUERY_COUNT,\n-             vt_prop.bstrVal);\n-    wcscat_s(internal_port_query, WMI_QUERY_COUNT,\n-             L\"\\\"\");\n-\n-    VariantClear(&vt_prop);\n-\n-    /* Retrieve the Msvm_VirtualEthernetSwitchSettingData pinned to the switch\n-     * object on which the extension is activated. */\n-    hres = psvc->lpVtbl->ExecQuery(psvc,\n-                                   L\"WQL\",\n-                                   internal_port_query,\n-                                   WBEM_FLAG_FORWARD_ONLY |\n-                                   WBEM_FLAG_RETURN_IMMEDIATELY,\n-                                   NULL,\n-                                   &penumerate);\n-\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-\n-    if (!get_first_element(penumerate, &pcls_obj)) {\n-        VLOG_WARN(\"Could not get the first \"\n-                  \"Msvm_VirtualEthernetSwitchSettingData object\");\n-        retval = false;\n-        goto error;\n-    }\n-    penumerate->lpVtbl->Release(penumerate);\n-    penumerate = NULL;\n-\n-    hres = pcls_obj->lpVtbl->Get(pcls_obj, L\"__PATH\", 0, &switch_setting_path,\n-                                 0, 0);\n-\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-    pcls_obj->lpVtbl->Release(pcls_obj);\n-    pcls_obj = NULL;\n-\n-    /* Retrieve a default allocation port.  This object will be later filled\n-     * with optional data to create an switch internal port. */\n-    hres = psvc->lpVtbl->ExecQuery(psvc,\n-                                   L\"WQL\",\n-                                   L\"SELECT * FROM \"\n-                                   L\"Msvm_EthernetPortAllocationSettingData \"\n-                                   L\"WHERE InstanceID LIKE '%%%%\\\\\\\\Default' \"\n-                                   L\"AND ResourceSubType = \"\n-                                   L\"'Microsoft:Hyper-V:Ethernet Connection'\",\n-                                   WBEM_FLAG_FORWARD_ONLY |\n-                                   WBEM_FLAG_RETURN_IMMEDIATELY,\n-                                   NULL,\n-                                   &penumerate);\n-\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-\n-    if (!get_first_element(penumerate, &default_settings_data)) {\n-        VLOG_WARN(\"Could not retrieve default allocation port object\");\n-        retval = false;\n-        goto error;\n-    }\n-    penumerate->lpVtbl->Release(penumerate);\n-    penumerate = NULL;\n-\n-    /* Retrieve the default computer system on which the port allocation will\n-     * be hosted.\n-     * Instead of querying using Description, we can query using InstallDate.\n-     * From MSDN documentation regarding InstallDate:\n-     * The date and time the virtual machine configuration was created for\n-     * a virtual machine, or Null, for a management operating system. */\n-    hres = psvc->lpVtbl->ExecQuery(psvc,\n-                                   L\"WQL\",\n-                                   L\"SELECT * FROM Msvm_ComputerSystem WHERE \"\n-                                   L\"InstallDate is NULL\",\n-                                   WBEM_FLAG_FORWARD_ONLY |\n-                                   WBEM_FLAG_RETURN_IMMEDIATELY,\n-                                   NULL,\n-                                   &penumerate);\n-\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-\n-    if (!get_first_element(penumerate, &default_system)) {\n-        VLOG_WARN(\"Could not retrieve default computer system object\");\n-        retval = false;\n-        goto error;\n-    }\n-\n-    hres = default_system->lpVtbl->Get(default_system, L\"__PATH\",\n-                                       0, &vt_prop, 0, 0);\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-    penumerate->lpVtbl->Release(penumerate);\n-    penumerate = NULL;\n-\n-    count[0] = 0;\n-    hres = SafeArrayPutElement(psa, count, vt_prop.bstrVal);\n-\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-\n-    VariantClear(&vt_prop);\n-    variant_array.vt = VT_ARRAY | VT_BSTR;\n-    variant_array.parray = psa;\n-    hres = default_settings_data->lpVtbl->Put(default_settings_data,\n-                                              L\"HostResource\", 0,\n-                                              &variant_array, 0);\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-\n-    hres = psvc->lpVtbl->GetObject(psvc,\n-                                   L\"Msvm_VirtualEthernetSwitchManagementService\",\n-                                   0, NULL, &pclass, NULL);\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-\n-    hres = pclass->lpVtbl->GetMethod(pclass, L\"AddResourceSettings\", 0,\n-                                     &pinput_params, NULL);\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-\n-    hres = pinput_params->lpVtbl->SpawnInstance(pinput_params, 0,\n-                                                &pclass_instance);\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-\n-    /* Store the switch setting path retrieved above in the affected\n-     * configuration field of the class instance. */\n-    hres = pclass_instance->lpVtbl->Put(pclass_instance,\n-                                        L\"AffectedConfiguration\", 0,\n-                                        &switch_setting_path, 0);\n-\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-\n-    /* Store the port name in the ElementName field of the default allocation\n-     * data. */\n-    vt_prop.vt = VT_BSTR;\n-    vt_prop.bstrVal = SysAllocString(wide_name);\n-    hres = default_settings_data->lpVtbl->Put(default_settings_data,\n-                                              L\"ElementName\", 0,\n-                                              &vt_prop, 0);\n-    VariantClear(&vt_prop);\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-\n-    /* Retrieve and store the serialized data of the modified default switch\n-     * settings data. */\n-    hres = CoCreateInstance(&CLSID_WbemObjectTextSrc,\n-                            NULL,\n-                            CLSCTX_INPROC_SERVER,\n-                            &IID_IWbemObjectTextSrc,\n-                            (void**)&text_object);\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-\n-    hres = text_object->lpVtbl->GetText(text_object, 0,\n-                                        default_settings_data,\n-                                        WMI_OBJ_TEXT_WMI_DTD_2_0,\n-                                        pcontext,\n-                                        &text_object_string);\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-    hres = SafeArrayDestroy(psa);\n-    if (FAILED(hres)) {\n-        VLOG_WARN(\"Could not clear the data of the array\");\n-        retval = false;\n-        goto error;\n-    }\n-\n-    psa = SafeArrayCreateVector(VT_BSTR, 0, 1);\n-\n-    if (psa == NULL) {\n-        VLOG_WARN(\"Could not allocate memory for a SAFEARRAY\");\n-        retval = false;\n-        goto error;\n-    }\n-\n-    count[0] = 0;\n-    variant_array.parray = psa;\n-    hres = SafeArrayPutElement(psa, count, text_object_string);\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-    hres = pclass_instance->lpVtbl->Put(pclass_instance, L\"ResourceSettings\",\n-                                        0, &variant_array, 0);\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-\n-    /* Get the object of the switch service. */\n-    hres = psvc->lpVtbl->ExecQuery(psvc,\n-                                   L\"WQL\",\n-                                   L\"SELECT * FROM \"\n-                                   L\"Msvm_VirtualEthernetSwitchManagementService\",\n-                                   WBEM_FLAG_FORWARD_ONLY |\n-                                   WBEM_FLAG_RETURN_IMMEDIATELY,\n-                                   NULL,\n-                                   &penumerate);\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-\n-    if (!get_first_element(penumerate, &pcls_obj)) {\n-        VLOG_WARN(\"Could not get the object of the switch service\");\n-        retval = false;\n-        goto error;\n-    }\n-    penumerate->lpVtbl->Release(penumerate);\n-    penumerate = NULL;\n-\n-    hres = pcls_obj->lpVtbl->Get(pcls_obj, L\"__PATH\", 0, &vt_prop, 0, 0);\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-    pcls_obj->lpVtbl->Release(pcls_obj);\n-    pcls_obj = NULL;\n-\n-    /* Try to add the port to the switch. */\n-    hres = psvc->lpVtbl->ExecMethod(psvc, vt_prop.bstrVal,\n-                                    L\"AddResourceSettings\", 0,\n-                                    pcontext, pclass_instance, &pout_params,\n-                                    NULL);\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-\n-    unsigned int retvalue = 0;\n-    hres = get_uint_value(pout_params, L\"ReturnValue\", &retvalue);\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-\n-    if (retvalue != 0 && retvalue != job_wait) {\n-        retval = false;\n-        goto error;\n-    }\n-\n-    if (retvalue == job_wait) {\n-        WCHAR job_path[2048];\n-        hres = get_str_value(pout_params, L\"Job\", job_path,\n-                             sizeof(job_path) / sizeof(WCHAR));\n-        if (FAILED(hres)) {\n-            retval = false;\n-            goto error;\n-        }\n-        hres = wait_for_job(psvc, job_path);\n-        if (FAILED(hres)) {\n-            retval = false;\n-            goto error;\n-        }\n-    }\n-\n-    pclass->lpVtbl->Release(pclass);\n-    pclass = NULL;\n-    pclass_instance->lpVtbl->Release(pclass_instance);\n-    pclass_instance = NULL;\n-    pinput_params->lpVtbl->Release(pinput_params);\n-    pinput_params = NULL;\n-    psvc->lpVtbl->Release(psvc);\n-    psvc = NULL;\n-    VariantClear(&vt_prop);\n-\n-    if (!connect_set_security(ploc, pcontext, L\"Root\\\\StandardCimv2\",\n-                              &psvc)) {\n-        VLOG_WARN(\"Could not connect and set security for CIM\");\n-        retval = false;\n-        goto error;\n-    }\n-\n-    wcscpy_s(internal_port_query, WMI_QUERY_COUNT,\n-             L\"SELECT * FROM MSFT_NetAdapter WHERE Name LIKE '%%\");\n-    wcscat_s(internal_port_query, WMI_QUERY_COUNT, wide_name);\n-    wcscat_s(internal_port_query, WMI_QUERY_COUNT, L\"%%'\");\n-\n-    /* Get the object with the port name equal to name on the CIM. */\n-    hres = psvc->lpVtbl->ExecQuery(psvc,\n-                                   L\"WQL\",\n-                                   internal_port_query,\n-                                   WBEM_FLAG_FORWARD_ONLY |\n-                                   WBEM_FLAG_RETURN_IMMEDIATELY,\n-                                   NULL,\n-                                   &penumerate);\n-\n-    if (!get_first_element(penumerate, &pcls_obj)) {\n-        VLOG_WARN(\"Element name: %s not found in CIM\", name);\n-        retval = false;\n-        goto error;\n-    }\n-    penumerate->lpVtbl->Release(penumerate);\n-    penumerate = NULL;\n-    pcls_obj->lpVtbl->Get(pcls_obj, L\"__PATH\", 0, &vt_prop, 0, 0);\n-    pcls_obj->lpVtbl->Release(pcls_obj);\n-    pcls_obj = NULL;\n-\n-    /* Disable the adapter with port name equal with name. */\n-    hres = psvc->lpVtbl->ExecMethod(psvc, vt_prop.bstrVal, L\"Disable\", 0,\n-                                    pcontext, NULL, NULL, NULL);\n-\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-\n-    hres = psvc->lpVtbl->GetObject(psvc, L\"MSFT_NetAdapter\", 0, NULL, &pclass,\n-                                   NULL);\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-\n-    hres = pclass->lpVtbl->GetMethod(pclass, L\"Rename\", 0, &pinput_params,\n-                                     NULL);\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-\n-    hres = pinput_params->lpVtbl->SpawnInstance(pinput_params, 0,\n-                                                &pclass_instance);\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-\n-    VariantInit(&new_name);\n-    new_name.vt = VT_BSTR;\n-    new_name.bstrVal = wide_name;\n-    hres = pclass_instance->lpVtbl->Put(pclass_instance, L\"NewName\", 0,\n-                                        &new_name, 0);\n-    if (FAILED(hres)) {\n-        retval = false;\n-        goto error;\n-    }\n-    hres = psvc->lpVtbl->ExecMethod(psvc, vt_prop.bstrVal, L\"Rename\", 0,\n-                                    pcontext, pclass_instance, NULL, NULL);\n-    if (FAILED(hres)) {\n-        retval = false;\n-    }\n-\n-error:\n-    if (text_object_string != NULL) {\n-        SysFreeString(text_object_string);\n-        text_object_string = NULL;\n-    }\n-    if (psa != NULL) {\n-        SafeArrayDestroy(psa);\n-        psa = NULL;\n-    }\n-    if (ploc != NULL) {\n-        ploc->lpVtbl->Release(ploc);\n-        ploc = NULL;\n-    }\n-    if (pcontext != NULL) {\n-        pcontext->lpVtbl->Release(pcontext);\n-        pcontext = NULL;\n-    }\n-    if (psvc != NULL) {\n-        psvc->lpVtbl->Release(psvc);\n-        psvc = NULL;\n-    }\n-    if (penumerate != NULL) {\n-        penumerate->lpVtbl->Release(penumerate);\n-        penumerate = NULL;\n-    }\n-    if (default_settings_data != NULL) {\n-        default_settings_data->lpVtbl->Release(default_settings_data);\n-        default_settings_data = NULL;\n-    }\n-    if (default_system != NULL) {\n-        default_system->lpVtbl->Release(default_system);\n-        default_system = NULL;\n-    }\n-    if (pcls_obj != NULL) {\n-        pcls_obj->lpVtbl->Release(pcls_obj);\n-        pcls_obj = NULL;\n-    }\n-    if (pclass != NULL) {\n-        pclass->lpVtbl->Release(pclass);\n-        pclass = NULL;\n-    }\n-    if (pinput_params != NULL) {\n-        pinput_params->lpVtbl->Release(pinput_params);\n-        pinput_params = NULL;\n-    }\n-    if (pclass_instance != NULL) {\n-        pclass_instance->lpVtbl->Release(pclass_instance);\n-        pclass_instance = NULL;\n-    }\n-    if (text_object != NULL) {\n-        text_object->lpVtbl->Release(text_object);\n-        text_object = NULL;\n-    }\n-    if (pout_params != NULL) {\n-        pout_params->lpVtbl->Release(pout_params);\n-        pout_params = NULL;\n-    }\n-    if (wide_name != NULL) {\n-        free(wide_name);\n-        wide_name = NULL;\n-    }\n-    VariantClear(&vt_prop);\n-    VariantClear(&switch_setting_path);\n-\n-    if (!retval) {\n-        get_hres_error(hres);\n-    }\n-    CoUninitialize();\n-    return retval;\n-}\ndiff --git a/lib/wmi.h b/lib/wmi.h\ndeleted file mode 100644\nindex 28910e783..000000000\n--- a/lib/wmi.h\n+++ /dev/null\n@@ -1,51 +0,0 @@\n-/*\n- * Copyright (c) 2016 Cloudbase Solutions Srl\n- *\n- * Licensed under the Apache License, Version 2.0 (the \"License\");\n- * you may not use this file except in compliance with the License.\n- * You may obtain a copy of the License at\n- *\n- *     http://www.apache.org/licenses/LICENSE-2.0\n- *\n- * Unless required by applicable law or agreed to in writing, software\n- * distributed under the License is distributed on an \"AS IS\" BASIS,\n- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n- * See the License for the specific language governing permissions and\n- * limitations under the License.\n- */\n-\n-#ifndef WMI_H\n-#define WMI_H 1\n-\n-#include <windefs.h>\n-#include <Wbemidl.h>\n-\n-static inline void fill_context(IWbemContext *pContext)\n-{\n-    VARIANT var;\n-\n-    /* IncludeQualifiers. */\n-    VariantInit(&var);\n-    var.vt = VT_BOOL;\n-    var.boolVal = VARIANT_TRUE;\n-    pContext->lpVtbl->SetValue(pContext, L\"IncludeQualifiers\", 0, &var);\n-    VariantClear(&var);\n-\n-    VariantInit(&var);\n-    var.vt = VT_I4;\n-    var.lVal = 0;\n-    pContext->lpVtbl->SetValue(pContext, L\"PathLevel\", 0, &var);\n-    VariantClear(&var);\n-\n-    /* ExcludeSystemProperties. */\n-    VariantInit(&var);\n-    var.vt = VT_BOOL;\n-    var.boolVal = VARIANT_FALSE;\n-    pContext->lpVtbl->SetValue(pContext, L\"ExcludeSystemProperties\", 0, &var);\n-    VariantClear(&var);\n-}\n-\n-boolean create_wmi_port(char *name);\n-boolean delete_wmi_port(char *name);\n-\n-#endif /* wmi.h */\ndiff --git a/m4/ax_check_openssl.m4 b/m4/ax_check_openssl.m4\nindex faa5babde..9fbdf9eb1 100644\n--- a/m4/ax_check_openssl.m4\n+++ b/m4/ax_check_openssl.m4\n@@ -80,14 +80,8 @@ AC_DEFUN([AX_CHECK_OPENSSL], [\n             if test -f \"$ssldir/include/openssl/ssl.h\"; then\n                 SSL_INCLUDES=\"-I$ssldir/include\"\n                 SSL_LDFLAGS=\"-L$ssldir/lib\"\n-                if test \"$WIN32\" = \"yes\"; then\n-                    SSL_LDFLAGS=\"$SSL_LDFLAGS -L$ssldir/lib/VC/x64/MT\"\n-                    SSL_LIBS=\"-llibssl -llibcrypto\"\n-                    SSL_DIR=/$(echo ${ssldir} | ${SED} -e 's/://')\n-                else\n-                    SSL_LIBS=\"-lssl -lcrypto\"\n-                    SSL_DIR=\"$ssldir\"\n-                fi\n+                SSL_LIBS=\"-lssl -lcrypto\"\n+                SSL_DIR=\"$ssldir\"\n                 found=true\n                 AC_MSG_RESULT([yes])\n                 break\ndiff --git a/m4/openvswitch.m4 b/m4/openvswitch.m4\nindex ddff0cada..0d329dcf2 100644\n--- a/m4/openvswitch.m4\n+++ b/m4/openvswitch.m4\n@@ -88,77 +88,6 @@ AC_DEFUN([OVS_CHECK_USDT], [\n   AM_CONDITIONAL([HAVE_USDT_PROBES], [test $usdt = true])\n ])\n \n-dnl Checks for MSVC x64 compiler.\n-AC_DEFUN([OVS_CHECK_WIN64],\n-  [AC_CACHE_CHECK(\n-    [for MSVC x64 compiler],\n-    [cl_cv_x64],\n-    [dnl \"cl\" writes x64 output to stdin:\n-     if (cl) 2>&1 | grep 'x64' >/dev/null 2>&1; then\n-       cl_cv_x64=yes\n-       MSVC64_LDFLAGS=\" /MACHINE:X64 \"\n-       MSVC_PLATFORM=\"x64\"\n-     else\n-       cl_cv_x64=no\n-       MSVC64_LDFLAGS=\"\"\n-       MSVC_PLATFORM=\"x86\"\n-     fi])\n-     AC_SUBST([MSVC64_LDFLAGS])\n-     AC_SUBST([MSVC_PLATFORM])\n-])\n-\n-dnl Checks for WINDOWS.\n-AC_DEFUN([OVS_CHECK_WIN32],\n-  [AC_CHECK_HEADER([windows.h],\n-                   [WIN32=yes],\n-                   [WIN32=no])\n-   AM_CONDITIONAL([WIN32], [test \"$WIN32\" = yes])\n-   if test \"$WIN32\" = yes; then\n-      AC_ARG_WITH([pthread],\n-         [AS_HELP_STRING([--with-pthread=DIR],\n-            [root of the pthread-win32 directory])],\n-         [\n-            case \"$withval\" in\n-            \"\" | y | ye | yes | n | no)\n-            AC_MSG_ERROR([Invalid --with-pthread value])\n-              ;;\n-            *)\n-            PTHREAD_WIN32_DIR=$withval/lib\n-            PTHREAD_WIN32_DIR_DLL=/$(echo ${withval} | ${SED} -e 's/://')/bin\n-            PTHREAD_WIN32_DIR_DLL_WIN_FORM=$withval/bin\n-            PTHREAD_INCLUDES=-I$withval/include\n-            PTHREAD_LDFLAGS=-L$PTHREAD_WIN32_DIR\n-            PTHREAD_LIBS=\"-lpthreadVC3\"\n-            AC_SUBST([PTHREAD_WIN32_DIR_DLL_WIN_FORM])\n-            AC_SUBST([PTHREAD_WIN32_DIR_DLL])\n-            AC_SUBST([PTHREAD_INCLUDES])\n-            AC_SUBST([PTHREAD_LDFLAGS])\n-            AC_SUBST([PTHREAD_LIBS])\n-              ;;\n-            esac\n-         ], [\n-            AC_MSG_ERROR([pthread directory not specified])\n-         ]\n-      )\n-      AC_ARG_WITH([debug],\n-         [AS_HELP_STRING([--with-debug],\n-            [Build without compiler optimizations])],\n-         [\n-            MSVC_CFLAGS=\"-O0\"\n-            AC_SUBST([MSVC_CFLAGS])\n-         ], [\n-            MSVC_CFLAGS=\"-O2\"\n-            AC_SUBST([MSVC_CFLAGS])\n-         ]\n-      )\n-\n-      AC_DEFINE([WIN32], [1], [Define to 1 if building on WIN32.])\n-      AC_CHECK_TYPES([struct timespec], [], [], [[#include <time.h>]])\n-      AH_BOTTOM([#ifdef WIN32\n-#include \"include/windows/windefs.h\"\n-#endif])\n-   fi])\n-\n dnl Checks for Netlink support.\n AC_DEFUN([OVS_CHECK_NETLINK],\n   [AC_CHECK_HEADER([linux/netlink.h],\ndiff --git a/ofproto/automake.mk b/ofproto/automake.mk\nindex cb1361b8a..42f3d6706 100644\n--- a/ofproto/automake.mk\n+++ b/ofproto/automake.mk\n@@ -59,9 +59,6 @@ ofproto_libofproto_la_SOURCES = \\\n ofproto_libofproto_la_CPPFLAGS = $(AM_CPPFLAGS)\n ofproto_libofproto_la_CFLAGS = $(AM_CFLAGS)\n ofproto_libofproto_la_LIBADD = lib/libsflow.la\n-if WIN32\n-ofproto_libofproto_la_LIBADD += ${PTHREAD_LIBS}\n-endif\n \n pkgconfig_DATA += \\\n \tofproto/libofproto.pc\ndiff --git a/ovsdb/log.c b/ovsdb/log.c\nindex 86d6bdc24..6d75427cf 100644\n--- a/ovsdb/log.c\n+++ b/ovsdb/log.c\n@@ -86,16 +86,6 @@ struct ovsdb_log {\n     struct afsync *afsync;\n };\n \n-/* Whether the OS supports renaming open files.\n- *\n- * (Making this a variable makes it easier to test both strategies on Unix-like\n- * systems.) */\n-#ifdef _WIN32\n-static bool rename_open_files = false;\n-#else\n-static bool rename_open_files = true;\n-#endif\n-\n static bool parse_header(char *header, const char **magicp,\n                          unsigned long int *length,\n                          uint8_t sha1[SHA1_DIGEST_SIZE]);\n@@ -181,7 +171,6 @@ ovsdb_log_open(const char *name, const char *magic,\n         break;\n \n     case OVSDB_LOG_CREATE_EXCL:\n-#ifndef _WIN32\n         if (stat(name, &s) == -1 && errno == ENOENT\n             && lstat(name, &s) == 0 && S_ISLNK(s.st_mode)) {\n             /* 'name' is a dangling symlink.  We want to create the file that\n@@ -192,9 +181,6 @@ ovsdb_log_open(const char *name, const char *magic,\n         } else {\n             flags = O_RDWR | O_CREAT | O_EXCL;\n         }\n-#else\n-        flags = O_RDWR | O_CREAT | O_EXCL;\n-#endif\n         break;\n \n     case OVSDB_LOG_CREATE:\n@@ -204,9 +190,6 @@ ovsdb_log_open(const char *name, const char *magic,\n     default:\n         OVS_NOT_REACHED();\n     }\n-#ifdef _WIN32\n-    flags = flags | O_BINARY;\n-#endif\n     /* Special case for /dev/stdin to make it work even if the operating system\n      * doesn't support it under that name. */\n     if (!strcmp(name, \"/dev/stdin\") && open_mode == OVSDB_LOG_READ_ONLY) {\n@@ -770,14 +753,7 @@ ovsdb_log_replace_start(struct ovsdb_log *old,\n static struct ovsdb_error * OVS_WARN_UNUSED_RESULT\n ovsdb_rename(const char *old, const char *new)\n {\n-#ifdef _WIN32\n-    /* Avoid rename() because it fails if the destination exists. */\n-    int error = (MoveFileEx(old, new, MOVEFILE_REPLACE_EXISTING\n-                            | MOVEFILE_WRITE_THROUGH | MOVEFILE_COPY_ALLOWED)\n-                 ? 0 : EACCES);\n-#else\n     int error = rename(old, new) ? errno : 0;\n-#endif\n \n     return (error\n             ? ovsdb_io_error(error, \"failed to rename \\\"%s\\\" to \\\"%s\\\"\",\n@@ -796,33 +772,12 @@ ovsdb_log_replace_commit(struct ovsdb_log *old, struct ovsdb_log *new)\n \n     /* Replace original file by the temporary file.\n      *\n-     * We support two strategies:\n-     *\n-     *     - The preferred strategy is to rename the temporary file over the\n-     *       original one in-place, then close the original one.  This works on\n-     *       Unix-like systems.  It does not work on Windows, which does not\n-     *       allow open files to be renamed.  The approach has the advantage\n-     *       that, at any point, we can drop back to something that already\n-     *       works.\n+     * Rename the temporary file over the original one in-place, then close\n+     * the original one.  This works on Unix-like systems.  At any point, we\n+     * can drop back to something that already works.\n      *\n-     *     - Alternatively, we can close both files, rename, then open the new\n-     *       file (which now has the original name).  This works on all\n-     *       systems, but if reopening the file fails then 'old' is broken.\n-     *\n-     * We make the strategy a variable instead of an #ifdef to make it easier\n-     * to test both strategies on Unix-like systems, and to make the code\n-     * easier to read. */\n-    if (!rename_open_files) {\n-        fclose(old->stream);\n-        old->stream = NULL;\n-\n-        fclose(new->stream);\n-        new->stream = NULL;\n-    }\n-\n-    /* Rename 'old' to 'new'.  We dereference the old name because, if it is a\n-     * symlink, we want to replace the referent of the symlink instead of the\n-     * symlink itself. */\n+     * We dereference the old name because, if it is a symlink, we want to\n+     * replace the referent of the symlink instead of the symlink itself. */\n     char *deref_name = follow_symlinks(old->name);\n     error = ovsdb_rename(new->name, deref_name);\n     free(deref_name);\n@@ -831,26 +786,11 @@ ovsdb_log_replace_commit(struct ovsdb_log *old, struct ovsdb_log *new)\n         ovsdb_log_replace_abort(new);\n         return error;\n     }\n-    if (rename_open_files) {\n-        fsync_parent_dir(old->name);\n-        fclose(old->stream);\n-        old->stream = new->stream;\n-        new->stream = NULL;\n-    } else {\n-        old->stream = fopen(old->name, \"r+b\");\n-        if (!old->stream) {\n-            old->error = ovsdb_io_error(errno, \"%s: could not reopen log\",\n-                                        old->name);\n-            old->state = OVSDB_LOG_BROKEN;\n-            return ovsdb_error_clone(old->error);\n-        }\n \n-        if (fseek(old->stream, new->offset, SEEK_SET)) {\n-            old->error = ovsdb_io_error(errno, \"%s: seek failed\", old->name);\n-            old->state = OVSDB_LOG_BROKEN;\n-            return ovsdb_error_clone(old->error);\n-        }\n-    }\n+    fsync_parent_dir(old->name);\n+    fclose(old->stream);\n+    old->stream = new->stream;\n+    new->stream = NULL;\n \n     /* Replace 'old' by 'new' in memory.\n      *\n@@ -882,20 +822,12 @@ void\n ovsdb_log_replace_abort(struct ovsdb_log *new)\n {\n     if (new) {\n-        /* Unlink the new file, but only after we close it (because Windows\n-         * does not allow removing an open file). */\n-        char *name = xstrdup(new->name);\n+        /* Unlink and close the new file. */\n+        unlink(new->name);\n         ovsdb_log_close(new);\n-        unlink(name);\n-        free(name);\n     }\n }\n \n-void\n-ovsdb_log_disable_renaming_open_files(void)\n-{\n-    rename_open_files = false;\n-}\n \f\n struct afsync {\n     pthread_t thread;\ndiff --git a/ovsdb/ovsdb-client.c b/ovsdb/ovsdb-client.c\nindex 37cfa8b56..e098908ab 100644\n--- a/ovsdb/ovsdb-client.c\n+++ b/ovsdb/ovsdb-client.c\n@@ -246,7 +246,6 @@ main(int argc, char *argv[])\n     const struct ovsdb_client_command *command;\n     ovs_cmdl_proctitle_init(argc, argv);\n     set_program_name(argv[0]);\n-    service_start(&argc, &argv);\n     parse_options(argc, argv);\n     fatal_ignore_sigpipe();\n \n@@ -1958,20 +1957,6 @@ print_and_free_log_record(struct json *record)\n     json_destroy(record);\n }\n \n-static void\n-set_binary_mode(FILE *stream OVS_UNUSED)\n-{\n-#ifdef _WIN32\n-    fflush(stream);\n-    /* On Windows set binary mode on the file descriptor to avoid\n-     * translation (i.e. CRLF line endings). */\n-    if (_setmode(_fileno(stream), O_BINARY) == -1) {\n-        ovs_fatal(errno, \"could not set binary mode on fd %d\",\n-                  _fileno(stream));\n-    }\n-#endif\n-}\n-\n static void\n do_backup(struct jsonrpc *rpc, const char *database,\n           int argc OVS_UNUSED, char *argv[] OVS_UNUSED)\n@@ -1980,7 +1965,6 @@ do_backup(struct jsonrpc *rpc, const char *database,\n         ovs_fatal(0, \"not writing backup to a terminal; \"\n                   \"please redirect stdout to a file\");\n     }\n-    set_binary_mode(stdout);\n \n     /* Get schema. */\n     struct ovsdb_schema *schema = fetch_schema(rpc, database);\n@@ -2118,7 +2102,6 @@ do_restore(struct jsonrpc *rpc, const char *database,\n         ovs_fatal(0, \"not reading backup from a terminal; \"\n                   \"please redirect stdin from a file\");\n     }\n-    set_binary_mode(stdin);\n \n     struct ovsdb *backup = ovsdb_file_read(\"/dev/stdin\", false);\n     ovsdb_storage_close(backup->storage);\ndiff --git a/ovsdb/ovsdb-server.1.in b/ovsdb/ovsdb-server.1.in\nindex 23b8e6e9c..6341f1397 100644\n--- a/ovsdb/ovsdb-server.1.in\n+++ b/ovsdb/ovsdb-server.1.in\n@@ -15,7 +15,6 @@ ovsdb\\-server \\- Open vSwitch database server\n [\\fB\\-\\-config\\-file=\\fIfile\\fR]\n [\\fB\\-\\-run=\\fIcommand\\fR]\n .so lib/daemon-syn.man\n-.so lib/service-syn.man\n .so lib/vlog-syn.man\n .IP \"Active-backup options:\"\n [\\fB\\-\\-sync\\-from=\\fIserver\\fR]\n@@ -192,8 +191,6 @@ otherwise, it exits with exit code 1.\n This option can be useful where a database server is needed only to\n run a single command, e.g.:\n .B \"ovsdb\\-server \\-\\-remote=punix:socket \\-\\-run='ovsdb\\-client dump unix:socket Open_vSwitch'\"\n-.IP\n-This option is not supported on Windows platform.\n .SS \"Daemon Options\"\n .ds DD \\\n \\fBovsdb\\-server\\fR detaches only after it starts listening on all \\\n@@ -202,8 +199,6 @@ databases are ready for use.  Clustered databases only become ready \\\n for use after they finish joining their clusters (which could have \\\n already happened in previous runs of \\fBovsdb\\-server\\fR).\n .so lib/daemon.man\n-.SS \"Service Options\"\n-.so lib/service.man\n .SS \"Logging Options\"\n .so lib/vlog.man\n .SS \"Active-Backup Options\"\ndiff --git a/ovsdb/ovsdb-server.c b/ovsdb/ovsdb-server.c\nindex 2af62071e..af217476f 100644\n--- a/ovsdb/ovsdb-server.c\n+++ b/ovsdb/ovsdb-server.c\n@@ -402,9 +402,6 @@ main_loop(struct server_config *config,\n             poll_timer_wait_until(status_timer);\n         }\n         poll_block();\n-        if (should_service_stop()) {\n-            *exiting = true;\n-        }\n     }\n \n     free(remotes_error);\n@@ -745,7 +742,6 @@ main(int argc, char *argv[])\n \n     ovs_cmdl_proctitle_init(argc, argv);\n     set_program_name(argv[0]);\n-    service_start(&argc, &argv);\n     fatal_ignore_sigpipe();\n     process_init();\n     dns_resolve_init(true);\n@@ -920,7 +916,6 @@ main(int argc, char *argv[])\n     dns_resolve_destroy();\n     perf_counters_destroy();\n     cooperative_multitasking_destroy();\n-    service_stop();\n     return 0;\n }\n \n@@ -932,7 +927,6 @@ static bool\n is_already_open(struct server_config *server_config OVS_UNUSED,\n                 const char *filename OVS_UNUSED)\n {\n-#ifndef _WIN32\n     struct stat s;\n \n     if (!stat(filename, &s)) {\n@@ -950,7 +944,6 @@ is_already_open(struct server_config *server_config OVS_UNUSED,\n             }\n         }\n     }\n-#endif  /* !_WIN32 */\n \n     return false;\n }\n@@ -2650,9 +2643,7 @@ parse_options(int argc, char *argv[],\n     static const struct option long_options[] = {\n         {\"remote\",      required_argument, NULL, OPT_REMOTE},\n         {\"unixctl\",     required_argument, NULL, OPT_UNIXCTL},\n-#ifndef _WIN32\n         {\"run\",         required_argument, NULL, OPT_RUN},\n-#endif\n         {\"help\",        no_argument, NULL, 'h'},\n         {\"version\",     no_argument, NULL, 'V'},\n         DAEMON_LONG_OPTIONS,\ndiff --git a/ovsdb/ovsdb-tool.c b/ovsdb/ovsdb-tool.c\nindex ed35cf6e6..0fb144580 100644\n--- a/ovsdb/ovsdb-tool.c\n+++ b/ovsdb/ovsdb-tool.c\n@@ -420,9 +420,6 @@ compact_or_convert(const char *src_name_, const char *dst_name_,\n \n     /* Replace source. */\n     if (in_place) {\n-#ifdef _WIN32\n-        unlink(src_name);\n-#endif\n         if (rename(dst_name, src_name)) {\n             ovs_fatal(errno, \"failed to rename \\\"%s\\\" to \\\"%s\\\"\",\n                       dst_name, src_name);\ndiff --git a/python/automake.mk b/python/automake.mk\nindex 060d76cb7..f466ffd78 100644\n--- a/python/automake.mk\n+++ b/python/automake.mk\n@@ -26,7 +26,6 @@ ovs_pyfiles = \\\n \tpython/ovs/db/schema.py \\\n \tpython/ovs/db/types.py \\\n \tpython/ovs/fatal_signal.py \\\n-\tpython/ovs/fcntl_win.py \\\n \tpython/ovs/flow/__init__.py \\\n \tpython/ovs/flow/decoders.py \\\n \tpython/ovs/flow/filter.py \\\n@@ -51,8 +50,7 @@ ovs_pyfiles = \\\n \tpython/ovs/unixctl/server.py \\\n \tpython/ovs/util.py \\\n \tpython/ovs/version.py \\\n-\tpython/ovs/vlog.py \\\n-\tpython/ovs/winutils.py\n+\tpython/ovs/vlog.py\n \n ovs_pytests = \\\n \tpython/ovs/tests/test_decoders.py \\\ndiff --git a/python/ovs/daemon.py b/python/ovs/daemon.py\nindex 06ef92b78..2a9b83b69 100644\n--- a/python/ovs/daemon.py\n+++ b/python/ovs/daemon.py\n@@ -13,7 +13,9 @@\n # limitations under the License.\n \n import errno\n+import fcntl\n import os\n+import resource\n import signal\n import sys\n import time\n@@ -26,24 +28,11 @@ import ovs.timeval\n import ovs.util\n import ovs.vlog\n \n-if sys.platform != 'win32':\n-    import fcntl\n-    import resource\n-else:\n-    import ovs.winutils as winutils\n-    import ovs.fcntl_win as fcntl\n-    import pywintypes\n-    import subprocess\n-    import win32process\n-\n vlog = ovs.vlog.Vlog(\"daemon\")\n \n # --detach: Should we run in the background?\n _detach = False\n \n-# Running as the child process - Windows only.\n-_detached = False\n-\n # --pidfile: Name of pidfile (null if none).\n _pidfile = None\n \n@@ -109,16 +98,6 @@ def set_detach():\n     _detach = True\n \n \n-def set_detached(wp):\n-    \"\"\"Sets up a following call to daemonize() to fork a supervisory\n-    process to monitor the daemon and restart it if it dies due to\n-    an error signal. Used on Windows only.\"\"\"\n-    global _detached\n-    global _daemonize_fd\n-    _detached = True\n-    _daemonize_fd = int(wp)\n-\n-\n def get_detach():\n     \"\"\"Will daemonize() really detach?\"\"\"\n     return _detach\n@@ -144,11 +123,8 @@ def _make_pidfile():\n     pid = os.getpid()\n \n     # Create a temporary pidfile.\n-    if sys.platform != 'win32':\n-        tmpfile = \"%s.tmp%d\" % (_pidfile, pid)\n-        ovs.fatal_signal.add_file_to_unlink(tmpfile)\n-    else:\n-        tmpfile = \"%s\" % _pidfile\n+    tmpfile = \"%s.tmp%d\" % (_pidfile, pid)\n+    ovs.fatal_signal.add_file_to_unlink(tmpfile)\n \n     try:\n         # This is global to keep Python from garbage-collecting and\n@@ -172,48 +148,41 @@ def _make_pidfile():\n         _fatal(\"%s: write failed: %s\" % (tmpfile, e.strerror))\n \n     try:\n-        if sys.platform != 'win32':\n-            fcntl.lockf(file_handle, fcntl.LOCK_EX | fcntl.LOCK_NB)\n-        else:\n-            fcntl.lockf(file_handle, fcntl.LOCK_SH | fcntl.LOCK_NB)\n+        fcntl.lockf(file_handle, fcntl.LOCK_EX | fcntl.LOCK_NB)\n     except IOError as e:\n         _fatal(\"%s: fcntl failed: %s\" % (tmpfile, e.strerror))\n \n-    if sys.platform == 'win32':\n-        # Ensure that the pidfile will gets closed and deleted on exit.\n-        ovs.fatal_signal.add_file_to_close_and_unlink(_pidfile, file_handle)\n+    # Rename or link it to the correct name.\n+    if _overwrite_pidfile:\n+        try:\n+            os.rename(tmpfile, _pidfile)\n+        except OSError as e:\n+            _fatal(\"failed to rename \\\"%s\\\" to \\\"%s\\\" (%s)\"\n+                   % (tmpfile, _pidfile, e.strerror))\n     else:\n-        # Rename or link it to the correct name.\n-        if _overwrite_pidfile:\n+        while True:\n             try:\n-                os.rename(tmpfile, _pidfile)\n+                os.link(tmpfile, _pidfile)\n+                error = 0\n             except OSError as e:\n-                _fatal(\"failed to rename \\\"%s\\\" to \\\"%s\\\" (%s)\"\n-                       % (tmpfile, _pidfile, e.strerror))\n-        else:\n-            while True:\n-                try:\n-                    os.link(tmpfile, _pidfile)\n-                    error = 0\n-                except OSError as e:\n-                    error = e.errno\n-                if error == errno.EEXIST:\n-                    _check_already_running()\n-                elif error != errno.EINTR:\n-                    break\n-            if error:\n-                _fatal(\"failed to link \\\"%s\\\" as \\\"%s\\\" (%s)\"\n-                       % (tmpfile, _pidfile, os.strerror(error)))\n+                error = e.errno\n+            if error == errno.EEXIST:\n+                _check_already_running()\n+            elif error != errno.EINTR:\n+                break\n+        if error:\n+            _fatal(\"failed to link \\\"%s\\\" as \\\"%s\\\" (%s)\"\n+                   % (tmpfile, _pidfile, os.strerror(error)))\n \n-        # Ensure that the pidfile will get deleted on exit.\n-        ovs.fatal_signal.add_file_to_unlink(_pidfile)\n+    # Ensure that the pidfile will get deleted on exit.\n+    ovs.fatal_signal.add_file_to_unlink(_pidfile)\n \n-        # Delete the temporary pidfile if it still exists.\n-        if not _overwrite_pidfile:\n-            error = ovs.fatal_signal.unlink_file_now(tmpfile)\n-            if error:\n-                _fatal(\"%s: unlink failed (%s)\" % (\n-                    tmpfile, os.strerror(error)))\n+    # Delete the temporary pidfile if it still exists.\n+    if not _overwrite_pidfile:\n+        error = ovs.fatal_signal.unlink_file_now(tmpfile)\n+        if error:\n+            _fatal(\"%s: unlink failed (%s)\" % (\n+                tmpfile, os.strerror(error)))\n \n     global _pidfile_dev\n     global _pidfile_ino\n@@ -239,9 +208,6 @@ def _waitpid(pid, options):\n \n \n def _fork_and_wait_for_startup():\n-    if sys.platform == 'win32':\n-        return _fork_and_wait_for_startup_windows()\n-\n     try:\n         rfd, wfd = os.pipe()\n     except OSError as e:\n@@ -295,65 +261,7 @@ def _fork_and_wait_for_startup():\n     return pid\n \n \n-def _fork_and_wait_for_startup_windows():\n-    global _detached\n-    if _detached:\n-        # Running in child process\n-        ovs.timeval.postfork()\n-        return 0\n-\n-    \"\"\" close the log file, on Windows cannot be moved while the parent has\n-    a reference on it.\"\"\"\n-    vlog.close_log_file()\n-\n-    try:\n-        (rfd, wfd) = winutils.windows_create_pipe()\n-    except pywintypes.error as e:\n-        sys.stderr.write(\"pipe failed to create: %s\\n\" % e.strerror)\n-        sys.exit(1)\n-\n-    try:\n-        creationFlags = win32process.DETACHED_PROCESS\n-        args = (\"%s %s --pipe-handle=%ld\" % (\n-            sys.executable, \" \".join(sys.argv), int(wfd)))\n-        proc = subprocess.Popen(\n-            args=args,\n-            close_fds=False,\n-            shell=False,\n-            creationflags=creationFlags,\n-            stdout=sys.stdout,\n-            stderr=sys.stderr)\n-        pid = proc.pid\n-    except OSError as e:\n-        sys.stderr.write(\"CreateProcess failed (%s)\\n\" % os.strerror(e.errno))\n-        sys.exit(1)\n-\n-    # Running in parent process.\n-    winutils.win32file.CloseHandle(wfd)\n-    ovs.fatal_signal.fork()\n-\n-    error, s = winutils.windows_read_pipe(rfd, 1)\n-    if error:\n-        s = \"\"\n-\n-    if len(s) != 1:\n-        retval = proc.wait()\n-        if retval == 0:\n-            sys.stderr.write(\"fork child failed to signal startup\\n\")\n-        else:\n-            # Child exited with an error. Convey the same error to\n-            # our parent process as a courtesy.\n-            sys.exit(retval)\n-    winutils.win32file.CloseHandle(rfd)\n-\n-    return pid\n-\n-\n def _fork_notify_startup(fd):\n-    if sys.platform == 'win32':\n-        _fork_notify_startup_windows(fd)\n-        return\n-\n     if fd is not None:\n         error, bytes_written = ovs.socket_util.write_fully(fd, \"0\")\n         if error:\n@@ -362,31 +270,9 @@ def _fork_notify_startup(fd):\n         os.close(fd)\n \n \n-def _fork_notify_startup_windows(fd):\n-    if fd is not None:\n-        try:\n-            # Python 2 requires a string as second parameter, while\n-            # Python 3 requires a bytes-like object. b\"0\" fits for both\n-            # python versions.\n-            winutils.win32file.WriteFile(fd, b\"0\", None)\n-        except winutils.pywintypes.error as e:\n-            sys.stderr.write(\"could not write to pipe: %s\\n\" %\n-                             os.strerror(e.winerror))\n-            sys.exit(1)\n-\n-\n def _should_restart(status):\n     global RESTART_EXIT_CODE\n \n-    if sys.platform == 'win32':\n-        # The exit status is encoded in the high byte of the\n-        # 16-bit number 'status'.\n-        exit_status = status >> 8\n-\n-        if exit_status == RESTART_EXIT_CODE:\n-            return True\n-        return False\n-\n     if os.WIFEXITED(status) and os.WEXITSTATUS(status) == RESTART_EXIT_CODE:\n         return True\n \n@@ -412,7 +298,7 @@ def _monitor_daemon(daemon_pid):\n                           % (daemon_pid, ovs.process.status_msg(status)))\n \n             if _should_restart(status):\n-                if sys.platform != 'win32' and os.WCOREDUMP(status):\n+                if os.WCOREDUMP(status):\n                     # Disable further core dumps to save disk space.\n                     try:\n                         resource.setrlimit(resource.RLIMIT_CORE, (0, 0))\n@@ -467,9 +353,8 @@ def daemonize_start():\n             # Running in parent process.\n             sys.exit(0)\n \n-        if sys.platform != 'win32':\n-            # Running in daemon or monitor process.\n-            os.setsid()\n+        # Running in daemon or monitor process.\n+        os.setsid()\n \n     if _monitor:\n         saved_daemonize_fd = _daemonize_fd\n@@ -477,8 +362,7 @@ def daemonize_start():\n         if daemon_pid > 0:\n             # Running in monitor process.\n             _fork_notify_startup(saved_daemonize_fd)\n-            if sys.platform != 'win32':\n-                _close_standard_fds()\n+            _close_standard_fds()\n             _monitor_daemon(daemon_pid)\n         # Running in daemon process\n \n@@ -620,10 +504,6 @@ def add_args(parser):\n             help=\"Create pidfile (default %s).\" % pidfile)\n     group.add_argument(\"--overwrite-pidfile\", action=\"store_true\",\n             help=\"With --pidfile, start even if already running.\")\n-    if sys.platform == 'win32':\n-        group.add_argument(\"--pipe-handle\",\n-                           help=(\"With --pidfile, start even if \"\n-                                 \"already running.\"))\n \n \n def handle_args(args):\n@@ -632,10 +512,6 @@ def handle_args(args):\n     parent ArgumentParser should have been prepared by add_args() before\n     calling parse_args().\"\"\"\n \n-    if sys.platform == 'win32':\n-        if args.pipe_handle:\n-            set_detached(args.pipe_handle)\n-\n     if args.detach:\n         set_detach()\n \ndiff --git a/python/ovs/dns_resolve.py b/python/ovs/dns_resolve.py\nindex dbaf61154..304e50f61 100644\n--- a/python/ovs/dns_resolve.py\n+++ b/python/ovs/dns_resolve.py\n@@ -169,7 +169,7 @@ class DNSResolver:\n     def _set_resolv_conf(self):\n         filename = os.getenv(\"OVS_RESOLV_CONF\")\n         # The C lib checks that the file exists and also sets filename to\n-        # /etc/resolv.conf on non-Windows, but resolvconf already does this.\n+        # /etc/resolv.conf, but resolvconf already does this.\n         retval = self._ctx.resolvconf(filename)\n         if retval != 0:\n             location = filename or \"system default nameserver\"\ndiff --git a/python/ovs/fatal_signal.py b/python/ovs/fatal_signal.py\nindex 16a7e78a0..0eccb9e4c 100644\n--- a/python/ovs/fatal_signal.py\n+++ b/python/ovs/fatal_signal.py\n@@ -15,7 +15,6 @@\n import atexit\n import os\n import signal\n-import sys\n import threading\n \n import ovs.vlog\n@@ -62,8 +61,7 @@ def add_file_to_unlink(file):\n \n def add_file_to_close_and_unlink(file, fd=None):\n     \"\"\"Registers 'file' to be unlinked when the program terminates via\n-    sys.exit() or a fatal signal and the 'fd' to be closed. On Windows a file\n-    cannot be removed while it is open for writing.\"\"\"\n+    sys.exit() or a fatal signal and the 'fd' to be closed. \"\"\"\n     global _added_hook\n     if not _added_hook:\n         _added_hook = True\n@@ -90,8 +88,6 @@ def unlink_file_now(file):\n \n def _unlink_files():\n     for file_ in _files:\n-        if sys.platform == \"win32\" and _files[file_]:\n-            _files[file_].close()\n         _unlink(file_)\n \n \n@@ -144,11 +140,8 @@ def _init():\n     global _inited\n     if not _inited:\n         _inited = True\n-        if sys.platform == \"win32\":\n-            signals = [signal.SIGTERM, signal.SIGINT]\n-        else:\n-            signals = [signal.SIGTERM, signal.SIGINT, signal.SIGHUP,\n-                       signal.SIGALRM]\n+        signals = [signal.SIGTERM, signal.SIGINT, signal.SIGHUP,\n+                   signal.SIGALRM]\n \n         for signr in signals:\n             handler = signal.getsignal(signr)\n@@ -166,20 +159,4 @@ def signal_alarm(timeout):\n     if not timeout:\n         return\n \n-    if sys.platform == \"win32\":\n-        import time\n-\n-        class Alarm (threading.Thread):\n-            def __init__(self, timeout):\n-                super(Alarm, self).__init__()\n-                self.timeout = timeout\n-                self.setDaemon(True)\n-\n-            def run(self):\n-                time.sleep(self.timeout)\n-                os._exit(1)\n-\n-        alarm = Alarm(timeout)\n-        alarm.start()\n-    else:\n-        signal.alarm(timeout)\n+    signal.alarm(timeout)\ndiff --git a/python/ovs/fcntl_win.py b/python/ovs/fcntl_win.py\ndeleted file mode 100644\nindex a0ae970fe..000000000\n--- a/python/ovs/fcntl_win.py\n+++ /dev/null\n@@ -1,46 +0,0 @@\n-# Copyright (c) 2016 Cloudbase Solutions Srl\n-#\n-# Licensed under the Apache License, Version 2.0 (the \"License\");\n-# you may not use this file except in compliance with the License.\n-# You may obtain a copy of the License at:\n-#\n-#     http://www.apache.org/licenses/LICENSE-2.0\n-#\n-# Unless required by applicable law or agreed to in writing, software\n-# distributed under the License is distributed on an \"AS IS\" BASIS,\n-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n-# See the License for the specific language governing permissions and\n-# limitations under the License.\n-\n-import errno\n-\n-import msvcrt\n-\n-import pywintypes\n-\n-import win32con\n-\n-import win32file\n-\n-LOCK_EX = win32con.LOCKFILE_EXCLUSIVE_LOCK\n-LOCK_SH = 0  # the default\n-LOCK_NB = win32con.LOCKFILE_FAIL_IMMEDIATELY\n-LOCK_UN = 0x80000000  # unlock - non-standard\n-\n-\n-def lockf(fd, flags, length=0xFFFF0000, start=0, whence=0):\n-    overlapped = pywintypes.OVERLAPPED()\n-    hfile = msvcrt.get_osfhandle(fd.fileno())\n-    if LOCK_UN & flags:\n-        ret = win32file.UnlockFileEx(hfile, 0, start, length, overlapped)\n-    else:\n-        try:\n-            ret = win32file.LockFileEx(hfile, flags, start, length, overlapped)\n-        except:\n-            raise IOError(errno.EAGAIN, \"\", \"\")\n-\n-    return ret\n-\n-\n-def flock(fd, flags):\n-    lockf(fd, flags, 0xFFFF0000, 0, 0)\ndiff --git a/python/ovs/jsonrpc.py b/python/ovs/jsonrpc.py\nindex d9fe27aec..07b454a21 100644\n--- a/python/ovs/jsonrpc.py\n+++ b/python/ovs/jsonrpc.py\n@@ -15,7 +15,6 @@ import codecs\n import errno\n import os\n import random\n-import sys\n \n import ovs.json\n import ovs.poller\n@@ -274,11 +273,6 @@ class Connection(object):\n                     except UnicodeError:\n                         error = errno.EILSEQ\n                 if error:\n-                    if (sys.platform == \"win32\" and\n-                            error == errno.WSAEWOULDBLOCK):\n-                        # WSAEWOULDBLOCK would be the equivalent on Windows\n-                        # for EAGAIN on Unix.\n-                        error = errno.EAGAIN\n                     if error == errno.EAGAIN:\n                         return error, None\n                     else:\ndiff --git a/python/ovs/poller.py b/python/ovs/poller.py\nindex 157719c3a..12f40993f 100644\n--- a/python/ovs/poller.py\n+++ b/python/ovs/poller.py\n@@ -17,14 +17,10 @@ import os\n \n import select\n import socket\n-import sys\n \n import ovs.timeval\n import ovs.vlog\n \n-if sys.platform == \"win32\":\n-    import ovs.winutils as winutils\n-\n try:\n     import ssl\n except ImportError:\n@@ -76,9 +72,7 @@ class _SelectSelect(object):\n         if ssl and isinstance(fd, ssl.SSLSocket):\n             fd = fd.fileno()\n \n-        if sys.platform != 'win32':\n-            # Skip this on Windows, it also register events\n-            assert isinstance(fd, int)\n+        assert isinstance(fd, int)\n         if events & POLLIN:\n             self.rlist.append(fd)\n             events &= ~POLLIN\n@@ -93,61 +87,26 @@ class _SelectSelect(object):\n         # see https://github.com/eventlet/eventlet/pull/25\n         if timeout == 0 and _using_eventlet_green_select():\n             timeout = 0.1\n-        if sys.platform == 'win32':\n-            events = self.rlist + self.wlist + self.xlist\n-            if not events:\n-                return []\n-            if len(events) > winutils.win32event.MAXIMUM_WAIT_OBJECTS:\n-                raise WindowsError(\"Cannot handle more than maximum wait\"\n-                                   \"objects\\n\")\n-\n-            # win32event.INFINITE timeout is -1\n-            # timeout must be an int number, expressed in ms\n-            if timeout == 0.1:\n-                timeout = 100\n-            else:\n-                timeout = int(timeout)\n-\n-            # Wait until any of the events is set to signaled\n-            try:\n-                retval = winutils.win32event.WaitForMultipleObjects(\n-                    events,\n-                    False,  # Wait all\n-                    timeout)\n-            except winutils.pywintypes.error:\n-                return [(0, POLLERR)]\n-\n-            if retval == winutils.winerror.WAIT_TIMEOUT:\n-                return []\n-\n-            if events[retval] in self.rlist:\n-                revent = POLLIN\n-            elif events[retval] in self.wlist:\n-                revent = POLLOUT\n-            else:\n-                revent = POLLERR\n-\n-            return [(events[retval], revent)]\n+\n+        if timeout == -1:\n+            # epoll uses -1 for infinite timeout, select uses None.\n+            timeout = None\n         else:\n-            if timeout == -1:\n-                # epoll uses -1 for infinite timeout, select uses None.\n-                timeout = None\n-            else:\n-                timeout = float(timeout) / 1000\n-            rlist, wlist, xlist = select.select(self.rlist,\n-                                                self.wlist,\n-                                                self.xlist,\n-                                                timeout)\n-            events_dict = {}\n-            for fd in rlist:\n-                events_dict[fd] = events_dict.get(fd, 0) | POLLIN\n-            for fd in wlist:\n-                events_dict[fd] = events_dict.get(fd, 0) | POLLOUT\n-            for fd in xlist:\n-                events_dict[fd] = events_dict.get(fd, 0) | (POLLERR |\n-                                                            POLLHUP |\n-                                                            POLLNVAL)\n-            return list(events_dict.items())\n+            timeout = float(timeout) / 1000\n+        rlist, wlist, xlist = select.select(self.rlist,\n+                                            self.wlist,\n+                                            self.xlist,\n+                                            timeout)\n+        events_dict = {}\n+        for fd in rlist:\n+            events_dict[fd] = events_dict.get(fd, 0) | POLLIN\n+        for fd in wlist:\n+            events_dict[fd] = events_dict.get(fd, 0) | POLLOUT\n+        for fd in xlist:\n+            events_dict[fd] = events_dict.get(fd, 0) | (POLLERR |\n+                                                        POLLHUP |\n+                                                        POLLNVAL)\n+        return list(events_dict.items())\n \n \n SelectPoll = _SelectSelect\n@@ -231,8 +190,6 @@ class Poller(object):\n                 events = self.poll.poll(self.timeout)\n                 self.__log_wakeup(events)\n             except OSError as e:\n-                \"\"\" On Windows, the select function from poll raises OSError\n-                exception if the polled array is empty.\"\"\"\n                 if e.errno != errno.EINTR:\n                     vlog.err(\"poll: %s\" % os.strerror(e.errno))\n             except select.error as e:\ndiff --git a/python/ovs/socket_util.py b/python/ovs/socket_util.py\nindex a26298b75..da92c5615 100644\n--- a/python/ovs/socket_util.py\n+++ b/python/ovs/socket_util.py\n@@ -18,7 +18,6 @@ import os\n import os.path\n import random\n import socket\n-import sys\n \n from ovs import dns_resolve\n import ovs.fatal_signal\n@@ -30,10 +29,6 @@ try:\n except ImportError:\n     ssl = None\n \n-if sys.platform == 'win32':\n-    import ovs.winutils as winutils\n-    import win32file\n-\n vlog = ovs.vlog.Vlog(\"socket_util\")\n \n \n@@ -166,19 +161,8 @@ def make_unix_socket(style, nonblock, bind_path, connect_path, short=False):\n \n \n def check_connection_completion(sock):\n-    if sys.platform == \"win32\":\n-        p = ovs.poller.SelectPoll()\n-        event = winutils.get_new_event(None, False, True, None)\n-        # Receive notification of readiness for writing, of completed\n-        # connection or multipoint join operation, and of socket closure.\n-        win32file.WSAEventSelect(sock, event,\n-                                 win32file.FD_WRITE |\n-                                 win32file.FD_CONNECT |\n-                                 win32file.FD_CLOSE)\n-        p.register(event, ovs.poller.POLLOUT)\n-    else:\n-        p = ovs.poller.get_system_poll()\n-        p.register(sock, ovs.poller.POLLOUT)\n+    p = ovs.poller.get_system_poll()\n+    p.register(sock, ovs.poller.POLLOUT)\n     pfds = p.poll(0)\n     if len(pfds) == 1:\n         revents = pfds[0][1]\n@@ -310,8 +294,6 @@ def get_null_fd():\n     global null_fd\n     if null_fd < 0:\n         try:\n-            # os.devnull ensures compatibility with Windows, returns\n-            # '/dev/null' for Unix and 'nul' for Windows\n             null_fd = os.open(os.devnull, os.O_RDWR)\n         except OSError as e:\n             vlog.err(\"could not open %s: %s\" % (os.devnull,\ndiff --git a/python/ovs/stream.py b/python/ovs/stream.py\nindex 4b4b07d03..99502d254 100644\n--- a/python/ovs/stream.py\n+++ b/python/ovs/stream.py\n@@ -15,7 +15,6 @@\n import errno\n import os\n import socket\n-import sys\n \n import ovs.poller\n import ovs.socket_util\n@@ -26,13 +25,6 @@ try:\n except ImportError:\n     ssl = None\n \n-if sys.platform == 'win32':\n-    import ovs.winutils as winutils\n-    import pywintypes\n-    import win32event\n-    import win32file\n-    import win32pipe\n-\n vlog = ovs.vlog.Vlog(\"stream\")\n \n \n@@ -71,13 +63,6 @@ class Stream(object):\n     _SSL_certificate_file = None\n     _SSL_ca_cert_file = None\n \n-    # Windows only\n-    _write = None                # overlapped for write operation\n-    _read = None                 # overlapped for read operation\n-    _write_pending = False\n-    _read_pending = False\n-    _retry_connect = False\n-\n     @staticmethod\n     def register_method(method, cls):\n         Stream._SOCKET_METHODS[method + \":\"] = cls\n@@ -96,26 +81,8 @@ class Stream(object):\n         otherwise False.\"\"\"\n         return bool(Stream._find_method(name))\n \n-    def __init__(self, socket, name, status, pipe=None, is_server=False):\n+    def __init__(self, socket, name, status, is_server=False):\n         self.socket = socket\n-        self.pipe = pipe\n-        if sys.platform == 'win32':\n-            if pipe is not None:\n-                # Flag to check if fd is a server HANDLE.  In the case of a\n-                # server handle we have to issue a disconnect before closing\n-                # the actual handle.\n-                self._server = is_server\n-                suffix = name.split(\":\", 1)[1]\n-                suffix = ovs.util.abs_file_name(ovs.dirs.RUNDIR, suffix)\n-                self._pipename = winutils.get_pipe_name(suffix)\n-                self._read = pywintypes.OVERLAPPED()\n-                self._read.hEvent = winutils.get_new_event()\n-                self._write = pywintypes.OVERLAPPED()\n-                self._write.hEvent = winutils.get_new_event()\n-            else:\n-                self._wevent = winutils.get_new_event(bManualReset=False,\n-                                                      bInitialState=False)\n-\n         self.name = name\n         if status == errno.EAGAIN:\n             self.state = Stream.__S_CONNECTING\n@@ -157,37 +124,6 @@ class Stream(object):\n         suffix = name.split(\":\", 1)[1]\n         if name.startswith(\"unix:\"):\n             suffix = ovs.util.abs_file_name(ovs.dirs.RUNDIR, suffix)\n-            if sys.platform == 'win32':\n-                pipename = winutils.get_pipe_name(suffix)\n-\n-                if len(suffix) > 255:\n-                    # Return invalid argument if the name is too long\n-                    return errno.ENOENT, None\n-\n-                try:\n-                    # In case of \"unix:\" argument, the assumption is that\n-                    # there is a file created in the path (suffix).\n-                    open(suffix, 'r').close()\n-                except:\n-                    return errno.ENOENT, None\n-\n-                try:\n-                    npipe = winutils.create_file(pipename)\n-                    try:\n-                        winutils.set_pipe_mode(npipe,\n-                                               win32pipe.PIPE_READMODE_BYTE)\n-                    except pywintypes.error:\n-                        return errno.ENOENT, None\n-                except pywintypes.error as e:\n-                    if e.winerror == winutils.winerror.ERROR_PIPE_BUSY:\n-                        # Pipe is busy, set the retry flag to true and retry\n-                        # again during the connect function.\n-                        Stream.retry_connect = True\n-                        return 0, cls(None, name, errno.EAGAIN,\n-                                      pipe=win32file.INVALID_HANDLE_VALUE,\n-                                      is_server=False)\n-                    return errno.ENOENT, None\n-                return 0, cls(None, name, 0, pipe=npipe, is_server=False)\n \n         error, sock = cls._open(suffix, dscp)\n         if error:\n@@ -226,10 +162,6 @@ class Stream(object):\n                 deadline = ovs.timeval.msec() + timeout\n             while True:\n                 error = stream.connect()\n-                if sys.platform == 'win32' and error == errno.WSAEWOULDBLOCK:\n-                    # WSAEWOULDBLOCK would be the equivalent on Windows\n-                    # for EAGAIN on Unix.\n-                    error = errno.EAGAIN\n                 if error != errno.EAGAIN:\n                     break\n                 if deadline is not None and ovs.timeval.msec() > deadline:\n@@ -253,36 +185,11 @@ class Stream(object):\n     def close(self):\n         if self.socket is not None:\n             self.socket.close()\n-        if self.pipe is not None:\n-            if self._server:\n-                # Flush the pipe to allow the client to read the pipe\n-                # before disconnecting.\n-                win32pipe.FlushFileBuffers(self.pipe)\n-                win32pipe.DisconnectNamedPipe(self.pipe)\n-            winutils.close_handle(self.pipe, vlog.warn)\n-            winutils.close_handle(self._read.hEvent, vlog.warn)\n-            winutils.close_handle(self._write.hEvent, vlog.warn)\n \n     def __scs_connecting(self):\n         if self.socket is not None:\n             retval = self.check_connection_completion(self.socket)\n             assert retval != errno.EINPROGRESS\n-        elif sys.platform == 'win32':\n-            if self.retry_connect:\n-                try:\n-                    self.pipe = winutils.create_file(self._pipename)\n-                    self._retry_connect = False\n-                    retval = 0\n-                except pywintypes.error as e:\n-                    if e.winerror == winutils.winerror.ERROR_PIPE_BUSY:\n-                        retval = errno.EAGAIN\n-                    else:\n-                        self._retry_connect = False\n-                        retval = errno.ENOENT\n-            else:\n-                # If retry_connect is false, it means it's already\n-                # connected so we can set the value of retval to 0\n-                retval = 0\n \n         if retval == 0:\n             self.state = Stream.__S_CONNECTED\n@@ -334,60 +241,8 @@ class Stream(object):\n         elif n == 0:\n             return (0, \"\")\n \n-        if sys.platform == 'win32' and self.socket is None:\n-            return self.__recv_windows(n)\n-\n         return (0, self.socket.recv(n))\n \n-    def __recv_windows(self, n):\n-        if self._read_pending:\n-            try:\n-                nBytesRead = winutils.get_overlapped_result(self.pipe,\n-                                                            self._read,\n-                                                            False)\n-                self._read_pending = False\n-            except pywintypes.error as e:\n-                if e.winerror == winutils.winerror.ERROR_IO_INCOMPLETE:\n-                    # The operation is still pending, try again\n-                    self._read_pending = True\n-                    return (errno.EAGAIN, \"\")\n-                elif e.winerror in winutils.pipe_disconnected_errors:\n-                    # If the pipe was disconnected, return 0.\n-                    return (0, \"\")\n-                else:\n-                    return (errno.EINVAL, \"\")\n-        else:\n-            (errCode, self._read_buffer) = winutils.read_file(self.pipe,\n-                                                              n,\n-                                                              self._read)\n-            if errCode:\n-                if errCode == winutils.winerror.ERROR_IO_PENDING:\n-                    self._read_pending = True\n-                    return (errno.EAGAIN, \"\")\n-                elif errCode in winutils.pipe_disconnected_errors:\n-                    # If the pipe was disconnected, return 0.\n-                    return (0, \"\")\n-                else:\n-                    return (errCode, \"\")\n-\n-            try:\n-                nBytesRead = winutils.get_overlapped_result(self.pipe,\n-                                                            self._read,\n-                                                            False)\n-                winutils.win32event.SetEvent(self._read.hEvent)\n-            except pywintypes.error as e:\n-                if e.winerror in winutils.pipe_disconnected_errors:\n-                    # If the pipe was disconnected, return 0.\n-                    return (0, \"\")\n-                else:\n-                    return (e.winerror, \"\")\n-\n-        recvBuffer = self._read_buffer[:nBytesRead]\n-        # recvBuffer will have the type memoryview in Python3.\n-        # We can use bytes to convert it to type bytes which works on\n-        # both Python2 and Python3.\n-        return (0, bytes(recvBuffer))\n-\n     def send(self, buf):\n         \"\"\"Tries to send 'buf' on this stream.\n \n@@ -415,42 +270,8 @@ class Stream(object):\n         if isinstance(buf, str):\n             buf = buf.encode('utf-8')\n \n-        if sys.platform == 'win32' and self.socket is None:\n-            return self.__send_windows(buf)\n-\n         return self.socket.send(buf)\n \n-    def __send_windows(self, buf):\n-        if self._write_pending:\n-            try:\n-                nBytesWritten = winutils.get_overlapped_result(self.pipe,\n-                                                               self._write,\n-                                                               False)\n-                self._write_pending = False\n-            except pywintypes.error as e:\n-                if e.winerror == winutils.winerror.ERROR_IO_INCOMPLETE:\n-                    # The operation is still pending, try again\n-                    self._read_pending = True\n-                    return -errno.EAGAIN\n-                elif e.winerror in winutils.pipe_disconnected_errors:\n-                    # If the pipe was disconnected, return connection reset.\n-                    return -errno.ECONNRESET\n-                else:\n-                    return -errno.EINVAL\n-        else:\n-            (errCode, nBytesWritten) = winutils.write_file(self.pipe,\n-                                                           buf,\n-                                                           self._write)\n-            if errCode:\n-                if errCode == winutils.winerror.ERROR_IO_PENDING:\n-                    self._write_pending = True\n-                    return -errno.EAGAIN\n-                if (not nBytesWritten and\n-                        errCode in winutils.pipe_disconnected_errors):\n-                    # If the pipe was disconnected, return connection reset.\n-                    return -errno.ECONNRESET\n-        return nBytesWritten\n-\n     def run(self):\n         pass\n \n@@ -467,46 +288,11 @@ class Stream(object):\n         if self.state == Stream.__S_CONNECTING:\n             wait = Stream.W_CONNECT\n \n-        if sys.platform == 'win32':\n-            self.__wait_windows(poller, wait)\n-            return\n-\n         if wait == Stream.W_RECV:\n             poller.fd_wait(self.socket, ovs.poller.POLLIN)\n         else:\n             poller.fd_wait(self.socket, ovs.poller.POLLOUT)\n \n-    def __wait_windows(self, poller, wait):\n-        if self.socket is not None:\n-            if wait == Stream.W_RECV:\n-                mask = (win32file.FD_READ |\n-                        win32file.FD_ACCEPT |\n-                        win32file.FD_CLOSE)\n-                event = ovs.poller.POLLIN\n-            else:\n-                mask = (win32file.FD_WRITE |\n-                        win32file.FD_CONNECT |\n-                        win32file.FD_CLOSE)\n-                event = ovs.poller.POLLOUT\n-\n-            try:\n-                win32file.WSAEventSelect(self.socket,\n-                                         self._wevent,\n-                                         mask)\n-            except pywintypes.error as e:\n-                vlog.err(\"failed to associate events with socket: %s\"\n-                         % e.strerror)\n-            poller.fd_wait(self._wevent, event)\n-        else:\n-            if wait == Stream.W_RECV:\n-                if self._read:\n-                    poller.fd_wait(self._read.hEvent, ovs.poller.POLLIN)\n-            elif wait == Stream.W_SEND:\n-                if self._write:\n-                    poller.fd_wait(self._write.hEvent, ovs.poller.POLLOUT)\n-            elif wait == Stream.W_CONNECT:\n-                return\n-\n     def connect_wait(self, poller):\n         self.wait(poller, Stream.W_CONNECT)\n \n@@ -520,14 +306,6 @@ class Stream(object):\n         # Don't delete the file: we might have forked.\n         if self.socket is not None:\n             self.socket.close()\n-        if self.pipe is not None:\n-            # Check if there are any remaining valid handles and close them\n-            if self.pipe:\n-                winutils.close_handle(self.pipe)\n-            if self._read.hEvent:\n-                winutils.close_handle(self._read.hEvent)\n-            if self._write.hEvent:\n-                winutils.close_handle(self._write.hEvent)\n \n     @staticmethod\n     def ssl_set_private_key_file(file_name):\n@@ -543,10 +321,6 @@ class Stream(object):\n \n \n class PassiveStream(object):\n-    # Windows only\n-    connect = None                  # overlapped for read operation\n-    connect_pending = False\n-\n     @staticmethod\n     def needs_probes(name):\n         return False if name.startswith(\"punix:\") else True\n@@ -558,18 +332,9 @@ class PassiveStream(object):\n         \"punix:\" or \"ptcp\"), otherwise False.\"\"\"\n         return name.startswith(\"punix:\") | name.startswith(\"ptcp:\")\n \n-    def __init__(self, sock, name, bind_path, pipe=None):\n+    def __init__(self, sock, name, bind_path):\n         self.name = name\n-        self.pipe = pipe\n         self.socket = sock\n-        if pipe is not None:\n-            self.connect = pywintypes.OVERLAPPED()\n-            self.connect.hEvent = winutils.get_new_event()\n-            self.connect_pending = False\n-            suffix = name.split(\":\", 1)[1]\n-            suffix = ovs.util.abs_file_name(ovs.dirs.RUNDIR, suffix)\n-            self._pipename = winutils.get_pipe_name(suffix)\n-\n         self.bind_path = bind_path\n \n     @staticmethod\n@@ -588,27 +353,10 @@ class PassiveStream(object):\n         bind_path = None\n         if name.startswith(\"punix:\"):\n             bind_path = ovs.util.abs_file_name(ovs.dirs.RUNDIR, name[6:])\n-            if sys.platform != 'win32':\n-                error, sock = ovs.socket_util.make_unix_socket(\n-                    socket.SOCK_STREAM, True, bind_path, None)\n-                if error:\n-                    return error, None\n-            else:\n-                # Branch used only on Windows\n-                try:\n-                    open(bind_path, 'w').close()\n-                except:\n-                    return errno.ENOENT, None\n-\n-                pipename = winutils.get_pipe_name(bind_path)\n-                if len(pipename) > 255:\n-                    # Return invalid argument if the name is too long\n-                    return errno.ENOENT, None\n-\n-                npipe = winutils.create_named_pipe(pipename)\n-                if not npipe:\n-                    return errno.ENOENT, None\n-                return 0, PassiveStream(None, name, bind_path, pipe=npipe)\n+            error, sock = ovs.socket_util.make_unix_socket(\n+                socket.SOCK_STREAM, True, bind_path, None)\n+            if error:\n+                return error, None\n \n         elif name.startswith(\"ptcp:\"):\n             sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n@@ -632,9 +380,6 @@ class PassiveStream(object):\n         \"\"\"Closes this PassiveStream.\"\"\"\n         if self.socket is not None:\n             self.socket.close()\n-        if self.pipe is not None:\n-            winutils.close_handle(self.pipe, vlog.warn)\n-            winutils.close_handle(self.connect.hEvent, vlog.warn)\n         if self.bind_path is not None:\n             ovs.fatal_signal.unlink_file_now(self.bind_path)\n             self.bind_path = None\n@@ -647,80 +392,29 @@ class PassiveStream(object):\n \n         Will not block waiting for a connection.  If no connection is ready to\n         be accepted, returns (errno.EAGAIN, None) immediately.\"\"\"\n-        if sys.platform == 'win32' and self.socket is None:\n-            return self.__accept_windows()\n         while True:\n             try:\n                 sock, addr = self.socket.accept()\n                 ovs.socket_util.set_nonblocking(sock)\n-                if (sys.platform != 'win32' and sock.family == socket.AF_UNIX):\n+                if sock.family == socket.AF_UNIX:\n                     return 0, Stream(sock, \"unix:%s\" % addr, 0)\n                 return 0, Stream(sock, 'ptcp:%s:%s' % (addr[0],\n                                                        str(addr[1])), 0)\n             except socket.error as e:\n                 error = ovs.socket_util.get_exception_errno(e)\n-                if sys.platform == 'win32' and error == errno.WSAEWOULDBLOCK:\n-                    # WSAEWOULDBLOCK would be the equivalent on Windows\n-                    # for EAGAIN on Unix.\n-                    error = errno.EAGAIN\n                 if error != errno.EAGAIN:\n                     # XXX rate-limit\n                     vlog.dbg(\"accept: %s\" % os.strerror(error))\n                 return error, None\n \n-    def __accept_windows(self):\n-        if self.connect_pending:\n-            try:\n-                winutils.get_overlapped_result(self.pipe, self.connect, False)\n-            except pywintypes.error as e:\n-                if e.winerror == winutils.winerror.ERROR_IO_INCOMPLETE:\n-                    # The operation is still pending, try again\n-                    self.connect_pending = True\n-                    return errno.EAGAIN, None\n-                else:\n-                    if self.pipe:\n-                        win32pipe.DisconnectNamedPipe(self.pipe)\n-                    return errno.EINVAL, None\n-            self.connect_pending = False\n-\n-        error = winutils.connect_named_pipe(self.pipe, self.connect)\n-        if error:\n-            if error == winutils.winerror.ERROR_IO_PENDING:\n-                self.connect_pending = True\n-                return errno.EAGAIN, None\n-            elif error != winutils.winerror.ERROR_PIPE_CONNECTED:\n-                if self.pipe:\n-                    win32pipe.DisconnectNamedPipe(self.pipe)\n-                self.connect_pending = False\n-                return errno.EINVAL, None\n-            else:\n-                win32event.SetEvent(self.connect.hEvent)\n-\n-        npipe = winutils.create_named_pipe(self._pipename)\n-        if not npipe:\n-            return errno.ENOENT, None\n-\n-        old_pipe = self.pipe\n-        self.pipe = npipe\n-        winutils.win32event.ResetEvent(self.connect.hEvent)\n-        return 0, Stream(None, self.name, 0, pipe=old_pipe)\n-\n     def wait(self, poller):\n-        if sys.platform != 'win32' or self.socket is not None:\n+        if self.socket is not None:\n             poller.fd_wait(self.socket, ovs.poller.POLLIN)\n-        else:\n-            poller.fd_wait(self.connect.hEvent, ovs.poller.POLLIN)\n \n     def __del__(self):\n         # Don't delete the file: we might have forked.\n         if self.socket is not None:\n             self.socket.close()\n-        if self.pipe is not None:\n-            # Check if there are any remaining valid handles and close them\n-            if self.pipe:\n-                winutils.close_handle(self.pipe)\n-            if self._connect.hEvent:\n-                winutils.close_handle(self._read.hEvent)\n \n \n def usage(name):\ndiff --git a/python/ovs/unixctl/__init__.py b/python/ovs/unixctl/__init__.py\nindex b05f3df72..48cf349f8 100644\n--- a/python/ovs/unixctl/__init__.py\n+++ b/python/ovs/unixctl/__init__.py\n@@ -13,7 +13,6 @@\n # limitations under the License.\n \n import enum\n-import sys\n \n import ovs.util\n \n@@ -78,8 +77,7 @@ def command_register(name, usage, min_args, max_args, callback, aux):\n def socket_name_from_target(target):\n     assert isinstance(target, str)\n \n-    \"\"\" On Windows an absolute path contains ':' ( i.e: C:\\\\ ) \"\"\"\n-    if target.startswith('/') or target.find(':') > -1:\n+    if target.startswith('/'):\n         return 0, target\n \n     pidfile_name = \"%s/%s.pid\" % (ovs.dirs.RUNDIR, target)\n@@ -87,10 +85,7 @@ def socket_name_from_target(target):\n     if pid < 0:\n         return -pid, \"cannot read pidfile \\\"%s\\\"\" % pidfile_name\n \n-    if sys.platform == \"win32\":\n-        return 0, \"%s/%s.ctl\" % (ovs.dirs.RUNDIR, target)\n-    else:\n-        return 0, \"%s/%s.%d.ctl\" % (ovs.dirs.RUNDIR, target, pid)\n+    return 0, \"%s/%s.%d.ctl\" % (ovs.dirs.RUNDIR, target, pid)\n \n \n command_register(\"help\", \"\", 0, 0, _unixctl_help, None)\ndiff --git a/python/ovs/unixctl/server.py b/python/ovs/unixctl/server.py\nindex 9a58a38d5..55d5f1079 100644\n--- a/python/ovs/unixctl/server.py\n+++ b/python/ovs/unixctl/server.py\n@@ -16,7 +16,6 @@ import argparse\n import copy\n import errno\n import os\n-import sys\n \n import ovs.dirs\n import ovs.jsonrpc\n@@ -178,10 +177,6 @@ class UnixctlServer(object):\n     def run(self):\n         for _ in range(10):\n             error, stream = self._listener.accept()\n-            if sys.platform == \"win32\" and error == errno.WSAEWOULDBLOCK:\n-                # WSAEWOULDBLOCK would be the equivalent on Windows\n-                # for EAGAIN on Unix.\n-                error = errno.EAGAIN\n             if not error:\n                 rpc = ovs.jsonrpc.Connection(stream)\n                 self._conns.append(UnixctlConnection(rpc))\n@@ -223,13 +218,9 @@ class UnixctlServer(object):\n         if path is not None:\n             path = \"punix:%s\" % ovs.util.abs_file_name(ovs.dirs.RUNDIR, path)\n         else:\n-            if sys.platform == \"win32\":\n-                path = \"punix:%s/%s.ctl\" % (ovs.dirs.RUNDIR,\n-                                            ovs.util.PROGRAM_NAME)\n-            else:\n-                path = \"punix:%s/%s.%d.ctl\" % (ovs.dirs.RUNDIR,\n-                                               ovs.util.PROGRAM_NAME,\n-                                               os.getpid())\n+            path = \"punix:%s/%s.%d.ctl\" % (ovs.dirs.RUNDIR,\n+                                           ovs.util.PROGRAM_NAME,\n+                                           os.getpid())\n \n         if version is None:\n             version = ovs.version.VERSION\ndiff --git a/python/ovs/util.py b/python/ovs/util.py\nindex 3dba022f8..cb0574bfc 100644\n--- a/python/ovs/util.py\n+++ b/python/ovs/util.py\n@@ -29,10 +29,8 @@ def abs_file_name(dir_, file_name):\n     Returns None if 'dir_' is None and getcwd() fails.\n \n     This differs from os.path.abspath() in that it will never change the\n-    meaning of a file name.\n-\n-    On Windows an absolute path contains ':' ( i.e: C:\\\\ ) \"\"\"\n-    if file_name.startswith('/') or file_name.find(':') > -1:\n+    meaning of a file name.\"\"\"\n+    if file_name.startswith('/'):\n         return file_name\n     else:\n         if dir_ is None or dir_ == \"\":\ndiff --git a/python/ovs/vlog.py b/python/ovs/vlog.py\nindex 61f5928db..2805036fc 100644\n--- a/python/ovs/vlog.py\n+++ b/python/ovs/vlog.py\n@@ -240,14 +240,7 @@ class Vlog(object):\n                                      Vlog._unixctl_vlog_reopen, None)\n         ovs.unixctl.command_register(\"vlog/close\", \"\", 0, 0,\n                                      Vlog._unixctl_vlog_close, None)\n-        try:\n-            # Windows limitation on Python 2, sys.maxsize is a long number\n-            # on 64 bits environments, while sys.maxint is the maximum int\n-            # number. Python 3 works as expected.\n-            maxsize_int = sys.maxint\n-        except AttributeError:\n-            maxsize_int = sys.maxsize\n-        ovs.unixctl.command_register(\"vlog/set\", \"spec\", 1, maxsize_int,\n+        ovs.unixctl.command_register(\"vlog/set\", \"spec\", 1, sys.maxsize,\n                                      Vlog._unixctl_vlog_set, None)\n         ovs.unixctl.command_register(\"vlog/list\", \"\", 0, 0,\n                                      Vlog._unixctl_vlog_list, None)\n@@ -395,16 +388,6 @@ class Vlog(object):\n             Vlog.__file_handler = logging.FileHandler(Vlog.__log_file)\n             logger.addHandler(Vlog.__file_handler)\n \n-    @staticmethod\n-    def close_log_file():\n-        \"\"\"Closes the current log file. (This is useful on Windows, to ensure\n-        that a reference to the file is not kept by the daemon in case of\n-        detach.)\"\"\"\n-        if Vlog.__log_file:\n-            logger = logging.getLogger(\"file\")\n-            logger.removeHandler(Vlog.__file_handler)\n-            Vlog.__file_handler.close()\n-\n     @staticmethod\n     def _unixctl_vlog_reopen(conn, unused_argv, unused_aux):\n         if Vlog.__log_file:\n@@ -416,11 +399,8 @@ class Vlog(object):\n     @staticmethod\n     def _unixctl_vlog_close(conn, unused_argv, unused_aux):\n         if Vlog.__log_file:\n-            if sys.platform != 'win32':\n-                logger = logging.getLogger(\"file\")\n-                logger.removeHandler(Vlog.__file_handler)\n-            else:\n-                Vlog.close_log_file()\n+            logger = logging.getLogger(\"file\")\n+            logger.removeHandler(Vlog.__file_handler)\n         conn.reply(None)\n \n     @staticmethod\ndiff --git a/python/ovs/winutils.py b/python/ovs/winutils.py\ndeleted file mode 100644\nindex 8f3151a36..000000000\n--- a/python/ovs/winutils.py\n+++ /dev/null\n@@ -1,266 +0,0 @@\n-# Copyright (c) 2016 Cloudbase Solutions Srl\n-#\n-# Licensed under the Apache License, Version 2.0 (the \"License\");\n-# you may not use this file except in compliance with the License.\n-# You may obtain a copy of the License at:\n-#\n-#     http://www.apache.org/licenses/LICENSE-2.0\n-#\n-# Unless required by applicable law or agreed to in writing, software\n-# distributed under the License is distributed on an \"AS IS\" BASIS,\n-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n-# See the License for the specific language governing permissions and\n-# limitations under the License.\n-\n-import sys\n-\n-if sys.platform != 'win32':\n-    raise Exception(\"Intended to use only on Windows\")\n-else:\n-    import ntsecuritycon\n-    import pywintypes\n-    import win32con\n-    import win32event\n-    import win32file\n-    import win32pipe\n-    import win32security\n-    import winerror\n-\n-\n-def close_handle(handle, logger=None):\n-    try:\n-        win32file.CloseHandle(handle)\n-        return None\n-    except pywintypes.error as e:\n-        if logger is not None:\n-            logger(\"failed to close handle: %s\" % e.strerror)\n-        return e.winerror\n-\n-\n-def windows_create_pipe(sAttrs=-1, nSize=None):\n-    # Default values if parameters are not passed\n-    if sAttrs == -1:\n-        sAttrs = win32security.SECURITY_ATTRIBUTES()\n-        sAttrs.bInheritHandle = 1\n-    if nSize is None:\n-        # If this parameter is zero, the system uses the default buffer size.\n-        nSize = 0\n-\n-    try:\n-        (read_pipe, write_pipe) = win32pipe.CreatePipe(sAttrs, nSize)\n-    except pywintypes.error:\n-        raise\n-\n-    return (read_pipe, write_pipe)\n-\n-\n-def windows_read_pipe(fd, length):\n-    try:\n-        (error, data) = win32file.ReadFile(fd, length)\n-        return error, data\n-    except pywintypes.error as e:\n-        return e.winerror, \"\"\n-\n-\n-def create_file(filename, desiredAccess=None, shareMode=None, attributes=-1,\n-                CreationDisposition=None, flagsAndAttributes=None,\n-                hTemplateFile=-1):\n-    # Default values if parameters are not passed\n-    if desiredAccess is None:\n-        desiredAccess = win32file.GENERIC_READ | win32file.GENERIC_WRITE\n-    if shareMode is None:\n-        shareMode = 0\n-    if attributes == -1:\n-        # attributes can be None\n-        attributes = None\n-    if CreationDisposition is None:\n-        CreationDisposition = win32file.OPEN_EXISTING\n-    if flagsAndAttributes is None:\n-        flagsAndAttributes = (win32file.FILE_ATTRIBUTE_NORMAL |\n-                              win32file.FILE_FLAG_OVERLAPPED |\n-                              win32file.FILE_FLAG_NO_BUFFERING)\n-    if hTemplateFile == -1:\n-        hTemplateFile = None\n-\n-    try:\n-        npipe = win32file.CreateFile(filename,\n-                                     desiredAccess,\n-                                     shareMode,\n-                                     attributes,\n-                                     CreationDisposition,\n-                                     flagsAndAttributes,\n-                                     hTemplateFile)\n-    except pywintypes.error:\n-        raise\n-    return npipe\n-\n-\n-def write_file(handle, data, overlapped=None):\n-    try:\n-        (errCode, nBytesWritten) = win32file.WriteFile(handle,\n-                                                       data,\n-                                                       overlapped)\n-        # Note: win32file.WriteFile doesn't throw an exception\n-        # in case it receives ERROR_IO_PENDING.\n-        return (errCode, nBytesWritten)\n-    except pywintypes.error as e:\n-        return (e.winerror, 0)\n-\n-\n-def read_file(handle, bufsize, overlapped=None):\n-    try:\n-        # Note: win32file.ReadFile doesn't throw an exception\n-        # in case it receives ERROR_IO_PENDING.\n-        (errCode, read_buffer) = win32file.ReadFile(\n-            handle, bufsize, overlapped)\n-        return (errCode, read_buffer)\n-    except pywintypes.error as e:\n-        return (e.winerror, \"\")\n-\n-\n-def create_named_pipe(pipename, openMode=None, pipeMode=None,\n-                      nMaxInstances=None, nOutBufferSize=None,\n-                      nInBufferSize=None, nDefaultTimeOut=None,\n-                      saAttr=-1):\n-    # Default values if parameters are not passed\n-    if openMode is None:\n-        openMode = win32con.PIPE_ACCESS_DUPLEX | win32con.FILE_FLAG_OVERLAPPED\n-    if pipeMode is None:\n-        pipeMode = (win32con.PIPE_TYPE_MESSAGE |\n-                    win32con.PIPE_READMODE_BYTE |\n-                    win32con.PIPE_WAIT)\n-    if nMaxInstances is None:\n-        nMaxInstances = 64\n-    if nOutBufferSize is None:\n-        nOutBufferSize = 65000\n-    if nInBufferSize is None:\n-        nInBufferSize = 65000\n-    if nDefaultTimeOut is None:\n-        nDefaultTimeOut = 0\n-    if saAttr == -1:\n-        # saAttr can be None\n-        saAttr = win32security.SECURITY_ATTRIBUTES()\n-\n-        # The identifier authority.\n-        sia = ntsecuritycon.SECURITY_NT_AUTHORITY\n-\n-        # Initialize the SID.\n-        remoteAccessSid = win32security.SID()\n-        remoteAccessSid.Initialize(\n-            sia,  # The identifier authority.\n-            1)  # The number of sub authorities to allocate.\n-        # Disable access over network.\n-        remoteAccessSid.SetSubAuthority(\n-            0,  # The index of the sub authority to set\n-            ntsecuritycon.SECURITY_NETWORK_RID)\n-\n-        allowedPsids = []\n-        # Allow Windows Services to access the Named Pipe.\n-        allowedPsid_0 = win32security.SID()\n-        allowedPsid_0.Initialize(\n-            sia,  # The identifier authority.\n-            1)  # The number of sub authorities to allocate.\n-        allowedPsid_0.SetSubAuthority(\n-            0,  # The index of the sub authority to set\n-            ntsecuritycon.SECURITY_LOCAL_SYSTEM_RID)\n-        # Allow Administrators to access the Named Pipe.\n-        allowedPsid_1 = win32security.SID()\n-        allowedPsid_1.Initialize(\n-            sia,  # The identifier authority.\n-            2)  # The number of sub authorities to allocate.\n-        allowedPsid_1.SetSubAuthority(\n-            0,  # The index of the sub authority to set\n-            ntsecuritycon.SECURITY_BUILTIN_DOMAIN_RID)\n-        allowedPsid_1.SetSubAuthority(\n-            1,  # The index of the sub authority to set\n-            ntsecuritycon.DOMAIN_ALIAS_RID_ADMINS)\n-\n-        allowedPsids.append(allowedPsid_0)\n-        allowedPsids.append(allowedPsid_1)\n-\n-        # Initialize an ACL.\n-        acl = win32security.ACL()\n-        acl.Initialize()\n-        # Add denied ACL.\n-        acl.AddAccessDeniedAce(win32security.ACL_REVISION,\n-                               ntsecuritycon.GENERIC_ALL,\n-                               remoteAccessSid)\n-        # Add allowed ACLs.\n-        for allowedPsid in allowedPsids:\n-            acl.AddAccessAllowedAce(win32security.ACL_REVISION,\n-                                    ntsecuritycon.GENERIC_ALL,\n-                                    allowedPsid)\n-\n-        # Initialize an SD.\n-        sd = win32security.SECURITY_DESCRIPTOR()\n-        sd.Initialize()\n-        # Set DACL.\n-        sd.SetSecurityDescriptorDacl(True, acl, False)\n-\n-        saAttr.bInheritHandle = 1\n-        saAttr.SECURITY_DESCRIPTOR = sd\n-\n-    try:\n-        npipe = win32pipe.CreateNamedPipe(pipename,\n-                                          openMode,\n-                                          pipeMode,\n-                                          nMaxInstances,\n-                                          nOutBufferSize,\n-                                          nInBufferSize,\n-                                          nDefaultTimeOut,\n-                                          saAttr)\n-\n-        if npipe == win32file.INVALID_HANDLE_VALUE:\n-            return None\n-\n-        return npipe\n-    except pywintypes.error:\n-        return None\n-\n-\n-def set_pipe_mode(hPipe, mode=-1, maxCollectionCount=None,\n-                  collectDataTimeout=None):\n-    # Default values if parameters are not passed\n-    if mode == -1:\n-        mode = win32pipe.PIPE_READMODE_BYTE\n-    try:\n-        win32pipe.SetNamedPipeHandleState(\n-            hPipe, mode, maxCollectionCount, collectDataTimeout)\n-    except pywintypes.error:\n-        raise\n-\n-\n-def connect_named_pipe(pipe_handle, overlapped=None):\n-    try:\n-        # If the result of ConnectNamedPipe is ERROR_IO_PENDING or\n-        # ERROR_PIPE_CONNECTED, then this value is returned.\n-        # All other error values raise a win32 exception\n-        error = win32pipe.ConnectNamedPipe(pipe_handle, overlapped)\n-        return error\n-    except pywintypes.error as e:\n-        return e.winerror\n-\n-\n-def get_pipe_name(name):\n-    name = name.replace('/', '')\n-    name = name.replace('\\\\', '')\n-    name = \"\\\\\\\\.\\\\pipe\\\\\" + name\n-    return name\n-\n-\n-def get_overlapped_result(handle, overlapped=None, bWait=False):\n-    try:\n-        return win32file.GetOverlappedResult(handle, overlapped, bWait)\n-    except pywintypes.error:\n-        raise\n-\n-\n-def get_new_event(sa=None, bManualReset=True, bInitialState=True,\n-                  objectName=None):\n-    return win32event.CreateEvent(sa, bManualReset, bInitialState, objectName)\n-\n-\n-pipe_disconnected_errors = [winerror.ERROR_PIPE_NOT_CONNECTED,\n-                            winerror.ERROR_BAD_PIPE,\n-                            winerror.ERROR_NO_DATA,\n-                            winerror.ERROR_BROKEN_PIPE]\ndiff --git a/python/setup.py.template b/python/setup.py.template\nindex e28d5d397..89e80eed4 100644\n--- a/python/setup.py.template\n+++ b/python/setup.py.template\n@@ -39,8 +39,6 @@ with open(README_PATH) as fh:\n     long_description = fh.read()\n \n ext_errors = (CCompilerError, ExecError, PlatformError)\n-if sys.platform == 'win32':\n-    ext_errors += (IOError, ValueError)\n \n \n class BuildFailed(Exception):\n@@ -108,8 +106,7 @@ setup_args = dict(\n                                       extra_link_args=extra_libs)],\n     cmdclass={'build_ext': try_build_ext},\n     install_requires=['sortedcontainers'],\n-    extras_require={':sys_platform == \"win32\"': ['pywin32 >= 1.0'],\n-                    'dns': ['unbound'],\n+    extras_require={'dns': ['unbound'],\n                     'flow': flow_extras_require,\n                     'flowviz':\n                         [*flow_extras_require, 'click', 'rich', 'graphviz'],\ndiff --git a/tests/atlocal.in b/tests/atlocal.in\nindex e4c82a740..e915c21b7 100644\n--- a/tests/atlocal.in\n+++ b/tests/atlocal.in\n@@ -77,29 +77,14 @@ esac\n \n # Check for platform.\n case `uname` in\n-MINGW*|MSYS*)\n-    IS_WIN32=\"yes\"\n-    IS_BSD=\"no\"\n-    ;;\n FreeBSD|NetBSD)\n-    IS_WIN32=\"no\"\n     IS_BSD=\"yes\"\n     ;;\n *)\n-    IS_WIN32=\"no\"\n     IS_BSD=\"no\"\n     ;;\n esac\n \n-if test \"$IS_WIN32\" = yes; then\n-    # enables legacy windows unicode printing needed for Python3 compatibility\n-    # with the Python2 tests\n-    PYTHONLEGACYWINDOWSFSENCODING=true\n-    export PYTHONLEGACYWINDOWSFSENCODING\n-    PYTHONLEGACYWINDOWSSTDIO=true\n-    export PYTHONLEGACYWINDOWSSTDIO\n-fi\n-\n # Check for CPU architecture\n case `uname -m` in\n aarch64)\ndiff --git a/tests/automake.mk b/tests/automake.mk\nindex 685d4d2de..b2d8e5b51 100644\n--- a/tests/automake.mk\n+++ b/tests/automake.mk\n@@ -23,8 +23,7 @@ EXTRA_DIST += \\\n \t$(srcdir)/package.m4 \\\n \t$(srcdir)/tests/test-dpparse.py \\\n \t$(srcdir)/tests/test-ofparse.py \\\n-\t$(srcdir)/tests/testsuite \\\n-\t$(srcdir)/tests/testsuite.patch\n+\t$(srcdir)/tests/testsuite\n \n COMMON_MACROS_AT = \\\n \ttests/ovsdb-macros.at \\\n@@ -206,7 +205,6 @@ SYSTEM_DPDK_TESTSUITE_AT = \\\n check_SCRIPTS += tests/atlocal\n \n TESTSUITE = $(srcdir)/tests/testsuite\n-TESTSUITE_PATCH = $(srcdir)/tests/testsuite.patch\n TESTSUITE_DIR = $(abs_top_builddir)/tests/testsuite.dir\n SYSTEM_KMOD_TESTSUITE = $(srcdir)/tests/system-kmod-testsuite\n SYSTEM_USERSPACE_TESTSUITE = $(srcdir)/tests/system-userspace-testsuite\n@@ -218,7 +216,7 @@ SYSTEM_DPDK_TESTSUITE = $(srcdir)/tests/system-dpdk-testsuite\n OVSDB_CLUSTER_TESTSUITE = $(srcdir)/tests/ovsdb-cluster-testsuite\n DISTCLEANFILES += tests/atconfig tests/atlocal\n \n-AUTOTEST_PATH = utilities:vswitchd:ovsdb:vtep:tests:ipsec:$(PTHREAD_WIN32_DIR_DLL):$(SSL_DIR)\n+AUTOTEST_PATH = utilities:vswitchd:ovsdb:vtep:tests:ipsec:$(SSL_DIR)\n \n check-local:\n \tset $(SHELL) '$(TESTSUITE)' -C tests AUTOTEST_PATH=$(AUTOTEST_PATH); \\\n@@ -393,16 +391,9 @@ check-ovsdb-cluster: all\n \n AUTOTEST = $(AUTOM4TE) --language=autotest\n \n-if WIN32\n-$(TESTSUITE): package.m4 $(TESTSUITE_AT) $(COMMON_MACROS_AT) $(TESTSUITE_PATCH)\n-\t$(AM_V_GEN)$(AUTOTEST) -I '$(srcdir)' -o testsuite.tmp $@.at\n-\tpatch -p0 testsuite.tmp $(TESTSUITE_PATCH)\n-\t$(AM_V_at)mv testsuite.tmp $@\n-else\n $(TESTSUITE): package.m4 $(TESTSUITE_AT) $(COMMON_MACROS_AT)\n \t$(AM_V_GEN)$(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at\n \t$(AM_V_at)mv $@.tmp $@\n-endif\n \n $(SYSTEM_KMOD_TESTSUITE): package.m4 $(SYSTEM_TESTSUITE_AT) $(SYSTEM_KMOD_TESTSUITE_AT) $(COMMON_MACROS_AT)\n \t$(AM_V_GEN)$(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at\n@@ -509,6 +500,7 @@ tests_ovstest_SOURCES = \\\n \ttests/test-skiplist.c \\\n \ttests/test-stp.c \\\n \ttests/test-unixctl.c \\\n+\ttests/test-unix-socket.c \\\n \ttests/test-util.c \\\n \ttests/test-uuid.c \\\n \ttests/test-uuidset.c \\\n@@ -517,11 +509,6 @@ tests_ovstest_SOURCES = \\\n \ttests/test-aa.c \\\n \ttests/test-stopwatch.c\n \n-if !WIN32\n-tests_ovstest_SOURCES += \\\n-\ttests/test-unix-socket.c\n-endif\n-\n if LINUX\n tests_ovstest_SOURCES += \\\n \ttests/test-lib-route-table.c \\\ndiff --git a/tests/bridge.at b/tests/bridge.at\nindex 904f1381c..62b695bc9 100644\n--- a/tests/bridge.at\n+++ b/tests/bridge.at\n@@ -93,9 +93,6 @@ AT_CHECK([ovs-appctl -t ovs-vswitchd version], [0], [ignore])\n \n # Now kill the ovs-testcontroller\n kill `cat ovs-testcontroller.pid`\n-if test \"$IS_WIN32\" = \"yes\"; then\n-    AT_CHECK([rm controller], [0], [ignore])\n-fi\n OVS_WAIT_UNTIL([! test -e controller])\n AT_CHECK([ovs-vsctl --no-wait add-port br0 p2 -- set Interface p2 type=internal], [0], [ignore])\n AT_CHECK([ovs-appctl -t ovs-vswitchd version], [0], [ignore])\ndiff --git a/tests/daemon-py.at b/tests/daemon-py.at\nindex 883e45a5a..6c8da5c8c 100644\n--- a/tests/daemon-py.at\n+++ b/tests/daemon-py.at\n@@ -1,8 +1,6 @@\n AT_BANNER([daemon unit tests - Python3])\n \n AT_SETUP([daemon - Python3])\n-# Skip this test for Windows, echo $! gives shell pid instead of parent process\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n AT_KEYWORDS([python daemon])\n \n on_exit 'kill $(cat *.pid)'\n@@ -24,8 +22,6 @@ AT_CHECK([test ! -e $pidfile])\n AT_CLEANUP\n \n AT_SETUP([daemon --monitor - Python3])\n-# Skip this test for Windows, echo $! gives shell pid instead of parent process\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n \n on_exit 'kill $(cat *.pid)'\n pidfile=test-daemon.py.pid\n@@ -58,8 +54,6 @@ OVS_WAIT_WHILE([kill -0 $monitor || kill -0 $child2 || test -e $pidfile])\n AT_CLEANUP\n \n AT_SETUP([daemon --monitor restart exit code - Python3])\n-# Skip this test for Windows, echo $! gives shell pid instead of parent process\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n \n on_exit 'kill $(cat *.pid)'\n pidfile=test-daemon.py.pid\n@@ -93,9 +87,6 @@ AT_CLEANUP\n \n AT_SETUP([daemon --detach - Python3])\n \n-# Skip this test for Windows, the pid file not removed if the daemon is killed\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n-\n on_exit 'kill $(cat *.pid)'\n pidfile=test-daemon.py.pid\n \n@@ -115,9 +106,6 @@ AT_CLEANUP\n \n AT_SETUP([daemon --detach --monitor - Python3])\n \n-# Skip this test for Windows, uses Linux specific kill signal\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n-\n on_exit 'kill $(cat *.pid)'\n pidfile=test-daemon.py.pid\n \n@@ -168,8 +156,6 @@ AT_CHECK([test ! -s test-daemon.py.pid])\n AT_CLEANUP\n \n AT_SETUP([daemon --detach closes standard fds - Python3])\n-# Skip this test for Windows, uses Linux specific kill signal\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n \n AT_CHECK([(yes 2>stderr; echo $? > status) | $PYTHON3 $srcdir/test-daemon.py --pidfile --detach --no-chdir])\n AT_CHECK([kill $(cat test-daemon.py.pid)])\n@@ -187,8 +173,6 @@ fi\n AT_CLEANUP\n \n AT_SETUP([daemon --detach --monitor closes standard fds - Python3])\n-# Skip this test for Windows, uses Linux specific kill signal\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n AT_CHECK([(yes 2>stderr; echo $? > status) | $PYTHON3 $srcdir/test-daemon.py --pidfile --detach --no-chdir], [0], [], [])\n AT_CHECK([kill $(cat test-daemon.py.pid)])\n AT_CHECK([test -s status])\ndiff --git a/tests/daemon.at b/tests/daemon.at\nindex 6cb8b9888..c56c096b7 100644\n--- a/tests/daemon.at\n+++ b/tests/daemon.at\n@@ -46,16 +46,6 @@ check_ancestors() {\n OVS_END_SHELL_HELPERS\n \n AT_SETUP([daemon])\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n-\n-dnl OVS_SKIP_NON_ADMIN_WIN()\n-dnl\n-dnl Checks if we have enough rights to create a service\n-m4_define([OVS_SKIP_NON_ADMIN_WIN],\n-  [\n-   AT_SKIP_IF([net session; test $? -ne 0])\n-   ])\n-\n # Start the daemon and wait for the pidfile to get created\n # and that its contents are the correct pid.\n on_exit 'kill $(cat *.pid)'\n@@ -76,7 +66,6 @@ AT_CHECK([test ! -e ovsdb-server.pid])\n AT_CLEANUP\n \n AT_SETUP([daemon --monitor])\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n \n # This test intentionally causes SIGSEGV, so make sanitizers ignore it.\n ASAN_OPTIONS=$ASAN_OPTIONS:handle_segv=0; export ASAN_OPTIONS\n@@ -130,14 +119,7 @@ child=$(cat ovsdb-server.pid)\n AT_CHECK([kill -0 $child])\n \n # Kill the daemon and make sure that the pidfile gets deleted.\n-if test \"$IS_WIN32\" = \"yes\"; then\n-  # When a 'kill pid' is done on windows (through 'taskkill //F'),\n-  # pidfiles are not deleted (because it is force kill), so use\n-  # 'ovs-appctl exit' instead\n-  OVS_APP_EXIT_AND_WAIT([ovsdb-server])\n-else\n-  kill $child\n-fi\n+kill $child\n OVS_WAIT_WHILE([kill -0 $child])\n AT_CHECK([test ! -e ovsdb-server.pid])\n \n@@ -145,7 +127,6 @@ AT_CLEANUP\n \n \n AT_SETUP([daemon --detach --monitor])\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n \n # This test intentionally causes SIGSEGV, so make sanitizers ignore it.\n ASAN_OPTIONS=$ASAN_OPTIONS:handle_segv=0; export ASAN_OPTIONS\n@@ -193,7 +174,6 @@ AT_CLEANUP\n \n \n AT_SETUP([daemon --detach --monitor startup errors])\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --monitor --unixctl=nonexistent/unixctl --no-db], [1], [], [stderr])\n AT_CHECK([grep 'could not initialize control socket' stderr],\n   [0], [ignore])\n@@ -201,37 +181,8 @@ AT_CHECK([test ! -e ovsdb-server.pid])\n AT_CLEANUP\n \n \n-AT_SETUP([daemon --service])\n-AT_KEYWORDS([windows-service])\n-AT_SKIP_IF([test \"$IS_WIN32\" != \"yes\"])\n-OVS_SKIP_NON_ADMIN_WIN\n-AT_SKIP_IF([sc qc ovsdb-server])\n-\n-AT_CAPTURE_FILE([pid])\n-# To create a Windows service, we need the absolute path for the executable.\n-abs_path=\"$(cd $(dirname `which ovsdb-server`); pwd -W; cd $OLDPWD)\"\n-\n-AT_CHECK([sc create ovsdb-server binpath=\"$abs_path/ovsdb-server --no-db --log-file=`pwd`/ovsdb-server.log --pidfile=`pwd`/ovsdb-server.pid --unixctl=`pwd`/ovsdb-server.ctl --remote=punix:`pwd`/socket --service\"],\n-[0], [[[SC]] CreateService SUCCESS\n-])\n-\n-AT_CHECK([sc start ovsdb-server], [0], [ignore], [ignore], [sc delete ovsdb-server])\n-OVS_WAIT_UNTIL([test -s ovsdb-server.pid])\n-OVS_WAIT_UNTIL([sc query ovsdb-server | grep STATE | grep RUNNING > /dev/null 2>&1])\n-AT_CHECK([kill -0 `cat ovsdb-server.pid`], [0], [ignore])\n-AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/list-dbs], [0],\n-[_Server\n-])\n-AT_CHECK([sc stop ovsdb-server], [0], [ignore])\n-OVS_WAIT_UNTIL([test ! -s ovsdb-server.pid])\n-OVS_WAIT_UNTIL([sc query ovsdb-server | grep STATE | grep STOPPED > /dev/null 2>&1])\n-AT_CHECK([sc delete ovsdb-server], [0], [[[SC]] DeleteService SUCCESS\n-])\n-AT_CLEANUP\n-\n AT_SETUP([backtrace without monitor])\n AT_SKIP_IF([test \"$HAVE_BACKTRACE\" = \"no\" && test \"$HAVE_UNWIND\" = \"no\"])\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n \n # This test intentionally causes SIGSEGV, so make sanitizers ignore it.\n ASAN_OPTIONS=$ASAN_OPTIONS:handle_segv=0; export ASAN_OPTIONS\n@@ -252,7 +203,6 @@ AT_CLEANUP\n \n AT_SETUP([backtrace with monitor])\n AT_SKIP_IF([test \"$HAVE_BACKTRACE\" = \"no\" && test \"$HAVE_UNWIND\" = \"no\"])\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n \n # This test intentionally causes SIGSEGV, so make sanitizers ignore it.\n ASAN_OPTIONS=$ASAN_OPTIONS:handle_segv=0; export ASAN_OPTIONS\ndiff --git a/tests/file_name.at b/tests/file_name.at\nindex e263ce326..d05d35caa 100644\n--- a/tests/file_name.at\n+++ b/tests/file_name.at\n@@ -2,7 +2,6 @@ AT_BANNER([test dir_name and base_name functions])\n \n m4_define([CHECK_FILE_NAME],\n   [AT_SETUP([components of \"$1\" are \"$2\", \"$3\"])\n-   AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n    AT_KEYWORDS([dir_name base_name])\n    AT_CHECK([ovstest test-util file_name \"AS_ESCAPE($1)\"], [0], [$2\n $3\n@@ -104,7 +103,6 @@ CHECK_FOLLOW([y], [/dev/full])\n AT_CLEANUP\n \n AT_SETUP([follow_symlinks - nonexistent files])\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n CHECK_FOLLOW([nonexistent], [nonexistent])\n CHECK_FOLLOW([a/b/c], [a/b/c])\n CHECK_FOLLOW([/a/b/c], [/a/b/c])\ndiff --git a/tests/library.at b/tests/library.at\nindex 449f15fd5..5639e0bc8 100644\n--- a/tests/library.at\n+++ b/tests/library.at\n@@ -96,7 +96,6 @@ AT_CLEANUP\n \n AT_SETUP([byteq - write_read])\n AT_KEYWORDS([byteq])\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n AT_CHECK([ovstest test-byteq write_read], [0], [.\n ])\n AT_CLEANUP\n@@ -173,7 +172,6 @@ m4_foreach(\n    AT_CLEANUP])\n \n AT_SETUP([unix socket, short pathname - C])\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n AT_CHECK([ovstest test-unix-socket x])\n AT_CLEANUP\n \n@@ -183,7 +181,6 @@ dnl is about 100 bytes.  On Linux, we work around this by indirecting through\n dnl a directory fd using /proc/self/fd/<dirfd>.  We do not have a workaround\n dnl for other platforms, so we skip the test there.\n AT_SETUP([unix socket, long pathname - C])\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n dnl Linux sockaddr_un has a 108-byte limit, so this needs to be longer.\n dnl Linux \"ecryptfs\" has a 143-byte limit, so we use that many bytes.\n longname=01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012\n@@ -196,7 +193,6 @@ AT_CHECK([cd $longname && ovstest test-unix-socket ../$longname/socket socket])\n AT_CLEANUP\n \n AT_SETUP([unix socket, short pathname - Python3])\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n AT_KEYWORDS([python unixsocket])\n AT_CHECK([$PYTHON3 $srcdir/test-unix-socket.py x])\n AT_CLEANUP\n@@ -207,7 +203,6 @@ dnl is about 100 bytes.  On Linux, we work around this by indirecting through\n dnl a directory fd using /proc/self/fd/<dirfd>.  We do not have a workaround\n dnl for other platforms, so we skip the test there.\n AT_SETUP([unix socket, long pathname - Python3])\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n AT_KEYWORDS([python unixsocket])\n dnl Linux sockaddr_un has a 108-byte limit, so this needs to be longer.\n dnl Linux \"ecryptfs\" has a 143-byte limit, so we use that many bytes.\n@@ -220,12 +215,8 @@ AT_CHECK([cd $longname && $PYTHON3 $abs_srcdir/test-unix-socket.py ../$longname/\n AT_CLEANUP\n \n AT_SETUP([ovs_assert])\n-if test \"$IS_WIN32\" = \"yes\"; then\n-  exit_status=9\n-else\n-  # SIGABRT + 128\n-  exit_status=134\n-fi\n+# SIGABRT + 128\n+exit_status=134\n AT_CHECK([ovstest test-util -voff -vfile:info '-vPATTERN:file:%c|%p|%m' --log-file assert],\n   [$exit_status], [], [stderr])\n \n@@ -276,7 +267,6 @@ AT_CHECK([ovstest test-rcu], [0], [])\n AT_CLEANUP\n \n AT_SETUP([netlink policy])\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n AT_SKIP_IF([test \"$IS_BSD\" = \"yes\"])\n AT_CHECK([ovstest test-netlink-policy ll_addr], [0])\n AT_CLEANUP\ndiff --git a/tests/lockfile.at b/tests/lockfile.at\nindex 61920c3b0..69f590fa0 100644\n--- a/tests/lockfile.at\n+++ b/tests/lockfile.at\n@@ -1,10 +1,8 @@\n AT_BANNER([lockfile unit tests])\n \n-# CHECK_LOCKFILE([test-name], [number-children], [error-message]\n-# [skip-test-windows])\n+# CHECK_LOCKFILE([test-name], [number-children], [error-message])\n m4_define([CHECK_LOCKFILE],\n   [AT_SETUP([m4_translit([$1], [_], [ ])])\n-   m4_if([$4], [yes], [AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])])\n    AT_KEYWORDS([lockfile])\n    AT_CHECK([ovstest test-lockfile $1], [0], [$1: success (m4_if(\n      [$2], [1], [$2 child], [$2 children]))\n@@ -28,15 +26,15 @@ lockfile|WARN|.file.~lock~: cannot lock file because this process has already lo\n CHECK_LOCKFILE([lock_blocks_other_process], [1],\n   [lockfile|WARN|.file.~lock~: child does not inherit lock\n lockfile|WARN|.file.~lock~: cannot lock file because it is already locked by pid <pid>\n-], [yes])\n+])\n \n CHECK_LOCKFILE([lock_twice_blocks_other_process], [1],\n   [lockfile|WARN|.file.~lock~: cannot lock file because this process has already locked it\n lockfile|WARN|.file.~lock~: child does not inherit lock\n lockfile|WARN|.file.~lock~: cannot lock file because it is already locked by pid <pid>\n-], [yes])\n+])\n \n-CHECK_LOCKFILE([lock_and_unlock_allows_other_process], [1], [], [yes])\n+CHECK_LOCKFILE([lock_and_unlock_allows_other_process], [1])\n \n CHECK_LOCKFILE([lock_multiple], [0],\n   [lockfile|WARN|.a.~lock~: cannot lock file because this process has already locked it\n@@ -47,8 +45,8 @@ CHECK_LOCKFILE([lock_symlink], [0],\n lockfile|WARN|.b.~lock~: cannot lock file because this process has already locked it\n lockfile|WARN|.b.~lock~: cannot lock file because this process has already locked it\n lockfile|WARN|.a.~lock~: cannot lock file because this process has already locked it\n-], [yes])\n+])\n \n CHECK_LOCKFILE([lock_symlink_to_dir], [0],\n   [lockfile|WARN|dir/.b.~lock~: cannot lock file because this process has already locked it\n-], [yes])\n+])\ndiff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at\nindex 39e43d376..a3f2268ef 100644\n--- a/tests/ofproto-dpif.at\n+++ b/tests/ofproto-dpif.at\n@@ -7771,8 +7771,7 @@ AT_CLEANUP\n # CHECK_SFLOW_SAMPLING_PACKET(LOOPBACK_ADDR)\n #\n # Test that sFlow samples packets correctly using IPv4/IPv6 sFlow collector\n-m4_define([CHECK_SFLOW_SAMPLING_PACKET],\n-  [AT_XFAIL_IF([test \"$IS_WIN32\" = \"yes\"])\n+m4_define([CHECK_SFLOW_SAMPLING_PACKET], [\n   OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])\n \n   on_exit 'kill `cat test-sflow.pid`'\n@@ -8458,7 +8457,6 @@ AT_CLEANUP\n \n dnl Test sFlow LAG structures\n AT_SETUP([ofproto-dpif - sFlow packet sampling - LACP structures])\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n OVS_VSWITCHD_START([dnl\n                     add-bond br0 bond p1 p2 --                          \\\n                     set Port bond lacp=active bond-mode=active-backup   \\\n@@ -8515,7 +8513,6 @@ LACPCOUNTERS\n AT_CLEANUP\n \n AT_SETUP([ofproto-dpif - sFlow packet sampling - tunnel set])\n-AT_XFAIL_IF([test \"$IS_WIN32\" = \"yes\"])\n OVS_VSWITCHD_START([set Bridge br0 fail-mode=standalone])\n \n dnl set up sFlow logging\n@@ -8584,7 +8581,6 @@ OVS_VSWITCHD_STOP([\"/failed to get flags for network device 127.0.0.1/d\"])\n AT_CLEANUP\n \n AT_SETUP([ofproto-dpif - sFlow packet sampling - tunnel push])\n-AT_XFAIL_IF([test \"$IS_WIN32\" = \"yes\"])\n \n OVS_VSWITCHD_START([add-port br0 p0 -- set Interface p0 type=dummy ofport_request=1 options:ifindex=1010])\n \n@@ -8694,7 +8690,6 @@ OVS_VSWITCHD_STOP([\"/failed to get flags for network device 127.0.0.1/d\"])\n AT_CLEANUP\n \n AT_SETUP([ofproto-dpif - sFlow packet sampling - MPLS])\n-AT_XFAIL_IF([test \"$IS_WIN32\" = \"yes\"])\n OVS_VSWITCHD_START\n AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])\n add_of_ports br0 1 2\ndiff --git a/tests/ovs-macros.at b/tests/ovs-macros.at\nindex c73312fd8..a431240a5 100644\n--- a/tests/ovs-macros.at\n+++ b/tests/ovs-macros.at\n@@ -88,44 +88,6 @@ seq () {\n     done\n }\n \n-if test \"$IS_WIN32\" = \"yes\"; then\n-    pwd () {\n-        command pwd -W \"$@\"\n-    }\n-\n-    diff () {\n-        command diff --strip-trailing-cr \"$@\"\n-    }\n-\n-    # tskill is more effective than taskkill but it isn't always installed.\n-    if (tskill //?) >/dev/null 2>&1; then :; else\n-        tskill () { taskkill //F //PID $1 >/dev/null; }\n-    fi\n-\n-    kill () {\n-        signal=\n-        retval=0\n-        for arg; do\n-            arg=$(echo $arg | tr -d '\\n\\r')\n-            case $arg in\n-            -*) signal=$arg ;;\n-            [1-9][0-9]*)\n-                # tasklist always returns 0.\n-                # If pid does exist, there will be a line with the pid.\n-                if tasklist //fi \"PID eq $arg\" | grep $arg >/dev/null; then\n-                    if test \"X$signal\" != \"X-0\"; then\n-                        tskill $arg\n-                    fi\n-                else\n-                    retval=1\n-                fi\n-                ;;\n-            esac\n-        done\n-        return $retval\n-    }\n-fi\n-\n # parent_pid PID\n #\n # Prints the PID of the parent of process PID.\ndiff --git a/tests/ovs-vsctl.at b/tests/ovs-vsctl.at\nindex 4ca5261c2..cce5c3add 100644\n--- a/tests/ovs-vsctl.at\n+++ b/tests/ovs-vsctl.at\n@@ -143,14 +143,9 @@ AT_CHECK(\n   [0], [], [stderr])\n AT_CHECK([grep -c 'terminating with signal' stderr], [0], [1\n ])\n-if test \"$IS_WIN32\" = \"yes\"; then\n-  AT_CHECK([cat status], [0], [3\n+# 128 + SIGALRM\n+AT_CHECK([cat status], [0], [142\n ])\n-else\n-  # 128 + SIGALRM\n-  AT_CHECK([cat status], [0], [142\n-])\n-fi\n \n dnl Without --retry, we should retry for passive connections.\n AT_CHECK(\n@@ -159,14 +154,9 @@ AT_CHECK(\n   [0], [], [stderr])\n AT_CHECK([grep -c 'terminating with signal' stderr], [0], [1\n ])\n-if test \"$IS_WIN32\" = \"yes\"; then\n-  AT_CHECK([cat status], [0], [3\n-])\n-else\n-  # 128 + SIGALRM\n-  AT_CHECK([cat status], [0], [142\n+# 128 + SIGALRM\n+AT_CHECK([cat status], [0], [142\n ])\n-fi\n AT_CLEANUP\n \n dnl ----------------------------------------------------------------------\n@@ -1636,11 +1626,7 @@ cat >experr <<EOF\n ovs-vsctl: Error detected while setting up 'reserved_name'.  See ovs-vswitchd log for details.\n ovs-vsctl: The default log directory is \"$OVS_RUNDIR\".\n EOF\n-if test \"$IS_WIN32\" = \"yes\"; then\n-AT_CHECK([ovs-vsctl add-port br0 reserved_name], [160], [], [experr])\n-else\n AT_CHECK([ovs-vsctl add-port br0 reserved_name], [65], [], [experr])\n-fi\n # Prevent race.\n OVS_WAIT_UNTIL([test `grep -- \"|WARN|\" ovs-vswitchd.log | wc -l` -ge 1])\n # Detect the warning log message\n@@ -1675,11 +1661,7 @@ cat >experr <<EOF\n ovs-vsctl: Error detected while setting up 'reserved_name'.  See ovs-vswitchd log for details.\n ovs-vsctl: The default log directory is \"$OVS_RUNDIR\".\n EOF\n-if test \"$IS_WIN32\" = \"yes\"; then\n-AT_CHECK([ovs-vsctl add-port br0 reserved_name], [160], [], [experr])\n-else\n AT_CHECK([ovs-vsctl add-port br0 reserved_name], [65], [], [experr])\n-fi\n # Prevent race.\n OVS_WAIT_UNTIL([test `grep -- \"|WARN|\" ovs-vswitchd.log | wc -l` -ge 1])\n # Detect the warning log message\n@@ -1921,13 +1903,8 @@ ovs-vsctl: Error detected while setting up 'gre0': gre0: bad ip6gre 'remote_ip'\n gre0: ip6gre type requires valid 'remote_ip' argument.  See ovs-vswitchd log for details.\n ovs-vsctl: The default log directory is \"$OVS_RUNDIR\".\n EOF\n-if test \"$IS_WIN32\" = \"yes\"; then\n-AT_CHECK([ovs-vsctl add-port br0 gre0 -- set interface gre0 type=ip6gre \\\n-options:key=100 options:remote_ip=192.168.0.300], [160], [], [experr])\n-else\n AT_CHECK([ovs-vsctl add-port br0 gre0 -- set interface gre0 type=ip6gre \\\n options:key=100 options:remote_ip=192.168.0.300], [65], [], [experr])\n-fi\n OVS_VSWITCHD_STOP([\"/is not a valid IP address/d\n /netdev_vport|WARN|gre0: bad ip6gre 'remote_ip'/d\n /netdev|WARN|gre0: could not set configuration/d\"])\ndiff --git a/tests/ovs-vswitchd.at b/tests/ovs-vswitchd.at\nindex 173e62367..95308f0fd 100644\n--- a/tests/ovs-vswitchd.at\n+++ b/tests/ovs-vswitchd.at\n@@ -159,7 +159,6 @@ AT_CLEANUP\n \n dnl ----------------------------------------------------------------------\n AT_SETUP([ovs-vswitchd -- set service controller])\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n OVS_VSWITCHD_START\n \n AT_CHECK([ovs-vsctl set-controller br0 punix:$(pwd)/br0.void])\n@@ -199,20 +198,10 @@ dnl ----------------------------------------------------------------------\n AT_SETUP([ovs-vswitchd - do not create sockets with unsafe names])\n OVS_VSWITCHD_START\n \n-# On Unix systems, test for sockets with \"test -S\".\n-#\n-# On Windows systems, we simulate a socket with a regular file that contains\n-# a TCP port number, so use \"test -f\" there instead.\n-if test $IS_WIN32 = yes; then\n-   S=f\n-else\n-   S=S\n-fi\n-\n # Create a bridge with an ordinary name and make sure that the management\n # socket gets creatd.\n AT_CHECK([ovs-vsctl add-br a -- set bridge a datapath-type=dummy])\n-AT_CHECK([test -$S a.mgmt])\n+AT_CHECK([test -S a.mgmt])\n \n # Create a bridge with an unsafe name and make sure that the management\n # socket does not get created.\n@@ -222,11 +211,7 @@ cat >experr <<EOF\n ovs-vsctl: Error detected while setting up 'b/c'.  See ovs-vswitchd log for details.\n ovs-vsctl: The default log directory is \"$OVS_RUNDIR\".\n EOF\n-if test \"$IS_WIN32\" = \"yes\"; then\n-AT_CHECK([ovs-vsctl add-br b/c -- set bridge b/c datapath-type=dummy], [160], [], [experr])\n-else\n AT_CHECK([ovs-vsctl add-br b/c -- set bridge b/c datapath-type=dummy], [65], [], [experr])\n-fi\n AT_CHECK([test ! -e b/c.mgmt])\n \n OVS_VSWITCHD_STOP(['/ignoring bridge with invalid name/d'])\ndiff --git a/tests/ovsdb-idl.at b/tests/ovsdb-idl.at\nindex 728d761d4..15d0e4764 100644\n--- a/tests/ovsdb-idl.at\n+++ b/tests/ovsdb-idl.at\n@@ -132,7 +132,6 @@ m4_define([OVSDB_CHECK_IDL_TCP_C],\n # same as OVSDB_CHECK_IDL but uses tcp6.\n m4_define([OVSDB_CHECK_IDL_TCP6_C],\n   [AT_SETUP([ovsdb-idl - $1 - C - tcp6])\n-   AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n    AT_SKIP_IF([test $HAVE_IPV6 = no])\n    AT_KEYWORDS([ovsdb server idl positive tcp6 socket $5])\n    OVSDB_START_IDLTEST([\"ptcp:0:[[::1]]\"])\n@@ -221,7 +220,6 @@ m4_define([OVSDB_CHECK_IDL_TCP_MULTIPLE_REMOTES_PY],\n # same as OVSDB_CHECK_IDL but uses the Python IDL implementation with tcp6\n m4_define([OVSDB_CHECK_IDL_TCP6_PY],\n   [AT_SETUP([ovsdb-idl $1 - Python3 - tcp6])\n-   AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n    AT_SKIP_IF([test $HAVE_IPV6 = no])\n    AT_KEYWORDS([ovsdb server idl positive Python with tcp6 socket $5])\n    OVSDB_START_IDLTEST([\"ptcp:0:[[::1]]\"])\n@@ -239,7 +237,6 @@ m4_define([OVSDB_CHECK_IDL_TCP6_PY],\n \n m4_define([OVSDB_CHECK_IDL_TCP6_MULTIPLE_REMOTES_PY],\n   [AT_SETUP([ovsdb-idl - $1 - Python3 - tcp6])\n-   AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n    AT_SKIP_IF([test $HAVE_IPV6 = no])\n    AT_KEYWORDS([ovsdb server idl positive Python with tcp6 socket $5])\n    OVSDB_START_IDLTEST([\"ptcp:0:[[::1]]\"])\n@@ -2457,9 +2454,7 @@ OVSDB_CHECK_IDL_COMPOUND_INDEX_WITH_REF([set, simple3 idl-compound-index-with-re\n \n m4_define([CHECK_STREAM_OPEN_BLOCK],\n   [AT_SETUP([ovsdb-idl - Check stream open block - $1 - $3])\n-   AT_SKIP_IF([test \"$3\" = \"tcp6\" && test \"$IS_WIN32\" = \"yes\"])\n    AT_SKIP_IF([test \"$3\" = \"tcp6\" && test \"$HAVE_IPV6\" = \"no\"])\n-   AT_SKIP_IF([test \"$3\" = \"ssl6\" && test \"$IS_WIN32\" = \"yes\"])\n    AT_SKIP_IF([test \"$3\" = \"ssl6\" && test \"$HAVE_IPV6\" = \"no\"])\n    AT_SKIP_IF([test \"$3\" = \"ssl\" && test \"$HAVE_OPENSSL\" = \"no\"])\n    $PYTHON3 -c \"import ssl\"\ndiff --git a/tests/ovsdb-lock.at b/tests/ovsdb-lock.at\nindex 6bc247302..393d03777 100644\n--- a/tests/ovsdb-lock.at\n+++ b/tests/ovsdb-lock.at\n@@ -8,7 +8,6 @@ AT_BANNER([OVSDB -- lock])\n \n m4_define([OVSDB_CHECK_LOCK_SETUP],\n    [AT_SETUP([ovsdb lock -- $1])\n-    AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n     AT_KEYWORDS([ovsdb lock $2])\n     ordinal_schema > schema\n     AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore])\ndiff --git a/tests/ovsdb-log.at b/tests/ovsdb-log.at\nindex 835ea728b..7d0e74504 100644\n--- a/tests/ovsdb-log.at\n+++ b/tests/ovsdb-log.at\n@@ -81,19 +81,17 @@ AT_CLEANUP\n AT_SETUP([ovsdb-log - write one, replace, commit])\n AT_KEYWORDS([ovsdb log])\n AT_CAPTURE_FILE([file])\n-for option in '' --no-rename-open-files; do\n-    rm -f file\n-    AT_CHECK(\n-      [[test-ovsdb $option log-io file create \\\n-          'write:{\"x\":0}' \\\n-          'replace_start' \\\n-          'new-write:{\"x\":1}' \\\n-          'new-write:{\"x\":2}' \\\n-          'old-write:{\"x\":4}' \\\n-          'replace_commit' \\\n-          'read' \\\n-          'write:{\"x\":3}']], [0],\n-      [[file: open successful\n+AT_CHECK(\n+  [[test-ovsdb log-io file create \\\n+      'write:{\"x\":0}' \\\n+      'replace_start' \\\n+      'new-write:{\"x\":1}' \\\n+      'new-write:{\"x\":2}' \\\n+      'old-write:{\"x\":4}' \\\n+      'replace_commit' \\\n+      'read' \\\n+      'write:{\"x\":3}']], [0],\n+  [[file: open successful\n file: write:{\"x\":0} successful\n file: replace_start successful\n (temp): write:{\"x\":1} successful\n@@ -103,34 +101,31 @@ file: replace_commit successful\n file: read: end of log\n file: write:{\"x\":3} successful\n ]])\n-    AT_CHECK(\n-      [test-ovsdb log-io file read-only read read read read], [0],\n-      [[file: open successful\n+AT_CHECK(\n+  [test-ovsdb log-io file read-only read read read read], [0],\n+  [[file: open successful\n file: read: {\"x\":1}\n file: read: {\"x\":2}\n file: read: {\"x\":3}\n file: read: end of log\n ]], [ignore])\n-done\n AT_CHECK([test -f .file.~lock~])\n AT_CLEANUP\n \n AT_SETUP([ovsdb-log - write one, replace, abort])\n AT_KEYWORDS([ovsdb log])\n AT_CAPTURE_FILE([file])\n-for option in '' --no-rename-open-files; do\n-    rm -f file\n-    AT_CHECK(\n-      [[test-ovsdb $option log-io file create \\\n-          'write:{\"x\":0}' \\\n-          'replace_start' \\\n-          'new-write:{\"x\":1}' \\\n-          'new-write:{\"x\":2}' \\\n-          'old-write:{\"x\":4}' \\\n-          'replace_abort' \\\n-          'read' \\\n-          'write:{\"x\":3}']], [0],\n-      [[file: open successful\n+AT_CHECK(\n+  [[test-ovsdb log-io file create \\\n+      'write:{\"x\":0}' \\\n+      'replace_start' \\\n+      'new-write:{\"x\":1}' \\\n+      'new-write:{\"x\":2}' \\\n+      'old-write:{\"x\":4}' \\\n+      'replace_abort' \\\n+      'read' \\\n+      'write:{\"x\":3}']], [0],\n+  [[file: open successful\n file: write:{\"x\":0} successful\n file: replace_start successful\n (temp): write:{\"x\":1} successful\n@@ -140,15 +135,14 @@ file: replace_abort successful\n file: read: end of log\n file: write:{\"x\":3} successful\n ]])\n-    AT_CHECK(\n-      [test-ovsdb log-io file read-only read read read read], [0],\n-      [[file: open successful\n+AT_CHECK(\n+  [test-ovsdb log-io file read-only read read read read], [0],\n+  [[file: open successful\n file: read: {\"x\":0}\n file: read: {\"x\":4}\n file: read: {\"x\":3}\n file: read: end of log\n ]], [ignore])\n-done\n AT_CHECK([test -f .file.~lock~])\n AT_CLEANUP\n \ndiff --git a/tests/ovsdb-monitor.at b/tests/ovsdb-monitor.at\nindex 3e1df18a1..2e03ef015 100644\n--- a/tests/ovsdb-monitor.at\n+++ b/tests/ovsdb-monitor.at\n@@ -16,14 +16,8 @@ ovsdb_check_monitor () {\n     AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --remote=punix:socket --log-file db > ovsdb-server.stdout 2> ovsdb-server.stderr],\n              [0], [], [])\n     on_exit 'kill `cat ovsdb-server.pid`'\n-    if test \"$IS_WIN32\" = \"yes\"; then\n-      AT_CHECK([ovsdb-client -vjsonrpc --pidfile --log-file -d json monitor --format=csv unix:socket $db $table $columns > output 2> ovsdb-client.stderr &],\n-               [0], [ignore], [ignore])\n-      sleep 1\n-    else\n-      AT_CHECK([ovsdb-client -vjsonrpc --detach --no-chdir --pidfile --log-file -d json monitor --format=csv unix:socket $db $table $columns > output 2> ovsdb-client.stderr],\n-             [0], [ignore], [ignore])\n-    fi\n+    AT_CHECK([ovsdb-client -vjsonrpc --detach --no-chdir --pidfile --log-file -d json monitor --format=csv unix:socket $db $table $columns > output 2> ovsdb-client.stderr],\n+           [0], [ignore], [ignore])\n     on_exit 'kill `cat ovsdb-client.pid`'\n     for txn in ${1+\"$@\"} '[[\"'$db'\"]]'; do\n       AT_CHECK([ovsdb-client transact unix:socket \"$txn\"], [0], [ignore], [ignore])\ndiff --git a/tests/ovsdb-server.at b/tests/ovsdb-server.at\nindex d9389e12f..face39921 100644\n--- a/tests/ovsdb-server.at\n+++ b/tests/ovsdb-server.at\n@@ -61,7 +61,6 @@ AT_BANNER([ovsdb-server miscellaneous features])\n \n AT_SETUP([truncating corrupted database log])\n AT_KEYWORDS([ovsdb server positive unix])\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n ordinal_schema > schema\n AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore])\n dnl Do one transaction and save the output.\n@@ -107,7 +106,6 @@ AT_CLEANUP\n \n AT_SETUP([truncating database log with bad transaction])\n AT_KEYWORDS([ovsdb server positive unix])\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n ordinal_schema > schema\n AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore])\n dnl Do one transaction and save the output.\n@@ -249,17 +247,10 @@ AT_CHECK([ovsdb-client list-tables unix:db.sock constraints], [0], [ignore], [ig\n AT_CHECK([ovsdb-client list-tables unix:db.sock ordinals], [0], [ignore], [ignore])\n \n # Add an already added database.\n-if test $IS_WIN32 = \"yes\"; then\n-  AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/add-db db2], 2, [],\n-  [I/O error: db2: failed to lock lockfile (Resource deadlock avoided)\n-ovs-appctl: ovsdb-server: server returned an error\n-])\n-else\n-  AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/add-db db2], 2, [],\n+AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/add-db db2], 2, [],\n   [ovsdb error: db2: already open\n ovs-appctl: ovsdb-server: server returned an error\n ])\n-fi\n \n # Add a non-existing database.\n AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/add-db db3], 2, [], [stderr])\n@@ -474,7 +465,6 @@ AT_CLEANUP\n \n AT_SETUP([ovsdb-server/add-db with --monitor])\n AT_KEYWORDS([ovsdb server positive])\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n \n # This test intentionally causes SIGSEGV, so make sanitizers ignore it.\n ASAN_OPTIONS=$ASAN_OPTIONS:handle_segv=0; export ASAN_OPTIONS\n@@ -513,7 +503,6 @@ AT_CLEANUP\n \n AT_SETUP([ovsdb-server/add-db and remove-db with --monitor])\n AT_KEYWORDS([ovsdb server positive])\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n \n # This test intentionally causes SIGSEGV, so make sanitizers ignore it.\n ASAN_OPTIONS=$ASAN_OPTIONS:handle_segv=0; export ASAN_OPTIONS\n@@ -623,22 +612,14 @@ AT_CHECK([ovsdb-server --detach --no-chdir --log-file --pidfile db], [0], [ignor\n \n AT_CHECK([test ! -e socket1])\n AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/add-remote punix:socket1])\n-if test \"$IS_WIN32\" = \"yes\"; then\n-  OVS_WAIT_UNTIL([test -e socket1])\n-else\n-  OVS_WAIT_UNTIL([test -S socket1])\n-fi\n+OVS_WAIT_UNTIL([test -S socket1])\n AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/list-remotes],\n   [0], [punix:socket1\n ])\n \n AT_CHECK([test ! -e socket2])\n AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/add-remote punix:socket2])\n-if test \"$IS_WIN32\" = \"yes\"; then\n-  OVS_WAIT_UNTIL([test -e socket2])\n-else\n-  OVS_WAIT_UNTIL([test -S socket2])\n-fi\n+OVS_WAIT_UNTIL([test -S socket2])\n AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/list-remotes],\n   [0], [punix:socket1\n punix:socket2\n@@ -651,11 +632,7 @@ ovs-appctl: ovsdb-server: server returned an error\n \n AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/remove-remote punix:socket1])\n OVS_WAIT_UNTIL([test ! -e socket1])\n-if test \"$IS_WIN32\" = \"yes\"; then\n-  AT_CHECK([test -e socket2])\n-else\n-  AT_CHECK([test -S socket2])\n-fi\n+AT_CHECK([test -S socket2])\n AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/list-remotes],\n   [0], [punix:socket2\n ])\n@@ -690,11 +667,7 @@ AT_CHECK([sed -i'back' '/\"remotes\"/a\\\n                     \"punix:socket1\": {}\n                     ' config.json])\n AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/reload])\n-if test \"$IS_WIN32\" = \"yes\"; then\n-  OVS_WAIT_UNTIL([test -e socket1])\n-else\n-  OVS_WAIT_UNTIL([test -S socket1])\n-fi\n+OVS_WAIT_UNTIL([test -S socket1])\n AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/list-remotes],\n   [0], [punix:socket1\n ])\n@@ -704,11 +677,7 @@ AT_CHECK([sed -i'back' '/\"remotes\"/a\\\n                     \"punix:socket2\": {},\n                     ' config.json])\n AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/reload])\n-if test \"$IS_WIN32\" = \"yes\"; then\n-  OVS_WAIT_UNTIL([test -e socket2])\n-else\n-  OVS_WAIT_UNTIL([test -S socket2])\n-fi\n+OVS_WAIT_UNTIL([test -S socket2])\n AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/list-remotes],\n   [0], [punix:socket1\n punix:socket2\n@@ -725,11 +694,7 @@ AT_CHECK([sed -i'back' '/punix:socket1/d' config.json])\n AT_CHECK([sed -i'back' 's/\"punix:socket2\": {},/\"punix:socket2\": {}/' config.json])\n AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/reload])\n OVS_WAIT_UNTIL([test ! -e socket1])\n-if test \"$IS_WIN32\" = \"yes\"; then\n-  AT_CHECK([test -e socket2])\n-else\n-  AT_CHECK([test -S socket2])\n-fi\n+AT_CHECK([test -S socket2])\n AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/list-remotes],\n   [0], [punix:socket2\n ])\n@@ -744,7 +709,6 @@ AT_CLEANUP\n \n AT_SETUP([ovsdb-server/add-remote with --monitor])\n AT_KEYWORDS([ovsdb server positive])\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n \n # This test intentionally causes SIGSEGV, so make sanitizers ignore it.\n ASAN_OPTIONS=$ASAN_OPTIONS:handle_segv=0; export ASAN_OPTIONS\n@@ -783,7 +747,6 @@ AT_CLEANUP\n \n AT_SETUP([ovsdb-server/add-remote and remove-remote with --monitor])\n AT_KEYWORDS([ovsdb server positive])\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n \n # This test intentionally causes SIGSEGV, so make sanitizers ignore it.\n ASAN_OPTIONS=$ASAN_OPTIONS:handle_segv=0; export ASAN_OPTIONS\n@@ -827,10 +790,7 @@ AT_CLEANUP\n AT_SETUP([SSL/TLS db: implementation])\n AT_KEYWORDS([ovsdb server positive ssl tls $5])\n AT_SKIP_IF([test \"$HAVE_OPENSSL\" = no])\n-# For this test, we pass PKIDIR through a ovsdb-tool transact and\n-# msys on Windows does not convert the path style automatically.\n-# So, do that forcefully with a 'pwd -W' (called through pwd() function).\n-PKIDIR=\"$(cd $abs_top_builddir/tests && pwd)\"\n+PKIDIR=\"$abs_top_builddir/tests\"\n AT_SKIP_IF([expr \"$PKIDIR\" : \".*[[       '\\\"\n \\\\]]\"])\n AT_DATA([schema],\n@@ -969,10 +929,7 @@ AT_CLEANUP\n AT_SETUP([SSL/TLS db: implementation (TLSv1.3 only)])\n AT_KEYWORDS([ovsdb server positive ssl tls $5])\n AT_SKIP_IF([test \"$HAVE_OPENSSL\" = no])\n-# For this test, we pass PKIDIR through a ovsdb-tool transact and\n-# msys on Windows does not convert the path style automatically.\n-# So, do that forcefully with a 'pwd -W' (called through pwd() function).\n-PKIDIR=\"$(cd $abs_top_builddir/tests && pwd)\"\n+PKIDIR=\"$abs_top_builddir/tests\"\n AT_SKIP_IF([expr \"$PKIDIR\" : \".*[[       '\\\"\n \\\\]]\"])\n AT_DATA([schema],\n@@ -1056,11 +1013,9 @@ ovsdb_check_online_compaction() {\n     dnl the database and the lockfile, creating the target of each symlink rather\n     dnl than replacing the symlinks with regular files.\n     mkdir dir\n-    if test \"$IS_WIN32\" = \"no\"; then\n-        ln -s dir/db db\n-        ln -s dir/.db.~lock~ .db.~lock~\n-        AT_SKIP_IF([test ! -h db || test ! -h .db.~lock~])\n-    fi\n+    ln -s dir/db db\n+    ln -s dir/.db.~lock~ .db.~lock~\n+    AT_SKIP_IF([test ! -h db || test ! -h .db.~lock~])\n     AT_CHECK([if test $model = standalone; then\n                   ovsdb-tool create db schema\n               else\n@@ -1151,12 +1106,10 @@ ovs-appctl: ovsdb-server: server returned an error\n ])\n     dnl Make sure that \"db\" is still a symlink to dir/db instead of getting\n     dnl replaced by a regular file, ditto for .db.~lock~.\n-    if test \"$IS_WIN32\" = \"no\"; then\n-        AT_CHECK([test -h db])\n-        AT_CHECK([test -h .db.~lock~])\n-        AT_CHECK([test -f dir/db])\n-        AT_CHECK([test -f dir/.db.~lock~])\n-    fi\n+    AT_CHECK([test -h db])\n+    AT_CHECK([test -h .db.~lock~])\n+    AT_CHECK([test -f dir/db])\n+    AT_CHECK([test -f dir/.db.~lock~])\n \n     # We can't fully re-check the contents of the database log, because the\n     # order of the records is not predictable, but there should only be 4 lines\n@@ -1248,11 +1201,9 @@ ovsdb_check_online_conversion() {\n     dnl the database and the lockfile, creating the target of each symlink\n     dnl rather than replacing the symlinks with regular files.\n     mkdir dir\n-    if test \"$IS_WIN32\" = \"no\"; then\n-        ln -s dir/db db\n-        ln -s dir/.db.~lock~ .db.~lock~\n-        AT_SKIP_IF([test ! -h db || test ! -h .db.~lock~])\n-    fi\n+    ln -s dir/db db\n+    ln -s dir/.db.~lock~ .db.~lock~\n+    AT_SKIP_IF([test ! -h db || test ! -h .db.~lock~])\n     AT_CHECK([if test $model = standalone; then\n                   ovsdb-tool create db schema\n               else\n@@ -1494,12 +1445,10 @@ _uuid                                number\n \n     dnl Make sure that \"db\" is still a symlink to dir/db instead of getting\n     dnl replaced by a regular file, ditto for .db.~lock~.\n-    if test \"$IS_WIN32\" = \"no\"; then\n-        AT_CHECK([test -h db])\n-        AT_CHECK([test -h .db.~lock~])\n-        AT_CHECK([test -f dir/db])\n-        AT_CHECK([test -f dir/.db.~lock~])\n-    fi\n+    AT_CHECK([test -h db])\n+    AT_CHECK([test -h .db.~lock~])\n+    AT_CHECK([test -f dir/db])\n+    AT_CHECK([test -f dir/.db.~lock~])\n \n     OVSDB_SERVER_SHUTDOWN\n }\n@@ -1863,7 +1812,6 @@ AT_BANNER([OVSDB -- transactions on transient ovsdb-server])\n # TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.\n m4_define([OVSDB_CHECK_EXECUTION], \n   [AT_SETUP([$1])\n-   AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n    AT_KEYWORDS([ovsdb server positive transient $5])\n    $2 > schema\n    AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore])\ndiff --git a/tests/ovsdb-tool.at b/tests/ovsdb-tool.at\nindex cf4a0fd2e..6535669ab 100644\n--- a/tests/ovsdb-tool.at\n+++ b/tests/ovsdb-tool.at\n@@ -55,16 +55,12 @@ dnl with a regular file, and that the lockfile gets created relative to\n dnl the symlink's target.\n mkdir dir\n : > dir/.db.~lock~\n-if test \"$IS_WIN32\" = \"no\"; then\n-    ln -s dir/db db\n-    AT_SKIP_IF([test ! -h db])\n-fi\n+ln -s dir/db db\n+AT_SKIP_IF([test ! -h db])\n AT_CHECK([ovsdb-tool create db schema], [0], [], [ignore])\n-if test \"$IS_WIN32\" = \"no\"; then\n-    AT_CHECK([test ! -e .db.~lock])\n-    AT_CHECK([test -h db])\n-    AT_CHECK([test -f dir/db])\n-fi\n+AT_CHECK([test ! -e .db.~lock])\n+AT_CHECK([test -h db])\n+AT_CHECK([test -f dir/db])\n dnl Do a bunch of random transactions that put crap in the database log.\n AT_CHECK(\n   [[for pair in 'zero 0' 'one 1' 'two 2' 'three 3' 'four 4' 'five 5'; do\n@@ -140,11 +136,9 @@ touch .db.tmp.~lock~\n AT_CHECK([[ovsdb-tool compact db]], [0], [], [ignore])\n dnl Make sure that \"db\" is still a symlink to dir/db instead of getting\n dnl replaced by a regular file.\n-if test \"$IS_WIN32\" = \"no\"; then\n-    AT_CHECK([test ! -e .db.~lock])\n-    AT_CHECK([test -h db])\n-    AT_CHECK([test -f dir/db])\n-fi\n+AT_CHECK([test ! -e .db.~lock])\n+AT_CHECK([test -h db])\n+AT_CHECK([test -f dir/db])\n dnl We can't fully re-check the contents of the database log, because the\n dnl order of the records is not predictable, but there should only be 4 lines\n dnl in it now.\ndiff --git a/tests/pfd-stream.at b/tests/pfd-stream.at\nindex 95a8cba15..6d5b8c965 100644\n--- a/tests/pfd-stream.at\n+++ b/tests/pfd-stream.at\n@@ -2,7 +2,6 @@ AT_BANNER([pfd stream - pre-opened file descriptor])\n \n AT_SETUP([pfd stream - basic listen and accept])\n AT_KEYWORDS([pfd])\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n ordinal_schema > schema\n AT_CHECK([ovsdb-tool create db schema], [0], [ignore], [ignore])\n on_exit 'kill `cat *.pid`'\n@@ -39,7 +38,6 @@ AT_CLEANUP\n \n AT_SETUP([pfd stream - JSON-RPC over pfd])\n AT_KEYWORDS([pfd])\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n on_exit 'kill `cat *.pid`'\n \n # Use Python to create a listening socket and exec test-jsonrpc.\n@@ -68,7 +66,6 @@ AT_CLEANUP\n \n AT_SETUP([pfd stream - invalid fd])\n AT_KEYWORDS([pfd])\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n ordinal_schema > schema\n AT_CHECK([ovsdb-tool create db schema], [0], [ignore], [ignore])\n on_exit 'kill `cat *.pid`'\n@@ -97,7 +94,6 @@ AT_CLEANUP\n \n AT_SETUP([pfd stream - fd is not a socket])\n AT_KEYWORDS([pfd])\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n ordinal_schema > schema\n AT_CHECK([ovsdb-tool create db schema], [0], [ignore], [ignore])\n on_exit 'kill `cat *.pid`'\n@@ -133,7 +129,6 @@ AT_CLEANUP\n \n AT_SETUP([pfd stream - fd is not listening])\n AT_KEYWORDS([pfd])\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n ordinal_schema > schema\n AT_CHECK([ovsdb-tool create db schema], [0], [ignore], [ignore])\n on_exit 'kill `cat *.pid`'\n@@ -159,7 +154,6 @@ AT_CLEANUP\n \n AT_SETUP([pfd stream - rejected via add-remote])\n AT_KEYWORDS([pfd])\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n ordinal_schema > schema\n AT_CHECK([ovsdb-tool create db schema], [0], [ignore], [ignore])\n on_exit 'kill `cat *.pid`'\n@@ -177,7 +171,6 @@ AT_CLEANUP\n \n AT_SETUP([pfd stream - rejected via database])\n AT_KEYWORDS([pfd])\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n ordinal_schema > schema\n AT_CHECK([ovsdb-tool create db schema], [0], [ignore], [ignore])\n on_exit 'kill `cat *.pid`'\n@@ -204,7 +197,6 @@ AT_CLEANUP\n \n AT_SETUP([pfd stream - rejected via Manager table])\n AT_KEYWORDS([pfd])\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n AT_DATA([schema],\n   [[{\"name\": \"mydb\",\n      \"tables\": {\ndiff --git a/tests/system-kmod-macros.at b/tests/system-kmod-macros.at\nindex 2b42e7797..c29ea82ed 100644\n--- a/tests/system-kmod-macros.at\n+++ b/tests/system-kmod-macros.at\n@@ -117,12 +117,8 @@ m4_define([CHECK_CONNTRACK_NAT])\n #\n # Perform requirements checks for running conntrack all-zero IP SNAT tests.\n # The kernel always supports all-zero IP SNAT, so no check is needed.\n-# However, the Windows datapath using the same netlink interface does not.\n #\n-m4_define([CHECK_CONNTRACK_ZEROIP_SNAT],\n-[\n-    AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n-])\n+m4_define([CHECK_CONNTRACK_ZEROIP_SNAT])\n \n # CHECK_CONNTRACK_SCTP()\n #\n@@ -131,7 +127,6 @@ m4_define([CHECK_CONNTRACK_ZEROIP_SNAT],\n #\n m4_define([CHECK_CONNTRACK_SCTP],\n [\n-   AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n    AT_SKIP_IF([! test -e /proc/sys/net/netfilter/nf_conntrack_sctp_timeout_closed])\n ])\n \ndiff --git a/tests/test-byteq.c b/tests/test-byteq.c\nindex 0fbbffd19..6a9e73755 100644\n--- a/tests/test-byteq.c\n+++ b/tests/test-byteq.c\n@@ -114,7 +114,6 @@ test_byteq_fast_forward(void)\n static void\n test_byteq_write_read(void)\n {\n-#ifndef _WIN32\n     int fd[2];\n     pid_t childpid;\n     int rc;\n@@ -151,7 +150,6 @@ test_byteq_write_read(void)\n             ovs_assert(byteq_get(&bq) == input[i]);\n         }\n     }\n-#endif /* _WIN32 */\n }\n \n static void\ndiff --git a/tests/test-daemon.py b/tests/test-daemon.py\nindex 3f4200d61..0fb86ed4a 100644\n--- a/tests/test-daemon.py\n+++ b/tests/test-daemon.py\n@@ -26,10 +26,7 @@ def handler(signum, _):\n \n \n def main():\n-\n-    if sys.platform != 'win32':\n-        # signal.SIGHUP does not exist on Windows\n-        signal.signal(signal.SIGHUP, handler)\n+    signal.signal(signal.SIGHUP, handler)\n \n     parser = argparse.ArgumentParser(\n             description=\"Open vSwitch daemonization test program for Python.\")\ndiff --git a/tests/test-jsonrpc.c b/tests/test-jsonrpc.c\nindex 02504c289..a60a18272 100644\n--- a/tests/test-jsonrpc.c\n+++ b/tests/test-jsonrpc.c\n@@ -43,7 +43,6 @@ test_jsonrpc_main(int argc, char *argv[])\n     struct ovs_cmdl_context ctx = { .argc = 0, };\n     ovs_cmdl_proctitle_init(argc, argv);\n     set_program_name(argv[0]);\n-    service_start(&argc, &argv);\n     parse_options(argc, argv);\n     ctx.argc = argc - optind;\n     ctx.argv = argv + optind;\ndiff --git a/tests/test-jsonrpc.py b/tests/test-jsonrpc.py\nindex 8a4a17593..caab9326a 100644\n--- a/tests/test-jsonrpc.py\n+++ b/tests/test-jsonrpc.py\n@@ -51,17 +51,11 @@ def handle_rpc(rpc, msg):\n \n \n def do_listen(name):\n-    if sys.platform != 'win32' or (\n-            ovs.daemon._detach and ovs.daemon._detached):\n-        # On Windows the child is a new process created which should be the\n-        # one that creates the PassiveStream. Without this check, the new\n-        # child process will create a new PassiveStream overwriting the one\n-        # that the parent process created.\n-        error, pstream = ovs.stream.PassiveStream.open(name)\n-        if error:\n-            sys.stderr.write(\"could not listen on \\\"%s\\\": %s\\n\"\n-                             % (name, os.strerror(error)))\n-            sys.exit(1)\n+    error, pstream = ovs.stream.PassiveStream.open(name)\n+    if error:\n+        sys.stderr.write(\"could not listen on \\\"%s\\\": %s\\n\"\n+                         % (name, os.strerror(error)))\n+        sys.exit(1)\n \n     ovs.daemon.daemonize()\n \ndiff --git a/tests/test-lockfile.c b/tests/test-lockfile.c\nindex d0c8dc480..64876947f 100644\n--- a/tests/test-lockfile.c\n+++ b/tests/test-lockfile.c\n@@ -90,7 +90,6 @@ run_lock_blocks_same_process_twice(void)\n     lockfile_unlock(lockfile);\n }\n \n-#ifndef _WIN32\n static enum { PARENT, CHILD }\n do_fork(void)\n {\n@@ -214,7 +213,6 @@ run_lock_symlink_to_dir(void)\n \n     lockfile_unlock(a);\n }\n-#endif /* _WIN32 */\n \n static void\n run_lock_multiple(void)\n@@ -244,13 +242,11 @@ static const struct test tests[] = {\n     TEST(lock_and_unlock_twice),\n     TEST(lock_blocks_same_process),\n     TEST(lock_blocks_same_process_twice),\n-#ifndef _WIN32\n     TEST(lock_blocks_other_process),\n     TEST(lock_twice_blocks_other_process),\n     TEST(lock_and_unlock_allows_other_process),\n     TEST(lock_symlink),\n     TEST(lock_symlink_to_dir),\n-#endif /* _WIN32 */\n     TEST(lock_multiple),\n     TEST(help),\n     { NULL, NULL }\n@@ -292,7 +288,6 @@ test_lockfile_main(int argc, char *argv[])\n             (tests[i].function)();\n \n             n_children = 0;\n-#ifndef _WIN32\n             while (wait(&status) > 0) {\n                 if (WIFEXITED(status) && WEXITSTATUS(status) == 11) {\n                     n_children++;\n@@ -304,7 +299,6 @@ test_lockfile_main(int argc, char *argv[])\n             if (errno != ECHILD) {\n                 ovs_fatal(errno, \"wait\");\n             }\n-#endif /* _WIN32 */\n \n             printf(\"%s: success (%d child%s)\\n\",\n                    tests[i].name, n_children, n_children != 1 ? \"ren\" : \"\");\ndiff --git a/tests/test-netflow.c b/tests/test-netflow.c\nindex 7f89cfcae..770a3a919 100644\n--- a/tests/test-netflow.c\n+++ b/tests/test-netflow.c\n@@ -180,7 +180,6 @@ test_netflow_main(int argc, char *argv[])\n \n     ovs_cmdl_proctitle_init(argc, argv);\n     set_program_name(argv[0]);\n-    service_start(&argc, &argv);\n     parse_options(argc, argv);\n \n     if (argc - optind != 1) {\ndiff --git a/tests/test-ovsdb.c b/tests/test-ovsdb.c\nindex 95290ae78..bef01486f 100644\n--- a/tests/test-ovsdb.c\n+++ b/tests/test-ovsdb.c\n@@ -92,7 +92,6 @@ parse_options(int argc, char *argv[], struct test_ovsdb_pvt_context *pvt)\n {\n     enum {\n         OPT_MAGIC = CHAR_MAX + 1,\n-        OPT_NO_RENAME_OPEN_FILES\n     };\n     static const struct option long_options[] = {\n         {\"timeout\", required_argument, NULL, 't'},\n@@ -101,7 +100,6 @@ parse_options(int argc, char *argv[], struct test_ovsdb_pvt_context *pvt)\n         {\"write-changed-only\", optional_argument, NULL, 'w'},\n         {\"assert-read-only\", optional_argument, NULL, 'r'},\n         {\"magic\", required_argument, NULL, OPT_MAGIC},\n-        {\"no-rename-open-files\", no_argument, NULL, OPT_NO_RENAME_OPEN_FILES},\n         {\"help\", no_argument, NULL, 'h'},\n         {NULL, 0, NULL, 0},\n     };\n@@ -149,10 +147,6 @@ parse_options(int argc, char *argv[], struct test_ovsdb_pvt_context *pvt)\n             magic = optarg;\n             break;\n \n-        case OPT_NO_RENAME_OPEN_FILES:\n-            ovsdb_log_disable_renaming_open_files();\n-            break;\n-\n         case '?':\n             exit(EXIT_FAILURE);\n \n@@ -170,7 +164,7 @@ usage(void)\n {\n     printf(\"%s: Open vSwitch database test utility\\n\"\n            \"usage: %s [OPTIONS] COMMAND [ARG...]\\n\\n\"\n-           \"  [--magic=MAGIC] [--no-rename-open-files] \"\n+           \"  [--magic=MAGIC] \"\n            \" log-io FILE FLAGS COMMAND...\\n\"\n            \"    open FILE with FLAGS (and MAGIC), run COMMANDs\\n\"\n            \"  default-atoms\\n\"\ndiff --git a/tests/test-rculist.c b/tests/test-rculist.c\nindex 07a6338b8..42cc3b22c 100644\n--- a/tests/test-rculist.c\n+++ b/tests/test-rculist.c\n@@ -36,11 +36,7 @@ struct element {\n static void\n do_usleep(unsigned int usecs)\n {\n-#ifdef _WIN32\n-    Sleep(MAX(usecs / 1000, 1));\n-#else\n     usleep(usecs);\n-#endif\n }\n \n /* Continuously check the integrity of the list until it's empty. */\ndiff --git a/tests/test-sflow.c b/tests/test-sflow.c\nindex 3c617bdd1..ec53fde33 100644\n--- a/tests/test-sflow.c\n+++ b/tests/test-sflow.c\n@@ -694,7 +694,6 @@ test_sflow_main(int argc, char *argv[])\n \n     ovs_cmdl_proctitle_init(argc, argv);\n     set_program_name(argv[0]);\n-    service_start(&argc, &argv);\n     parse_options(argc, argv);\n \n     if (argc - optind != 1) {\ndiff --git a/tests/test-stopwatch.c b/tests/test-stopwatch.c\nindex 44852db19..0ea2d072e 100644\n--- a/tests/test-stopwatch.c\n+++ b/tests/test-stopwatch.c\n@@ -289,7 +289,6 @@ test_stopwatch_unixctl_main(int argc, char *argv[])\n \n     ovs_cmdl_proctitle_init(argc, argv);\n     set_program_name(argv[0]);\n-    service_start(&argc, &argv);\n     fatal_ignore_sigpipe();\n     parse_options(&argc, &argv, &unixctl_path);\n \n@@ -338,7 +337,6 @@ test_stopwatch_unixctl_main(int argc, char *argv[])\n     }\n     unixctl_server_destroy(unixctl);\n \n-    service_stop();\n     return 0;\n }\n \ndiff --git a/tests/test-unixctl.c b/tests/test-unixctl.c\nindex 9e8982789..86d16c08d 100644\n--- a/tests/test-unixctl.c\n+++ b/tests/test-unixctl.c\n@@ -79,7 +79,6 @@ test_unixctl_main(int argc, char *argv[])\n \n     ovs_cmdl_proctitle_init(argc, argv);\n     set_program_name(argv[0]);\n-    service_start(&argc, &argv);\n     fatal_ignore_sigpipe();\n     parse_options(&argc, &argv, &unixctl_path);\n \n@@ -107,7 +106,6 @@ test_unixctl_main(int argc, char *argv[])\n     }\n     unixctl_server_destroy(unixctl);\n \n-    service_stop();\n     return 0;\n }\n \ndiff --git a/tests/test-util.c b/tests/test-util.c\nindex 5d88d38f2..1233c9f0b 100644\n--- a/tests/test-util.c\n+++ b/tests/test-util.c\n@@ -1183,7 +1183,6 @@ test_sat_math(struct ovs_cmdl_context *ctx OVS_UNUSED)\n     }\n }\n \n-#ifndef _WIN32\n static void\n test_file_name(struct ovs_cmdl_context *ctx)\n {\n@@ -1201,7 +1200,6 @@ test_file_name(struct ovs_cmdl_context *ctx)\n         free(base);\n     }\n }\n-#endif /* _WIN32 */\n \f\n static const struct ovs_cmdl_command commands[] = {\n     {\"ctz\", NULL, 0, 0, test_ctz, OVS_RO},\n@@ -1220,9 +1218,7 @@ static const struct ovs_cmdl_command commands[] = {\n     {\"ovs_scan\", NULL, 0, 0, test_ovs_scan, OVS_RO},\n     {\"snprintf\", NULL, 0, 0, test_snprintf, OVS_RO},\n     {\"sat_math\", NULL, 0, 0, test_sat_math, OVS_RO},\n-#ifndef _WIN32\n     {\"file_name\", NULL, 1, INT_MAX, test_file_name, OVS_RO},\n-#endif\n     {NULL, NULL, 0, 0, NULL, OVS_RO},\n };\n \n@@ -1263,10 +1259,9 @@ test_util_main(int argc, char *argv[])\n     struct ovs_cmdl_context ctx = { .argc = 0, };\n     set_program_name(argv[0]);\n     parse_options(argc, argv);\n-    /* On Windows, stderr is fully buffered if connected to a pipe.\n-     * Make it _IONBF so that an abort does not miss log contents.\n-     * POSIX doesn't define the circumstances in which stderr is\n-     * fully buffered either. */\n+    /* POSIX doesn't define the circumstances in which stderr is\n+     * fully buffered.  Make it _IONBF so that an abort does not\n+     * miss log contents.*/\n     setvbuf(stderr, NULL, _IONBF, 0);\n     ctx.argc = argc - optind;\n     ctx.argv = argv + optind;\ndiff --git a/tests/test-vconn.c b/tests/test-vconn.c\nindex 96c89bd4e..d66ae1fc6 100644\n--- a/tests/test-vconn.c\n+++ b/tests/test-vconn.c\n@@ -157,11 +157,7 @@ test_refuse_connection(struct ovs_cmdl_context *ctx)\n     error = vconn_connect_block(vconn, (TIMEOUT - 2) * 1000);\n     if (!strcmp(type, \"tcp\")) {\n         if (error != ECONNRESET && error != EPIPE && error != ETIMEDOUT\n-            && error != ECONNREFUSED\n-#ifdef _WIN32\n-            && error != WSAECONNRESET\n-#endif\n-            ) {\n+            && error != ECONNREFUSED) {\n             ovs_fatal(0, \"unexpected vconn_connect() return value %d (%s)\",\n                       error, ovs_strerror(error));\n         }\n@@ -199,11 +195,7 @@ test_accept_then_close(struct ovs_cmdl_context *ctx)\n \n     error = vconn_connect_block(vconn, -1);\n     if (!strcmp(type, \"tcp\") || !strcmp(type, \"unix\")) {\n-        if (error != ECONNRESET && error != EPIPE\n-#ifdef _WIN32\n-            && error != WSAECONNRESET\n-#endif\n-            ) {\n+        if (error != ECONNRESET && error != EPIPE) {\n             ovs_fatal(0, \"unexpected vconn_connect() return value %d (%s)\",\n                       error, ovs_strerror(error));\n         }\ndiff --git a/tests/testsuite.patch b/tests/testsuite.patch\ndeleted file mode 100644\nindex e0c6bb35a..000000000\n--- a/tests/testsuite.patch\n+++ /dev/null\n@@ -1,76 +0,0 @@\n---- testsuite\t2015-02-11 17:19:21.654646439 -0800\n-+++ testsuite\t2015-02-11 17:15:03.810653032 -0800\n-@@ -4669,6 +4669,73 @@\n-   fi\n-   exec 6<&-\n-   wait\n-+elif test $at_jobs -ne 1 &&\n-+     test \"$IS_WIN32\" = \"yes\"; then\n-+  # FIFO job dispatcher.\n-+  trap 'at_pids=\n-+\tfor at_pid in `jobs -p`; do\n-+\t  at_pids=\"$at_pids $at_job_group$at_pid\"\n-+\tdone\n-+\tif test -n \"$at_pids\"; then\n-+\t  at_sig=TSTP\n-+\t  test \"${TMOUT+set}\" = set && at_sig=STOP\n-+\t  kill -$at_sig $at_pids 2>/dev/null\n-+\tfi\n-+\tkill -STOP $$\n-+\ttest -z \"$at_pids\" || kill -CONT $at_pids 2>/dev/null' TSTP\n-+\n-+  echo\n-+  # Turn jobs into a list of numbers, starting from 1.\n-+  running_jobs=\"`pwd`/tests/jobdispatcher\"\n-+  mkdir -p $running_jobs\n-+  at_joblist=`$as_echo \"$at_groups\" | sed -n 1,${at_jobs}p`\n-+\n-+  set X $at_joblist\n-+  shift\n-+  for at_group in $at_groups; do\n-+    $at_job_control_on 2>/dev/null\n-+    (\n-+      # Start one test group.\n-+      $at_job_control_off\n-+      touch $running_jobs/$at_group\n-+      trap 'set +x; set +e\n-+\t    trap \"\" PIPE\n-+\t    echo stop > \"$at_stop_file\"\n-+\t    rm -f $running_jobs/$at_group\n-+\t    as_fn_exit 141' PIPE\n-+      at_fn_group_prepare\n-+      if cd \"$at_group_dir\" &&\n-+\t at_fn_test $at_group &&\n-+\t . \"$at_test_source\"\n-+      then :; else\n-+\t{ $as_echo \"$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group\" >&5\n-+$as_echo \"$as_me: WARNING: unable to parse test group: $at_group\" >&2;}\n-+\tat_failed=:\n-+      fi\n-+      rm -f $running_jobs/$at_group\n-+      at_fn_group_postprocess\n-+    ) &\n-+    $at_job_control_off\n-+    shift # Consume one token.\n-+    if test $# -gt 0; then :; else\n-+      while [ \"`ls -l $running_jobs 2>/dev/null | wc -l`\" -gt \"$at_jobs\" ]; do\n-+        sleep 0.1\n-+      done\n-+      set x $*\n-+    fi\n-+    test -f \"$at_stop_file\" && break\n-+  done\n-+  # Read back the remaining ($at_jobs - 1) tokens.\n-+  set X $at_joblist\n-+  shift\n-+  if test $# -gt 0; then\n-+    shift\n-+    while [ \"`ls -l $running_jobs | wc -l`\" -gt 1 ]; do\n-+      sleep 0.1\n-+    done\n-+  fi\n-+  rmdir $running_jobs\n-+  wait\n- else\n-   # Run serially, avoid forks and other potential surprises.\n-   for at_group in $at_groups; do\ndiff --git a/tests/tunnel.at b/tests/tunnel.at\nindex c4b84603a..b732d9a46 100644\n--- a/tests/tunnel.at\n+++ b/tests/tunnel.at\n@@ -1074,15 +1074,9 @@ AT_SETUP([tunnel - concomitant incompatible tunnels on the same port])\n OVS_VSWITCHD_START([add-port br0 p1 -- set Interface p1 type=vxlan \\\n                     options:remote_ip=flow ofport_request=1])\n \n-if test \"$IS_WIN32\" = \"yes\"; then\n-AT_CHECK([ovs-vsctl add-port br0 p2 -- set Interface p2 type=vxlan \\\n-                    options:remote_ip=flow options:exts=gbp options:key=1 ofport_request=2], [160],\n-  [], [ignore])\n-else\n AT_CHECK([ovs-vsctl add-port br0 p2 -- set Interface p2 type=vxlan \\\n                     options:remote_ip=flow options:exts=gbp options:key=1 ofport_request=2], [65],\n   [], [ignore])\n-fi\n \n AT_CHECK([grep 'p2: could not set configuration (File exists)' ovs-vswitchd.log | sed \"s/^.*\\(p2:.*\\)$/\\1/\"], [0],\n   [p2: could not set configuration (File exists)\ndiff --git a/tests/unixctl-py.at b/tests/unixctl-py.at\nindex ae8bd5ad1..a9f93a199 100644\n--- a/tests/unixctl-py.at\n+++ b/tests/unixctl-py.at\n@@ -73,17 +73,10 @@ AT_CHECK([PYAPPCTL_PY -t bogus doit], [1], [], [stderr])\n AT_CHECK_UNQUOTED([tail -1 stderr], [0], [dnl\n appctl.py: cannot read pidfile \"`pwd`/bogus.pid\" (No such file or directory)\n ])\n-if test \"$IS_WIN32\" = \"no\"; then\n-  AT_CHECK([PYAPPCTL_PY -t /bogus/path.pid doit], [1], [], [stderr])\n-  AT_CHECK([tail -1 stderr], [0], [dnl\n+AT_CHECK([PYAPPCTL_PY -t /bogus/path.pid doit], [1], [], [stderr])\n+AT_CHECK([tail -1 stderr], [0], [dnl\n appctl.py: cannot connect to \"/bogus/path.pid\" (No such file or directory)\n ])\n-else\n-  AT_CHECK([PYAPPCTL_PY -t c:/bogus/path.pid doit], [1], [], [stderr])\n-  AT_CHECK([tail -1 stderr], [0], [dnl\n-appctl.py: cannot connect to \"c:/bogus/path.pid\" (No such file or directory)\n-])\n-fi\n AT_CLEANUP\n \n AT_SETUP([unixctl server - Python3])\ndiff --git a/tests/vlog.at b/tests/vlog.at\nindex 2768c0740..8a8b7511d 100644\n--- a/tests/vlog.at\n+++ b/tests/vlog.at\n@@ -109,9 +109,6 @@ s/.*|//' \"$@\"\n m4_divert_pop([PREPARE_TESTS])\n \n AT_SETUP([vlog - vlog/reopen - C])\n-# This test won't work as-is on Windows because Windows doesn't allow\n-# files that are open to be renamed.\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n on_exit 'kill `cat test-unixctl.pid`'\n \n AT_CAPTURE_FILE([log])\n@@ -143,9 +140,6 @@ message3\n AT_CLEANUP\n \n AT_SETUP([vlog - vlog/reopen - Python3])\n-# This test won't work as-is on Windows because Windows doesn't allow\n-# files that are open to be renamed.\n-AT_SKIP_IF([test \"$IS_WIN32\" = \"yes\"])\n on_exit 'kill `cat test-unixctl.py.pid`'\n \n AT_CAPTURE_FILE([log])\ndiff --git a/utilities/checkpatch.py b/utilities/checkpatch.py\nindex 9a10b78a9..2f7123586 100755\n--- a/utilities/checkpatch.py\n+++ b/utilities/checkpatch.py\n@@ -1059,7 +1059,7 @@ def ovs_checkpatch_parse(text, filename, author=None, committer=None):\n                 continue\n \n             # Skip files which have /datapath in them, since they are\n-            # linux or windows coding standards\n+            # linux coding standards\n             if current_file.startswith('datapath'):\n                 continue\n             if current_file.startswith('include/linux'):\ndiff --git a/utilities/ovs-appctl.c b/utilities/ovs-appctl.c\nindex 682ee100c..d1fffd7e9 100644\n--- a/utilities/ovs-appctl.c\n+++ b/utilities/ovs-appctl.c\n@@ -293,7 +293,6 @@ connect_to_target(const char *target)\n     char *socket_name;\n     int error;\n \n-#ifndef _WIN32\n     if (target[0] != '/') {\n         char *pidfile_name;\n         pid_t pid;\n@@ -306,12 +305,6 @@ connect_to_target(const char *target)\n         free(pidfile_name);\n         socket_name = xasprintf(\"%s/%s.%ld.ctl\",\n                                 ovs_rundir(), target, (long int) pid);\n-#else\n-    /* On windows, if the 'target' contains ':', we make an assumption that\n-     * it is an absolute path. */\n-    if (!strchr(target, ':')) {\n-        socket_name = xasprintf(\"%s/%s.ctl\", ovs_rundir(), target);\n-#endif\n     } else {\n         socket_name = xstrdup(target);\n     }\ndiff --git a/utilities/ovs-dpctl.8.in b/utilities/ovs-dpctl.8.in\nindex 4d0c7cbb7..2c8c96a9b 100644\n--- a/utilities/ovs-dpctl.8.in\n+++ b/utilities/ovs-dpctl.8.in\n@@ -15,11 +15,10 @@ The \\fBovs\\-dpctl\\fR program can create, modify, and delete Open vSwitch\n datapaths.  A single machine may host any number of datapaths.\n .PP\n This program works only with datapaths that are implemented outside of\n-\\fBovs\\-vswitchd\\fR itself, such as the Linux and Windows kernel-based\n-datapaths.  To manage datapaths that are integrated into\n-\\fBovs\\-vswitchd\\fR, such as the userspace (\\fBnetdev\\fR) datapath,\n-use \\fBovs\\-appctl\\fR(8) to invoke the \\fBdpctl/*\\fR commands, which\n-are documented in \\fBovs\\-vswitchd\\fR(8).\n+\\fBovs\\-vswitchd\\fR itself, such as the Linux kernel datapath.  To\n+manage datapaths that are integrated into \\fBovs\\-vswitchd\\fR, such as\n+the userspace (\\fBnetdev\\fR) datapath, use \\fBovs\\-appctl\\fR(8) to invoke\n+the \\fBdpctl/*\\fR commands, which are documented in \\fBovs\\-vswitchd\\fR(8).\n .PP\n A newly created datapath is associated with only one network device, a\n virtual network device sometimes called the datapath's ``local port''.\ndiff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c\nindex ba3458e55..871d643d9 100644\n--- a/utilities/ovs-ofctl.c\n+++ b/utilities/ovs-ofctl.c\n@@ -173,7 +173,6 @@ main(int argc, char *argv[])\n {\n     struct ovs_cmdl_context ctx = { .argc = 0, };\n     set_program_name(argv[0]);\n-    service_start(&argc, &argv);\n     parse_options(argc, argv);\n     fatal_ignore_sigpipe();\n     ctx.argc = argc - optind;\ndiff --git a/utilities/ovs-pki.in b/utilities/ovs-pki.in\nindex f1b101b0f..2335afa83 100755\n--- a/utilities/ovs-pki.in\n+++ b/utilities/ovs-pki.in\n@@ -57,77 +57,6 @@ FreeBSD|NetBSD|Darwin)\n     ;;\n esac\n \n-case $(uname -s) in\n-MINGW*|MSYS*)\n-    chmod()\n-    {\n-        local PERM=$1\n-        local FILE=$2\n-        local INH=\n-\n-        if test -d \"${FILE}\"; then\n-            # Inheritance rules for folders: apply to a folder itself,\n-            # subfolders and files within.\n-            INH='(OI)(CI)'\n-        fi\n-\n-        case \"${PERM}\" in\n-        *700 | *600)\n-            # Reset all own and inherited ACEs and grant full access to the\n-            # \"Creator Owner\".  We're giving full access even for 0600,\n-            # because it doesn't matter for a use case of ovs-pki.\n-            icacls \"${FILE}\" /inheritance:r /grant:r \"*S-1-3-0:${INH}F\"\n-            ;;\n-        *750)\n-            # Reset all own and inherited ACEs, grant full access to the\n-            # \"Creator Owner\" and a read+execute access to the \"Creator Group\".\n-            icacls \"${FILE}\" /inheritance:r /grant:r \\\n-                \"*S-1-3-0:${INH}F\" \"*S-1-3-1:${INH}RX\"\n-            ;;\n-        *)\n-            echo >&2 \"Unable to set ${PERM} mode for ${FILE}.\"\n-            exit 1\n-            ;;\n-        esac\n-    }\n-\n-    mkdir()\n-    {\n-        ARG_P=\n-        PERM=\n-        for arg; do\n-            shift\n-            case ${arg} in\n-            -m?*)\n-                PERM=${arg#??}\n-                continue\n-                ;;\n-            -m)\n-                PERM=$1\n-                shift\n-                continue\n-                ;;\n-            -p)\n-                ARG_P=-p\n-                continue\n-                ;;\n-            *)\n-                set -- \"$@\" \"${arg}\"\n-                ;;\n-            esac\n-        done\n-\n-        command mkdir ${ARG_P} $@\n-        if [ ${PERM} ]; then\n-            for dir; do\n-                shift\n-                chmod ${PERM} ${dir}\n-            done\n-        fi\n-    }\n-    ;;\n-esac\n-\n for option; do\n     # This option-parsing mechanism borrowed from a Autoconf-generated\n     # configure script under the following license:\n@@ -537,10 +466,6 @@ CN = $cn\n [ v3_req ]\n subjectAltName = DNS:$cn\n EOF\n-    # It is important to create private keys in $TMP because umask doesn't\n-    # work on Windows and permissions there are inherited from the folder.\n-    # umask itself is still needed though to ensure correct permissions\n-    # on non-Windows platforms.\n     if test $keytype = rsa; then\n         (umask 077 && openssl genrsa -out \"$TMP/privkey.pem\" $bits) \\\n             1>&3 2>&3 || exit $?\n@@ -549,9 +474,7 @@ EOF\n         (umask 077 && openssl gendsa -out \"$TMP/privkey.pem\" \"$dsaparam\") \\\n             1>&3 2>&3 || exit $?\n     fi\n-    # Windows: applying permissions (ACEs) to the file itself, just in case.\n-    # 'mv' should technically preserve all the inherited ACEs from a TMP\n-    # folder, but it's better to not rely on that.\n+    # Applying permissions to the file itself, just in case.\n     chmod 0600 \"$TMP/privkey.pem\"\n     mv \"$TMP/privkey.pem\" \"$1-privkey.pem\"\n \ndiff --git a/utilities/ovs-testcontroller.c b/utilities/ovs-testcontroller.c\nindex 9f2fbfdf5..b1255c521 100644\n--- a/utilities/ovs-testcontroller.c\n+++ b/utilities/ovs-testcontroller.c\n@@ -105,7 +105,6 @@ main(int argc, char *argv[])\n \n     ovs_cmdl_proctitle_init(argc, argv);\n     set_program_name(argv[0]);\n-    service_start(&argc, &argv);\n     parse_options(argc, argv);\n     fatal_ignore_sigpipe();\n \ndiff --git a/utilities/ovs-vsctl.8.in b/utilities/ovs-vsctl.8.in\nindex 51f4d2a2c..95951a3a7 100644\n--- a/utilities/ovs-vsctl.8.in\n+++ b/utilities/ovs-vsctl.8.in\n@@ -913,7 +913,7 @@ Usage, syntax, or configuration file error.\n .IP \"2\"\n The \\fIbridge\\fR argument to \\fBbr\\-exists\\fR specified the name of a\n bridge that does not exist.\n-.IP \"65 (Linux and BSD) or 160 (Windows)\"\n+.IP \"65\"\n The database transaction was committed successfully, but \\fBovs\\-vsctl\\fR failed\n while waiting for \\fBovs\\-vswitchd\\fR to finish reconfiguring itself to reflect\n the changes.  This typically happens when \\fB--no\\-wait\\fR is not specified and\ndiff --git a/utilities/ovs-vsctl.c b/utilities/ovs-vsctl.c\nindex d90db934b..5f7b3050b 100644\n--- a/utilities/ovs-vsctl.c\n+++ b/utilities/ovs-vsctl.c\n@@ -25,6 +25,7 @@\n #include <stdarg.h>\n #include <stdlib.h>\n #include <string.h>\n+#include <sysexits.h>\n #include <unistd.h>\n \n #include \"db-ctl-base.h\"\n@@ -56,15 +57,6 @@\n \n VLOG_DEFINE_THIS_MODULE(vsctl);\n \n-/* Post OVSDB reload error reported. */\n-#ifdef _WIN32\n-#include <WinError.h>\n-#define EXIT_POSTDB_ERROR ERROR_BAD_ARGUMENTS\n-#else\n-#include <sysexits.h>\n-#define EXIT_POSTDB_ERROR EX_DATAERR\n-#endif\n-\n struct vsctl_context;\n \n /* --db: The database server to contact. */\n@@ -217,7 +209,7 @@ main(int argc, char *argv[])\n             if (do_vsctl(args, commands, n_commands, idl, &postdb_err)) {\n                 free(args);\n                 if (postdb_err) {\n-                    exit(EXIT_POSTDB_ERROR);\n+                    exit(EX_DATAERR);\n                 }\n \n                 exit(EXIT_SUCCESS);\ndiff --git a/vswitchd/ovs-vswitchd.8.in b/vswitchd/ovs-vswitchd.8.in\nindex 98e58951d..cfcb30b9d 100644\n--- a/vswitchd/ovs-vswitchd.8.in\n+++ b/vswitchd/ovs-vswitchd.8.in\n@@ -97,8 +97,6 @@ hardware offload via rte_flow).\n database, retrieved the initial configuration, and set up that \\\n configuration.\n .so lib/daemon.man\n-.SS \"Service Options\"\n-.so lib/service.man\n .SS \"Public Key Infrastructure Options\"\n .so lib/ssl.man\n .so lib/ssl-bootstrap.man\ndiff --git a/vswitchd/ovs-vswitchd.c b/vswitchd/ovs-vswitchd.c\nindex 6d90c73b8..ae03c0b0b 100644\n--- a/vswitchd/ovs-vswitchd.c\n+++ b/vswitchd/ovs-vswitchd.c\n@@ -89,7 +89,6 @@ main(int argc, char *argv[])\n \n     dns_resolve_init(true);\n     ovs_cmdl_proctitle_init(argc, argv);\n-    service_start(&argc, &argv);\n     remote = parse_options(argc, argv, &unixctl_path);\n     fatal_ignore_sigpipe();\n \n@@ -147,9 +146,6 @@ main(int argc, char *argv[])\n         }\n         OVS_USDT_PROBE(main, poll_block);\n         poll_block();\n-        if (should_service_stop()) {\n-            exit_args.exiting = true;\n-        }\n     }\n     bridge_exit(exit_args.cleanup);\n \n@@ -159,7 +155,6 @@ main(int argc, char *argv[])\n     free(exit_args.conns);\n \n     unixctl_server_destroy(unixctl);\n-    service_stop();\n     vlog_disable_async();\n     ovsrcu_exit();\n     dns_resolve_destroy();\ndiff --git a/vswitchd/system-stats.c b/vswitchd/system-stats.c\nindex aaab67656..d4a0cd276 100644\n--- a/vswitchd/system-stats.c\n+++ b/vswitchd/system-stats.c\n@@ -98,20 +98,13 @@ get_memory_stats(struct smap *stats)\n #endif\n         int mem_total, mem_used;\n \n-#ifndef _WIN32\n         if (pagesize <= 0 || phys_pages <= 0 || avphys_pages <= 0) {\n             return;\n         }\n \n         mem_total = phys_pages * (pagesize / 1024);\n         mem_used = (phys_pages - avphys_pages) * (pagesize / 1024);\n-#else\n-        MEMORYSTATUS memory_status;\n-        GlobalMemoryStatus(&memory_status);\n \n-        mem_total = memory_status.dwTotalPhys;\n-        mem_used = memory_status.dwTotalPhys - memory_status.dwAvailPhys;\n-#endif\n         smap_add_format(stats, \"memory\", \"%d,%d\", mem_total, mem_used);\n     } else {\n         static const char file_name[] = \"/proc/meminfo\";\n@@ -165,7 +158,6 @@ get_memory_stats(struct smap *stats)\n static void\n get_process_stats(struct smap *stats)\n {\n-#ifndef _WIN32\n     struct dirent *de;\n     DIR *dir;\n \n@@ -217,7 +209,6 @@ get_process_stats(struct smap *stats)\n     }\n \n     closedir(dir);\n-#endif /* _WIN32 */\n }\n \n static void\ndiff --git a/vtep/ovs-vtep.in b/vtep/ovs-vtep.in\nindex 20476f89f..81f82f56c 100755\n--- a/vtep/ovs-vtep.in\n+++ b/vtep/ovs-vtep.in\n@@ -52,11 +52,8 @@ bfd_ref = {}\n \n def call_prog(prog, args_list):\n     cmd = [prog] + verbose_args + [\"-vconsole:off\"] + args_list\n-    creationFlags = 0\n-    if sys.platform == 'win32':\n-        creationFlags = 0x08000000  # CREATE_NO_WINDOW\n     output = subprocess.Popen(cmd, stdout=subprocess.PIPE,\n-                              creationflags=creationFlags).communicate()\n+                              creationflags=0).communicate()\n     if len(output) == 0 or output[0] is None:\n         output = \"\"\n     else:\n",
    "prefixes": [
        "ovs-dev",
        "5/5"
    ]
}