mpls_iptunnel.h 827 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Copyright (c) 2015 Cumulus Networks, Inc.
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of version 2 of the GNU General Public
  6. * License as published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it will be useful, but
  9. * WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. * General Public License for more details.
  12. */
  13. #ifndef _NET_MPLS_IPTUNNEL_H
  14. #define _NET_MPLS_IPTUNNEL_H 1
  15. struct mpls_iptunnel_encap {
  16. u8 labels;
  17. u8 ttl_propagate;
  18. u8 default_ttl;
  19. u8 reserved1;
  20. u32 label[0];
  21. };
  22. static inline struct mpls_iptunnel_encap *mpls_lwtunnel_encap(struct lwtunnel_state *lwtstate)
  23. {
  24. return (struct mpls_iptunnel_encap *)lwtstate->data;
  25. }
  26. #endif