2
0
mirror of https://github.com/openvswitch/ovs synced 2025-09-05 08:45:23 +00:00
Files
ovs/build-aux/extract-odp-netlink-windows-dp-h
Nithin Raju f92156ae2c extract-odp-netlink-windows-dp-h: add definition of IFNAMSIZ
The Windows kernel datapath needs the definition of 'IFNAMSIZ' for
specifying attribute sizes in netlink policies. Adding the definition
of 'IFNAMSIZ' to be part of OvsDpInterface.h similar to ETH_ADDR_LEN.

Signed-off-by: Nithin Raju <nithin@vmware.com>
Acked-by: Samuel Ghinet <sghinet@cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-09-19 14:37:00 -07:00

26 lines
880 B
Plaintext
Executable File

# This is a "sed" script that transforms <linux/openvswitch.h> into a
# form that is suitable for inclusion within the Open vSwitch tree on
# windows system. The transformed header file can be included by windows
# driver modules.
# Add a header warning that this is a generated file.
1i\
/* -*- mode: c; buffer-read-only: t -*- */\
/* Generated automatically from <linux/openvswitch.h> -- do not modify! */\
\
\
# Avoid using reserved names in header guards.
s/_LINUX_OPENVSWITCH_H/__OVS_DP_INTERFACE_H_/
# and use the appropriate userspace header.
s,<linux/types\.h>,"Types.h",
# Add ETH_ADDR_LEN macro to avoid including userspace packet.h
s,#include <linux/if_ether\.h>,\n#ifndef ETH_ADDR_LEN \
#define ETH_ADDR_LEN 6 \n#endif \
\n#ifndef IFNAMSIZ \n#define IFNAMSIZ 16 \n#endif,
# Use OVS's own ETH_ADDR_LEN instead of Linux-specific ETH_ALEN.
s/ETH_ALEN/ETH_ADDR_LEN/