seg6_local.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*
  2. * SR-IPv6 implementation
  3. *
  4. * Author:
  5. * David Lebrun <david.lebrun@uclouvain.be>
  6. *
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License
  10. * as published by the Free Software Foundation; either version
  11. * 2 of the License, or (at your option) any later version.
  12. */
  13. #ifndef _LINUX_SEG6_LOCAL_H
  14. #define _LINUX_SEG6_LOCAL_H
  15. #include <linux/seg6.h>
  16. enum {
  17. SEG6_LOCAL_UNSPEC,
  18. SEG6_LOCAL_ACTION,
  19. SEG6_LOCAL_SRH,
  20. SEG6_LOCAL_TABLE,
  21. SEG6_LOCAL_NH4,
  22. SEG6_LOCAL_NH6,
  23. SEG6_LOCAL_IIF,
  24. SEG6_LOCAL_OIF,
  25. SEG6_LOCAL_BPF,
  26. __SEG6_LOCAL_MAX,
  27. };
  28. #define SEG6_LOCAL_MAX (__SEG6_LOCAL_MAX - 1)
  29. enum {
  30. SEG6_LOCAL_ACTION_UNSPEC = 0,
  31. /* node segment */
  32. SEG6_LOCAL_ACTION_END = 1,
  33. /* adjacency segment (IPv6 cross-connect) */
  34. SEG6_LOCAL_ACTION_END_X = 2,
  35. /* lookup of next seg NH in table */
  36. SEG6_LOCAL_ACTION_END_T = 3,
  37. /* decap and L2 cross-connect */
  38. SEG6_LOCAL_ACTION_END_DX2 = 4,
  39. /* decap and IPv6 cross-connect */
  40. SEG6_LOCAL_ACTION_END_DX6 = 5,
  41. /* decap and IPv4 cross-connect */
  42. SEG6_LOCAL_ACTION_END_DX4 = 6,
  43. /* decap and lookup of DA in v6 table */
  44. SEG6_LOCAL_ACTION_END_DT6 = 7,
  45. /* decap and lookup of DA in v4 table */
  46. SEG6_LOCAL_ACTION_END_DT4 = 8,
  47. /* binding segment with insertion */
  48. SEG6_LOCAL_ACTION_END_B6 = 9,
  49. /* binding segment with encapsulation */
  50. SEG6_LOCAL_ACTION_END_B6_ENCAP = 10,
  51. /* binding segment with MPLS encap */
  52. SEG6_LOCAL_ACTION_END_BM = 11,
  53. /* lookup last seg in table */
  54. SEG6_LOCAL_ACTION_END_S = 12,
  55. /* forward to SR-unaware VNF with static proxy */
  56. SEG6_LOCAL_ACTION_END_AS = 13,
  57. /* forward to SR-unaware VNF with masquerading */
  58. SEG6_LOCAL_ACTION_END_AM = 14,
  59. /* custom BPF action */
  60. SEG6_LOCAL_ACTION_END_BPF = 15,
  61. __SEG6_LOCAL_ACTION_MAX,
  62. };
  63. #define SEG6_LOCAL_ACTION_MAX (__SEG6_LOCAL_ACTION_MAX - 1)
  64. enum {
  65. SEG6_LOCAL_BPF_PROG_UNSPEC,
  66. SEG6_LOCAL_BPF_PROG,
  67. SEG6_LOCAL_BPF_PROG_NAME,
  68. __SEG6_LOCAL_BPF_PROG_MAX,
  69. };
  70. #define SEG6_LOCAL_BPF_PROG_MAX (__SEG6_LOCAL_BPF_PROG_MAX - 1)
  71. #endif