gre: Move utility functions to common headers
authorTom Herbert <tom@herbertland.com>
Sat, 30 Apr 2016 00:12:16 +0000 (17:12 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 May 2016 23:23:31 +0000 (19:23 -0400)
commit95f5c64c3c13a609e137d35c4b452519e0b954df
treea01c464cb5ff29e77e546881b69f8f541bf22861
parent0d3c703a9d1723c7707e0680019ac8ff5922db42
gre: Move utility functions to common headers

Several of the GRE functions defined in net/ipv4/ip_gre.c are usable
for IPv6 GRE implementation (that is they are protocol agnostic).

These include:
  - GRE flag handling functions are move to gre.h
  - GRE build_header is moved to gre.h and renamed gre_build_header
  - parse_gre_header is moved to gre_demux.c and renamed gre_parse_header
  - iptunnel_pull_header is taken out of gre_parse_header. This is now
    done by caller. The header length is returned from gre_parse_header
    in an int* argument.

Signed-off-by: Tom Herbert <tom@herbertland.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/gre.h
net/ipv4/gre_demux.c
net/ipv4/ip_gre.c