1 # This is a "sed" script that transforms <linux/openvswitch.h> into a
2 # form that is suitable for inclusion within the Open vSwitch tree on
3 # both Linux and non-Linux systems.
5 # Add a header warning that this is a generated file. It might save somebody
6 # some frustration (maybe even me!).
8 /* -*- mode: c; buffer-read-only: t -*- */\
9 /* Generated automatically from <linux/openvswitch.h> -- do not modify! */\
14 # Avoid using reserved names in header guards.
15 s/_LINUX_OPENVSWITCH_H/ODP_NETLINK_H/
17 # Include platform extensions header file on Win32.
20 #include "OvsDpInterfaceExt.h"\
24 # Transform most Linux-specific __u<N> types into C99 uint<N>_t types,
25 # and most Linux-specific __be<N> into Open vSwitch ovs_be<N>,
26 # and use the appropriate userspace header.
27 s,<linux/types\.h>,"openvswitch/types.h",
34 # Transform 64-bit Linux-specific types into Open vSwitch specialized
35 # types for 64-bit numbers that might only be aligned on a 32-bit
37 s/__u64/ovs_32aligned_u64/g
38 s/__be64/ovs_32aligned_be64/g
40 # Use OVS's own ETH_ADDR_LEN instead of Linux-specific ETH_ALEN.
41 s,<linux/if_ether\.h>,"packets.h",
42 s/ETH_ALEN/ETH_ADDR_LEN/