get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 91479,
    "url": "https://patches.dpdk.org/api/patches/91479/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210414220651.28691-5-dmitry.kozliuk@gmail.com/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20210414220651.28691-5-dmitry.kozliuk@gmail.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210414220651.28691-5-dmitry.kozliuk@gmail.com",
    "date": "2021-04-14T22:06:51",
    "name": "[v10,4/4] net: provide IP-related API on any OS",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "f1d959bb1aa9103ee09ca57c7b7d7fcfbdf4f86b",
    "submitter": {
        "id": 1581,
        "url": "https://patches.dpdk.org/api/people/1581/?format=api",
        "name": "Dmitry Kozlyuk",
        "email": "dmitry.kozliuk@gmail.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210414220651.28691-5-dmitry.kozliuk@gmail.com/mbox/",
    "series": [
        {
            "id": 16380,
            "url": "https://patches.dpdk.org/api/series/16380/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=16380",
            "date": "2021-04-14T22:06:47",
            "name": "eal/windows: do not expose POSIX symbols",
            "version": 10,
            "mbox": "https://patches.dpdk.org/series/16380/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/91479/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/91479/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 24DD7A0A02;\n\tThu, 15 Apr 2021 00:07:29 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 339CD161D82;\n\tThu, 15 Apr 2021 00:07:13 +0200 (CEST)",
            "from mail-lf1-f50.google.com (mail-lf1-f50.google.com\n [209.85.167.50])\n by mails.dpdk.org (Postfix) with ESMTP id 5052E161D6F\n for <dev@dpdk.org>; Thu, 15 Apr 2021 00:07:05 +0200 (CEST)",
            "by mail-lf1-f50.google.com with SMTP id z13so18722953lfd.9\n for <dev@dpdk.org>; Wed, 14 Apr 2021 15:07:05 -0700 (PDT)",
            "from localhost.localdomain (broadband-37-110-65-23.ip.moscow.rt.ru.\n [37.110.65.23])\n by smtp.gmail.com with ESMTPSA id m28sm271489lfo.278.2021.04.14.15.07.03\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 14 Apr 2021 15:07:04 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n h=from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding;\n bh=hj3m8hhGktWOd++3lidkzkqhtP7pXFjVuOXolzudUC0=;\n b=RapDW5di7YTq1Ie3RLdtCxlTxssVtU1PBmSDiXMGD8SjlWp0yWGUGfrEGyRpszPtqy\n hhWIeFLKfI76cpcK1qOOYtjPajiOc3I+hnzZHHCXAjRNpElQEpDIT/U/O91EWoG25vD9\n 4oI2Tw+GHnYYYNqEKQtf2eRuf1uLEzPSVaZpkT3dLsZu/uPs5J06AbY4zZlGnSPYBxVe\n 3nvtNPIGxThs9CMWG1ib9x13VDCLPCn0jEYCiG3C01552duC+ax0akFqqy74v5aSYpJ/\n 6rEqPAIFXDd+96OzRIX1+YKw/NvsCxHPxHNNCPl0iA58A/5XuHk9MCTpq2yN6KnM9hz0\n 3OGQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references:mime-version:content-transfer-encoding;\n bh=hj3m8hhGktWOd++3lidkzkqhtP7pXFjVuOXolzudUC0=;\n b=Av77MxZJWmMVJQYFmv1gFjsQkEvCpqSrs3tQjd/mp5/rd3YCPXXWttRlx3MatfsU0s\n rl2GpObpa22ahTWYCRYBIjcTSF5h4xggz1r8jHFpRIDgPEtvVGoYforhLPrp7OWp8Zou\n uxY4LP+5WHqGYPQ0MHn90nzG/O+4SQi5VjX3dIY6U4aThGsAn9nfhg9k8Kvcf6l/qiEd\n t4XY1jS5fopOA8CcKWwi5JeK/Lfw+VcDahVxtJRx255YKYxfhkbuYTsCwHXDlda6L5gn\n zPUXXIJrW0nN+e54Zc04NW3p99DRc0OlV2O2qV8OS/J001+dObHsXdSfAFb9U3vP7dDG\n Wa9w==",
        "X-Gm-Message-State": "AOAM532PIDXQkUZCc7brC00ErMvAx09jPi/ca5avvar+21cw/CmakE2Q\n 7Jpq3DuY0Pjc2CWXxy12MuYlMYOnNyjvokZM",
        "X-Google-Smtp-Source": "\n ABdhPJxHADyrmOTHTgLmQB9S4kFmDVTRprX/LajI11GS6Drm2nHj9n3cMLzYKqmSeNClLIHFqxwk1w==",
        "X-Received": "by 2002:a05:6512:38c9:: with SMTP id\n p9mr217732lft.572.1618438024567;\n Wed, 14 Apr 2021 15:07:04 -0700 (PDT)",
        "From": "Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>",
        "To": "dev@dpdk.org",
        "Cc": "Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>,\n Beilei Xing <beilei.xing@intel.com>, Jeff Guo <jia.guo@intel.com>,\n Matan Azrad <matan@nvidia.com>, Shahaf Shuler <shahafs@nvidia.com>,\n Viacheslav Ovsiienko <viacheslavo@nvidia.com>,\n Olivier Matz <olivier.matz@6wind.com>, Ori Kam <orika@nvidia.com>,\n Bruce Richardson <bruce.richardson@intel.com>,\n Narcisa Ana Maria Vasile <navasile@linux.microsoft.com>,\n Dmitry Malloy <dmitrym@microsoft.com>,\n Pallavi Kadam <pallavi.kadam@intel.com>,\n Thomas Monjalon <thomas@monjalon.net>,\n Ferruh Yigit <ferruh.yigit@intel.com>,\n Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>",
        "Date": "Thu, 15 Apr 2021 01:06:51 +0300",
        "Message-Id": "<20210414220651.28691-5-dmitry.kozliuk@gmail.com>",
        "X-Mailer": "git-send-email 2.29.3",
        "In-Reply-To": "<20210414220651.28691-1-dmitry.kozliuk@gmail.com>",
        "References": "<20210410224732.20234-1-dmitry.kozliuk@gmail.com>\n <20210414220651.28691-1-dmitry.kozliuk@gmail.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v10 4/4] net: provide IP-related API on any OS",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Users of <rte_ip.h> relied on it to provide IP-related defines,\nlike IPPROTO_* constants, but still had to include POSIX headers\nfor inet_pton() and other standard IP-related facilities.\n\nExtend <rte_ip.h> so that it is a single header to gain access\nto IP-related facilities on any OS. Use it to replace POSIX includes\nin components enabled on Windows. Move missing constants from Windows\nnetworking shim to OS shim header and include it where needed.\n\nRemove Windows networking shim that is no longer needed.\n\nSigned-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>\n---\n drivers/net/i40e/i40e_fdir.c                 |  1 +\n drivers/net/mlx5/mlx5.h                      |  1 -\n drivers/net/mlx5/mlx5_flow.c                 |  4 +--\n drivers/net/mlx5/mlx5_flow.h                 |  3 +-\n drivers/net/mlx5/mlx5_mac.c                  |  1 -\n examples/cmdline/commands.c                  |  5 ---\n examples/cmdline/parse_obj_list.c            |  2 --\n examples/flow_filtering/main.c               |  1 -\n examples/l2fwd/main.c                        |  1 -\n examples/link_status_interrupt/main.c        |  1 -\n lib/librte_cmdline/cmdline.c                 |  1 -\n lib/librte_cmdline/cmdline_parse.c           |  2 --\n lib/librte_cmdline/cmdline_parse_etheraddr.c |  6 ----\n lib/librte_cmdline/cmdline_parse_ipaddr.c    |  6 ----\n lib/librte_cmdline/cmdline_parse_ipaddr.h    |  2 +-\n lib/librte_eal/windows/include/arpa/inet.h   | 30 ----------------\n lib/librte_eal/windows/include/netinet/in.h  | 38 --------------------\n lib/librte_eal/windows/include/netinet/ip.h  | 10 ------\n lib/librte_eal/windows/include/rte_os_shim.h |  8 +++++\n lib/librte_eal/windows/include/sys/socket.h  | 24 -------------\n lib/librte_ethdev/rte_ethdev.c               | 12 +++----\n lib/librte_ethdev/rte_ethdev_core.h          |  1 -\n lib/librte_net/rte_ip.h                      |  7 ++++\n lib/librte_net/rte_net.c                     |  1 +\n 24 files changed, 24 insertions(+), 144 deletions(-)\n delete mode 100644 lib/librte_eal/windows/include/arpa/inet.h\n delete mode 100644 lib/librte_eal/windows/include/netinet/in.h\n delete mode 100644 lib/librte_eal/windows/include/netinet/ip.h\n delete mode 100644 lib/librte_eal/windows/include/sys/socket.h",
    "diff": "diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c\nindex da089baa4d..22e6e34640 100644\n--- a/drivers/net/i40e/i40e_fdir.c\n+++ b/drivers/net/i40e/i40e_fdir.c\n@@ -22,6 +22,7 @@\n #include <rte_sctp.h>\n #include <rte_hash_crc.h>\n #include <rte_bitmap.h>\n+#include <rte_os_shim.h>\n \n #include \"i40e_logs.h\"\n #include \"base/i40e_type.h\"\ndiff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h\nindex 0f69f9d125..bac8bc0377 100644\n--- a/drivers/net/mlx5/mlx5.h\n+++ b/drivers/net/mlx5/mlx5.h\n@@ -10,7 +10,6 @@\n #include <stdbool.h>\n #include <stdint.h>\n #include <limits.h>\n-#include <netinet/in.h>\n #include <sys/queue.h>\n \n #include <rte_pci.h>\ndiff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c\nindex c347f8130e..0f1a9c5ed9 100644\n--- a/drivers/net/mlx5/mlx5_flow.c\n+++ b/drivers/net/mlx5/mlx5_flow.c\n@@ -3,12 +3,11 @@\n  * Copyright 2016 Mellanox Technologies, Ltd\n  */\n \n-#include <netinet/in.h>\n-#include <sys/queue.h>\n #include <stdalign.h>\n #include <stdint.h>\n #include <string.h>\n #include <stdbool.h>\n+#include <sys/queue.h>\n \n #include <rte_common.h>\n #include <rte_ether.h>\n@@ -8241,4 +8240,3 @@ mlx5_release_tunnel_hub(__rte_unused struct mlx5_dev_ctx_shared *sh,\n {\n }\n #endif /* HAVE_IBV_FLOW_DV_SUPPORT */\n-\ndiff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h\nindex ec673c29ab..1ee5a9eb15 100644\n--- a/drivers/net/mlx5/mlx5_flow.h\n+++ b/drivers/net/mlx5/mlx5_flow.h\n@@ -5,11 +5,10 @@\n #ifndef RTE_PMD_MLX5_FLOW_H_\n #define RTE_PMD_MLX5_FLOW_H_\n \n-#include <netinet/in.h>\n-#include <sys/queue.h>\n #include <stdalign.h>\n #include <stdint.h>\n #include <string.h>\n+#include <sys/queue.h>\n \n #include <rte_alarm.h>\n #include <rte_mtr.h>\ndiff --git a/drivers/net/mlx5/mlx5_mac.c b/drivers/net/mlx5/mlx5_mac.c\nindex a7946f7756..19981d26d8 100644\n--- a/drivers/net/mlx5/mlx5_mac.c\n+++ b/drivers/net/mlx5/mlx5_mac.c\n@@ -8,7 +8,6 @@\n #include <string.h>\n #include <inttypes.h>\n #include <errno.h>\n-#include <netinet/in.h>\n \n #include <rte_ether.h>\n #include <ethdev_driver.h>\ndiff --git a/examples/cmdline/commands.c b/examples/cmdline/commands.c\nindex f43eacfbad..9ce8ef389f 100644\n--- a/examples/cmdline/commands.c\n+++ b/examples/cmdline/commands.c\n@@ -8,12 +8,7 @@\n #include <stdint.h>\n #include <string.h>\n #include <stdlib.h>\n-#include <stdarg.h>\n #include <errno.h>\n-#include <netinet/in.h>\n-#ifdef RTE_EXEC_ENV_FREEBSD\n-#include <sys/socket.h>\n-#endif\n \n #include <cmdline_rdline.h>\n #include <cmdline_parse.h>\ndiff --git a/examples/cmdline/parse_obj_list.c b/examples/cmdline/parse_obj_list.c\nindex b04adbea58..959bcd1452 100644\n--- a/examples/cmdline/parse_obj_list.c\n+++ b/examples/cmdline/parse_obj_list.c\n@@ -6,11 +6,9 @@\n \n #include <stdio.h>\n #include <inttypes.h>\n-#include <stdarg.h>\n #include <errno.h>\n #include <ctype.h>\n #include <string.h>\n-#include <netinet/in.h>\n \n #include <cmdline_parse.h>\n #include <cmdline_parse_ipaddr.h>\ndiff --git a/examples/flow_filtering/main.c b/examples/flow_filtering/main.c\nindex 93523d625b..bc28468f17 100644\n--- a/examples/flow_filtering/main.c\n+++ b/examples/flow_filtering/main.c\n@@ -9,7 +9,6 @@\n #include <inttypes.h>\n #include <sys/types.h>\n #include <sys/queue.h>\n-#include <netinet/in.h>\n #include <setjmp.h>\n #include <stdarg.h>\n #include <ctype.h>\ndiff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c\nindex 3377b08322..be5bf7bc90 100644\n--- a/examples/l2fwd/main.c\n+++ b/examples/l2fwd/main.c\n@@ -9,7 +9,6 @@\n #include <inttypes.h>\n #include <sys/types.h>\n #include <sys/queue.h>\n-#include <netinet/in.h>\n #include <setjmp.h>\n #include <stdarg.h>\n #include <ctype.h>\ndiff --git a/examples/link_status_interrupt/main.c b/examples/link_status_interrupt/main.c\nindex f1653b4fb8..8ca3586e05 100644\n--- a/examples/link_status_interrupt/main.c\n+++ b/examples/link_status_interrupt/main.c\n@@ -9,7 +9,6 @@\n #include <inttypes.h>\n #include <sys/types.h>\n #include <sys/queue.h>\n-#include <netinet/in.h>\n #include <setjmp.h>\n #include <stdarg.h>\n #include <ctype.h>\ndiff --git a/lib/librte_cmdline/cmdline.c b/lib/librte_cmdline/cmdline.c\nindex 49770869bb..a176d15130 100644\n--- a/lib/librte_cmdline/cmdline.c\n+++ b/lib/librte_cmdline/cmdline.c\n@@ -12,7 +12,6 @@\n #include <inttypes.h>\n #include <fcntl.h>\n #include <errno.h>\n-#include <netinet/in.h>\n \n #include <rte_string_fns.h>\n \ndiff --git a/lib/librte_cmdline/cmdline_parse.c b/lib/librte_cmdline/cmdline_parse.c\nindex fe366841cd..f5cc934782 100644\n--- a/lib/librte_cmdline/cmdline_parse.c\n+++ b/lib/librte_cmdline/cmdline_parse.c\n@@ -11,8 +11,6 @@\n #include <inttypes.h>\n #include <ctype.h>\n \n-#include <netinet/in.h>\n-\n #include <rte_string_fns.h>\n \n #include \"cmdline_private.h\"\ndiff --git a/lib/librte_cmdline/cmdline_parse_etheraddr.c b/lib/librte_cmdline/cmdline_parse_etheraddr.c\nindex 5cb10de321..433b828a72 100644\n--- a/lib/librte_cmdline/cmdline_parse_etheraddr.c\n+++ b/lib/librte_cmdline/cmdline_parse_etheraddr.c\n@@ -5,13 +5,7 @@\n  */\n \n #include <stdio.h>\n-#include <stdlib.h>\n-#include <stdarg.h>\n-#include <errno.h>\n-#include <inttypes.h>\n-#include <ctype.h>\n #include <string.h>\n-#include <sys/types.h>\n \n #include <rte_string_fns.h>\n #include <rte_ether.h>\ndiff --git a/lib/librte_cmdline/cmdline_parse_ipaddr.c b/lib/librte_cmdline/cmdline_parse_ipaddr.c\nindex f8dbdf204c..5e278c963f 100644\n--- a/lib/librte_cmdline/cmdline_parse_ipaddr.c\n+++ b/lib/librte_cmdline/cmdline_parse_ipaddr.c\n@@ -6,14 +6,8 @@\n \n #include <stdio.h>\n #include <stdlib.h>\n-#include <stdarg.h>\n-#include <inttypes.h>\n-#include <ctype.h>\n #include <string.h>\n #include <errno.h>\n-#include <arpa/inet.h>\n-#include <netinet/in.h>\n-#include <sys/socket.h>\n \n #include <rte_string_fns.h>\n \ndiff --git a/lib/librte_cmdline/cmdline_parse_ipaddr.h b/lib/librte_cmdline/cmdline_parse_ipaddr.h\nindex 0ba81647bc..0118c31d44 100644\n--- a/lib/librte_cmdline/cmdline_parse_ipaddr.h\n+++ b/lib/librte_cmdline/cmdline_parse_ipaddr.h\n@@ -8,7 +8,7 @@\n #define _PARSE_IPADDR_H_\n \n #include <cmdline_parse.h>\n-#include <netinet/in.h>\n+#include <rte_ip.h>\n \n #ifdef __cplusplus\n extern \"C\" {\ndiff --git a/lib/librte_eal/windows/include/arpa/inet.h b/lib/librte_eal/windows/include/arpa/inet.h\ndeleted file mode 100644\nindex 96b6984383..0000000000\n--- a/lib/librte_eal/windows/include/arpa/inet.h\n+++ /dev/null\n@@ -1,30 +0,0 @@\n-/* SPDX-License-Identifier: BSD-3-Clause\n- * Copyright (c) 2020 Dmitry Kozlyuk\n- */\n-\n-#ifndef _ARPA_INET_H_\n-#define _ARPA_INET_H_\n-\n-/**\n- * @file\n- *\n- * Compatibility header\n- *\n- * Although symbols declared here are present on Windows,\n- * including <winsock2.h> would expose too much macros breaking common code.\n- */\n-\n-#include <netinet/in.h>\n-#include <sys/socket.h>\n-\n-/* defined in ws2_32.dll */\n-__attribute__((stdcall))\n-int\n-inet_pton(int af, const char *src, void *dst);\n-\n-/* defined in ws2_32.dll */\n-__attribute__((stdcall))\n-const char *\n-inet_ntop(int af, const void *src, char *dst, socklen_t size);\n-\n-#endif /* _ARPA_INET_H_ */\ndiff --git a/lib/librte_eal/windows/include/netinet/in.h b/lib/librte_eal/windows/include/netinet/in.h\ndeleted file mode 100644\nindex 6455b9ba51..0000000000\n--- a/lib/librte_eal/windows/include/netinet/in.h\n+++ /dev/null\n@@ -1,38 +0,0 @@\n-/* SPDX-License-Identifier: BSD-3-Clause\n- * Copyright 2020 Mellanox Technologies, Ltd\n- */\n-\n-#ifndef _IN_H_\n-#define _IN_H_\n-\n-#include <stdint.h>\n-#include <sys/socket.h>\n-\n-#define IPPROTO_IP         0\n-#define IPPROTO_HOPOPTS    0\n-#define IPPROTO_ICMP       1\n-#define IPPROTO_IPIP       4\n-#define IPPROTO_TCP        6\n-#define IPPROTO_UDP       17\n-#define IPPROTO_IPV6      41\n-#define IPPROTO_ROUTING   43\n-#define IPPROTO_FRAGMENT  44\n-#define IPPROTO_GRE       47\n-#define IPPROTO_ESP       50\n-#define IPPROTO_AH        51\n-#define IPPROTO_ICMPV6    58\n-#define IPPROTO_NONE      59\n-#define IPPROTO_DSTOPTS   60\n-#define IPPROTO_SCTP     132\n-\n-#define INET6_ADDRSTRLEN 46\n-\n-struct in_addr {\n-\tuint32_t s_addr;\n-};\n-\n-struct in6_addr {\n-\tuint8_t s6_addr[16];\n-};\n-\n-#endif\ndiff --git a/lib/librte_eal/windows/include/netinet/ip.h b/lib/librte_eal/windows/include/netinet/ip.h\ndeleted file mode 100644\nindex 2126498797..0000000000\n--- a/lib/librte_eal/windows/include/netinet/ip.h\n+++ /dev/null\n@@ -1,10 +0,0 @@\n-/* SPDX-License-Identifier: BSD-3-Clause\n- * Copyright 2020 Mellanox Technologies, Ltd\n- */\n-\n-#ifndef _IP_H_\n-#define _IP_H_\n-\n-#define IPVERSION 4\n-\n-#endif\ndiff --git a/lib/librte_eal/windows/include/rte_os_shim.h b/lib/librte_eal/windows/include/rte_os_shim.h\nindex edd9a1082c..f40fb62d1d 100644\n--- a/lib/librte_eal/windows/include/rte_os_shim.h\n+++ b/lib/librte_eal/windows/include/rte_os_shim.h\n@@ -25,4 +25,12 @@\n #define close(fd) _close(fd)\n #define unlink(path) _unlink(path)\n \n+#define IPVERSION\t4\n+\n+#define IPPROTO_IPIP\t4\n+#define IPPROTO_GRE\t47\n+#ifdef RTE_TOOLCHAIN_GCC\n+#define IPPROTO_SCTP\t132\n+#endif\n+\n #endif /* _RTE_OS_SHIM_ */\ndiff --git a/lib/librte_eal/windows/include/sys/socket.h b/lib/librte_eal/windows/include/sys/socket.h\ndeleted file mode 100644\nindex 9536cf8e62..0000000000\n--- a/lib/librte_eal/windows/include/sys/socket.h\n+++ /dev/null\n@@ -1,24 +0,0 @@\n-/* SPDX-License-Identifier: BSD-3-Clause\n- * Copyright (c) 2020 Dmitry Kozlyuk\n- */\n-\n-#ifndef _SYS_SOCKET_H_\n-#define _SYS_SOCKET_H_\n-\n-/**\n- * @file\n- *\n- * Compatibility header\n- *\n- * Although symbols declared here are present on Windows,\n- * including <winsock2.h> would expose too much macros breaking common code.\n- */\n-\n-#include <stddef.h>\n-\n-#define AF_INET  2\n-#define AF_INET6 23\n-\n-typedef size_t socklen_t;\n-\n-#endif /* _SYS_SOCKET_H_ */\ndiff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c\nindex 0419500fc3..c73d263c2f 100644\n--- a/lib/librte_ethdev/rte_ethdev.c\n+++ b/lib/librte_ethdev/rte_ethdev.c\n@@ -2,18 +2,14 @@\n  * Copyright(c) 2010-2017 Intel Corporation\n  */\n \n-#include <sys/types.h>\n-#include <sys/queue.h>\n #include <ctype.h>\n-#include <stdio.h>\n-#include <stdlib.h>\n-#include <string.h>\n-#include <stdarg.h>\n #include <errno.h>\n+#include <inttypes.h>\n #include <stdbool.h>\n #include <stdint.h>\n-#include <inttypes.h>\n-#include <netinet/in.h>\n+#include <stdlib.h>\n+#include <string.h>\n+#include <sys/queue.h>\n \n #include <rte_byteorder.h>\n #include <rte_log.h>\ndiff --git a/lib/librte_ethdev/rte_ethdev_core.h b/lib/librte_ethdev/rte_ethdev_core.h\nindex 918a34ed1f..4679d948fa 100644\n--- a/lib/librte_ethdev/rte_ethdev_core.h\n+++ b/lib/librte_ethdev/rte_ethdev_core.h\n@@ -6,7 +6,6 @@\n #define _RTE_ETHDEV_CORE_H_\n \n #include <pthread.h>\n-#include <sys/types.h>\n \n /**\n  * @file\ndiff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h\nindex b59c4d67a3..8c189009b0 100644\n--- a/lib/librte_net/rte_ip.h\n+++ b/lib/librte_net/rte_ip.h\n@@ -16,9 +16,16 @@\n  */\n \n #include <stdint.h>\n+\n+#ifdef RTE_EXEC_ENV_WINDOWS\n+#include <ws2tcpip.h>\n+#else\n+#include <sys/socket.h>\n #include <sys/types.h>\n+#include <arpa/inet.h>\n #include <netinet/in.h>\n #include <netinet/ip.h>\n+#endif\n \n #include <rte_byteorder.h>\n #include <rte_mbuf.h>\ndiff --git a/lib/librte_net/rte_net.c b/lib/librte_net/rte_net.c\nindex bfe5003976..d680accc16 100644\n--- a/lib/librte_net/rte_net.c\n+++ b/lib/librte_net/rte_net.c\n@@ -15,6 +15,7 @@\n #include <rte_gre.h>\n #include <rte_mpls.h>\n #include <rte_net.h>\n+#include <rte_os_shim.h>\n \n /* get l3 packet type from ip6 next protocol */\n static uint32_t\n",
    "prefixes": [
        "v10",
        "4/4"
    ]
}