github.com/vishvananda/netlink@v1.3.0/nl/seg6local_linux.go (about) 1 package nl 2 3 import () 4 5 // seg6local parameters 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 // seg6local actions 23 const ( 24 SEG6_LOCAL_ACTION_END = iota + 1 // 1 25 SEG6_LOCAL_ACTION_END_X // 2 26 SEG6_LOCAL_ACTION_END_T // 3 27 SEG6_LOCAL_ACTION_END_DX2 // 4 28 SEG6_LOCAL_ACTION_END_DX6 // 5 29 SEG6_LOCAL_ACTION_END_DX4 // 6 30 SEG6_LOCAL_ACTION_END_DT6 // 7 31 SEG6_LOCAL_ACTION_END_DT4 // 8 32 SEG6_LOCAL_ACTION_END_B6 // 9 33 SEG6_LOCAL_ACTION_END_B6_ENCAPS // 10 34 SEG6_LOCAL_ACTION_END_BM // 11 35 SEG6_LOCAL_ACTION_END_S // 12 36 SEG6_LOCAL_ACTION_END_AS // 13 37 SEG6_LOCAL_ACTION_END_AM // 14 38 SEG6_LOCAL_ACTION_END_BPF // 15 39 __SEG6_LOCAL_ACTION_MAX 40 ) 41 const ( 42 SEG6_LOCAL_ACTION_MAX = __SEG6_LOCAL_ACTION_MAX - 1 43 ) 44 45 // Helper functions 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 }