...
1 package nl
2
3 import ()
4
5
6 const (
7 SEG6_LOCAL_UNSPEC = iota
8 SEG6_LOCAL_ACTION
9 SEG6_LOCAL_SRH
10 SEG6_LOCAL_TABLE
11 SEG6_LOCAL_NH4
12 SEG6_LOCAL_NH6
13 SEG6_LOCAL_IIF
14 SEG6_LOCAL_OIF
15 SEG6_LOCAL_BPF
16 __SEG6_LOCAL_MAX
17 )
18 const (
19 SEG6_LOCAL_MAX = __SEG6_LOCAL_MAX
20 )
21
22
23 const (
24 SEG6_LOCAL_ACTION_END = iota + 1
25 SEG6_LOCAL_ACTION_END_X
26 SEG6_LOCAL_ACTION_END_T
27 SEG6_LOCAL_ACTION_END_DX2
28 SEG6_LOCAL_ACTION_END_DX6
29 SEG6_LOCAL_ACTION_END_DX4
30 SEG6_LOCAL_ACTION_END_DT6
31 SEG6_LOCAL_ACTION_END_DT4
32 SEG6_LOCAL_ACTION_END_B6
33 SEG6_LOCAL_ACTION_END_B6_ENCAPS
34 SEG6_LOCAL_ACTION_END_BM
35 SEG6_LOCAL_ACTION_END_S
36 SEG6_LOCAL_ACTION_END_AS
37 SEG6_LOCAL_ACTION_END_AM
38 SEG6_LOCAL_ACTION_END_BPF
39 __SEG6_LOCAL_ACTION_MAX
40 )
41 const (
42 SEG6_LOCAL_ACTION_MAX = __SEG6_LOCAL_ACTION_MAX - 1
43 )
44
45
46 func SEG6LocalActionString(action int) string {
47 switch action {
48 case SEG6_LOCAL_ACTION_END:
49 return "End"
50 case SEG6_LOCAL_ACTION_END_X:
51 return "End.X"
52 case SEG6_LOCAL_ACTION_END_T:
53 return "End.T"
54 case SEG6_LOCAL_ACTION_END_DX2:
55 return "End.DX2"
56 case SEG6_LOCAL_ACTION_END_DX6:
57 return "End.DX6"
58 case SEG6_LOCAL_ACTION_END_DX4:
59 return "End.DX4"
60 case SEG6_LOCAL_ACTION_END_DT6:
61 return "End.DT6"
62 case SEG6_LOCAL_ACTION_END_DT4:
63 return "End.DT4"
64 case SEG6_LOCAL_ACTION_END_B6:
65 return "End.B6"
66 case SEG6_LOCAL_ACTION_END_B6_ENCAPS:
67 return "End.B6.Encaps"
68 case SEG6_LOCAL_ACTION_END_BM:
69 return "End.BM"
70 case SEG6_LOCAL_ACTION_END_S:
71 return "End.S"
72 case SEG6_LOCAL_ACTION_END_AS:
73 return "End.AS"
74 case SEG6_LOCAL_ACTION_END_AM:
75 return "End.AM"
76 case SEG6_LOCAL_ACTION_END_BPF:
77 return "End.BPF"
78 }
79 return "unknown"
80 }
81
View as plain text