~ubuntu-branches/ubuntu/wily/openvswitch/wily

« back to all changes in this revision

Viewing changes to build-aux/extract-odp-netlink-h

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2015-08-10 11:35:15 UTC
  • mfrom: (1.1.30)
  • Revision ID: package-import@ubuntu.com-20150810113515-575vj06oq29emxsn
Tags: 2.4.0~git20150810.97bab95-0ubuntu1
* New upstream snapshot from 2.4 branch:
  - d/*: Align any relevant packaging changes with upstream.
* d/*: wrap-and-sort.
* d/openvswitch-{common,vswitch}.install: Correct install location for
  bash completion files.
* d/tests/openflow.py: Explicitly use ovs-testcontroller as provided
  by 2.4.0 release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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.
 
4
 
 
5
# Add a header warning that this is a generated file.  It might save somebody
 
6
# some frustration (maybe even me!).
 
7
1i\
 
8
/* -*- mode: c; buffer-read-only: t -*- */\
 
9
/* Generated automatically from <linux/openvswitch.h> -- do not modify! */\
 
10
\
 
11
\
 
12
 
 
13
 
 
14
# Avoid using reserved names in header guards.
 
15
s/_LINUX_OPENVSWITCH_H/ODP_NETLINK_H/
 
16
 
 
17
# Include platform extensions header file on Win32.
 
18
$i\
 
19
#ifdef _WIN32\
 
20
#include "OvsDpInterfaceExt.h"\
 
21
#endif\
 
22
 
 
23
 
 
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",
 
28
s/__u32/uint32_t/g
 
29
s/__u16/uint16_t/g
 
30
s/__u8/uint8_t/g
 
31
s/__be32/ovs_be32/g
 
32
s/__be16/ovs_be16/g
 
33
 
 
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
 
36
# boundary.
 
37
s/__u64/ovs_32aligned_u64/g
 
38
s/__be64/ovs_32aligned_be64/g
 
39
 
 
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/