]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitc20f4d77cc9c4184660c400f1699c751ea65a708
treea01c464cb5ff29e77e546881b69f8f541bf22861
parent7e98b4c0701983908e54626f1ad2691527582b80
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