• Tom Herbert's avatar
    gre: Move utility functions to common headers · 95f5c64c
    Tom Herbert authored
    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: default avatarTom Herbert <tom@herbertland.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    95f5c64c
gre_demux.c 4.31 KB