forked from Jamesits/go-windivert
/
enums_string.go
149 lines (128 loc) · 4.07 KB
/
enums_string.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
// Code generated by "stringer -type=Layer,Event,Param,Shutdown,Direction,ChecksumFlag -output=enums_string.go -trimprefix=WinDivert -linecomment"; DO NOT EDIT.
package ffi
import "strconv"
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[Network-0]
_ = x[NetworkForward-1]
_ = x[Flow-2]
_ = x[Socket-3]
_ = x[Reflect-4]
}
const _Layer_name = "NetworkNetworkForwardFlowSocketReflect"
var _Layer_index = [...]uint8{0, 7, 21, 25, 31, 38}
func (i Layer) String() string {
if i < 0 || i >= Layer(len(_Layer_index)-1) {
return "Layer(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _Layer_name[_Layer_index[i]:_Layer_index[i+1]]
}
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[NetworkPacket-0]
_ = x[FlowEstablished-1]
_ = x[FlowDeleted-2]
_ = x[SocketBind-3]
_ = x[SocketConnect-4]
_ = x[SocketListen-5]
_ = x[SocketAccept-6]
_ = x[SocketClose-7]
_ = x[ReflectOpen-8]
_ = x[ReflectClose-9]
}
const _Event_name = "NetworkPacketFlowEstablishedFlowDeletedSocketBindSocketConnectSocketListenSocketAcceptSocketCloseReflectOpenReflectClose"
var _Event_index = [...]uint8{0, 13, 28, 39, 49, 62, 74, 86, 97, 108, 120}
func (i Event) String() string {
if i < 0 || i >= Event(len(_Event_index)-1) {
return "Event(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _Event_name[_Event_index[i]:_Event_index[i+1]]
}
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[QueueLength-0]
_ = x[QueueTime-1]
_ = x[QueueSize-2]
_ = x[VersionMajor-3]
_ = x[VersionMinor-4]
}
const _Param_name = "QueueLengthQueueTimeQueueSizeVersionMajorVersionMinor"
var _Param_index = [...]uint8{0, 11, 20, 29, 41, 53}
func (i Param) String() string {
if i < 0 || i >= Param(len(_Param_index)-1) {
return "Param(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _Param_name[_Param_index[i]:_Param_index[i+1]]
}
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[Recv-1]
_ = x[Send-2]
_ = x[Both-3]
}
const _Shutdown_name = "RecvSendBoth"
var _Shutdown_index = [...]uint8{0, 4, 8, 12}
func (i Shutdown) String() string {
i -= 1
if i < 0 || i >= Shutdown(len(_Shutdown_index)-1) {
return "Shutdown(" + strconv.FormatInt(int64(i+1), 10) + ")"
}
return _Shutdown_name[_Shutdown_index[i]:_Shutdown_index[i+1]]
}
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[Outbound-1]
_ = x[Inbound-0]
}
const _Direction_name = "InboundOutbound"
var _Direction_index = [...]uint8{0, 7, 15}
func (i Direction) String() string {
if i < 0 || i >= Direction(len(_Direction_index)-1) {
return "Direction(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _Direction_name[_Direction_index[i]:_Direction_index[i+1]]
}
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[All-0]
_ = x[NoIP-1]
_ = x[NoICMP-2]
_ = x[NoICMPv6-4]
_ = x[NoTCP-8]
_ = x[NoUDP-16]
}
const (
_ChecksumFlag_name_0 = "AllNoIPNoICMP"
_ChecksumFlag_name_1 = "NoICMPv6"
_ChecksumFlag_name_2 = "NoTCP"
_ChecksumFlag_name_3 = "NoUDP"
)
var (
_ChecksumFlag_index_0 = [...]uint8{0, 3, 7, 13}
)
func (i ChecksumFlag) String() string {
switch {
case 0 <= i && i <= 2:
return _ChecksumFlag_name_0[_ChecksumFlag_index_0[i]:_ChecksumFlag_index_0[i+1]]
case i == 4:
return _ChecksumFlag_name_1
case i == 8:
return _ChecksumFlag_name_2
case i == 16:
return _ChecksumFlag_name_3
default:
return "ChecksumFlag(" + strconv.FormatInt(int64(i), 10) + ")"
}
}