1
2
3
4
5
6
7 package net
8
9 import (
10 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
11 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
12 reflect "reflect"
13 sync "sync"
14 )
15
16 const (
17
18 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
19
20 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
21 )
22
23 type IPAddress struct {
24 state protoimpl.MessageState
25 sizeCache protoimpl.SizeCache
26 unknownFields protoimpl.UnknownFields
27
28
29
30
31
32 Ip isIPAddress_Ip `protobuf_oneof:"ip"`
33 }
34
35 func (x *IPAddress) Reset() {
36 *x = IPAddress{}
37 if protoimpl.UnsafeEnabled {
38 mi := &file_net_proto_msgTypes[0]
39 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
40 ms.StoreMessageInfo(mi)
41 }
42 }
43
44 func (x *IPAddress) String() string {
45 return protoimpl.X.MessageStringOf(x)
46 }
47
48 func (*IPAddress) ProtoMessage() {}
49
50 func (x *IPAddress) ProtoReflect() protoreflect.Message {
51 mi := &file_net_proto_msgTypes[0]
52 if protoimpl.UnsafeEnabled && x != nil {
53 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
54 if ms.LoadMessageInfo() == nil {
55 ms.StoreMessageInfo(mi)
56 }
57 return ms
58 }
59 return mi.MessageOf(x)
60 }
61
62
63 func (*IPAddress) Descriptor() ([]byte, []int) {
64 return file_net_proto_rawDescGZIP(), []int{0}
65 }
66
67 func (m *IPAddress) GetIp() isIPAddress_Ip {
68 if m != nil {
69 return m.Ip
70 }
71 return nil
72 }
73
74 func (x *IPAddress) GetIpv4() uint32 {
75 if x, ok := x.GetIp().(*IPAddress_Ipv4); ok {
76 return x.Ipv4
77 }
78 return 0
79 }
80
81 func (x *IPAddress) GetIpv6() *IPv6 {
82 if x, ok := x.GetIp().(*IPAddress_Ipv6); ok {
83 return x.Ipv6
84 }
85 return nil
86 }
87
88 type isIPAddress_Ip interface {
89 isIPAddress_Ip()
90 }
91
92 type IPAddress_Ipv4 struct {
93 Ipv4 uint32 `protobuf:"fixed32,1,opt,name=ipv4,proto3,oneof"`
94 }
95
96 type IPAddress_Ipv6 struct {
97 Ipv6 *IPv6 `protobuf:"bytes,2,opt,name=ipv6,proto3,oneof"`
98 }
99
100 func (*IPAddress_Ipv4) isIPAddress_Ip() {}
101
102 func (*IPAddress_Ipv6) isIPAddress_Ip() {}
103
104 type IPNetwork struct {
105 state protoimpl.MessageState
106 sizeCache protoimpl.SizeCache
107 unknownFields protoimpl.UnknownFields
108
109 Ip *IPAddress `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`
110 PrefixLen uint32 `protobuf:"varint,2,opt,name=prefix_len,json=prefixLen,proto3" json:"prefix_len,omitempty"`
111 }
112
113 func (x *IPNetwork) Reset() {
114 *x = IPNetwork{}
115 if protoimpl.UnsafeEnabled {
116 mi := &file_net_proto_msgTypes[1]
117 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
118 ms.StoreMessageInfo(mi)
119 }
120 }
121
122 func (x *IPNetwork) String() string {
123 return protoimpl.X.MessageStringOf(x)
124 }
125
126 func (*IPNetwork) ProtoMessage() {}
127
128 func (x *IPNetwork) ProtoReflect() protoreflect.Message {
129 mi := &file_net_proto_msgTypes[1]
130 if protoimpl.UnsafeEnabled && x != nil {
131 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
132 if ms.LoadMessageInfo() == nil {
133 ms.StoreMessageInfo(mi)
134 }
135 return ms
136 }
137 return mi.MessageOf(x)
138 }
139
140
141 func (*IPNetwork) Descriptor() ([]byte, []int) {
142 return file_net_proto_rawDescGZIP(), []int{1}
143 }
144
145 func (x *IPNetwork) GetIp() *IPAddress {
146 if x != nil {
147 return x.Ip
148 }
149 return nil
150 }
151
152 func (x *IPNetwork) GetPrefixLen() uint32 {
153 if x != nil {
154 return x.PrefixLen
155 }
156 return 0
157 }
158
159 type IPv6 struct {
160 state protoimpl.MessageState
161 sizeCache protoimpl.SizeCache
162 unknownFields protoimpl.UnknownFields
163
164 First uint64 `protobuf:"fixed64,1,opt,name=first,proto3" json:"first,omitempty"`
165 Last uint64 `protobuf:"fixed64,2,opt,name=last,proto3" json:"last,omitempty"`
166 }
167
168 func (x *IPv6) Reset() {
169 *x = IPv6{}
170 if protoimpl.UnsafeEnabled {
171 mi := &file_net_proto_msgTypes[2]
172 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
173 ms.StoreMessageInfo(mi)
174 }
175 }
176
177 func (x *IPv6) String() string {
178 return protoimpl.X.MessageStringOf(x)
179 }
180
181 func (*IPv6) ProtoMessage() {}
182
183 func (x *IPv6) ProtoReflect() protoreflect.Message {
184 mi := &file_net_proto_msgTypes[2]
185 if protoimpl.UnsafeEnabled && x != nil {
186 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
187 if ms.LoadMessageInfo() == nil {
188 ms.StoreMessageInfo(mi)
189 }
190 return ms
191 }
192 return mi.MessageOf(x)
193 }
194
195
196 func (*IPv6) Descriptor() ([]byte, []int) {
197 return file_net_proto_rawDescGZIP(), []int{2}
198 }
199
200 func (x *IPv6) GetFirst() uint64 {
201 if x != nil {
202 return x.First
203 }
204 return 0
205 }
206
207 func (x *IPv6) GetLast() uint64 {
208 if x != nil {
209 return x.Last
210 }
211 return 0
212 }
213
214 type TcpAddress struct {
215 state protoimpl.MessageState
216 sizeCache protoimpl.SizeCache
217 unknownFields protoimpl.UnknownFields
218
219 Ip *IPAddress `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`
220 Port uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
221 }
222
223 func (x *TcpAddress) Reset() {
224 *x = TcpAddress{}
225 if protoimpl.UnsafeEnabled {
226 mi := &file_net_proto_msgTypes[3]
227 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
228 ms.StoreMessageInfo(mi)
229 }
230 }
231
232 func (x *TcpAddress) String() string {
233 return protoimpl.X.MessageStringOf(x)
234 }
235
236 func (*TcpAddress) ProtoMessage() {}
237
238 func (x *TcpAddress) ProtoReflect() protoreflect.Message {
239 mi := &file_net_proto_msgTypes[3]
240 if protoimpl.UnsafeEnabled && x != nil {
241 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
242 if ms.LoadMessageInfo() == nil {
243 ms.StoreMessageInfo(mi)
244 }
245 return ms
246 }
247 return mi.MessageOf(x)
248 }
249
250
251 func (*TcpAddress) Descriptor() ([]byte, []int) {
252 return file_net_proto_rawDescGZIP(), []int{3}
253 }
254
255 func (x *TcpAddress) GetIp() *IPAddress {
256 if x != nil {
257 return x.Ip
258 }
259 return nil
260 }
261
262 func (x *TcpAddress) GetPort() uint32 {
263 if x != nil {
264 return x.Port
265 }
266 return 0
267 }
268
269 var File_net_proto protoreflect.FileDescriptor
270
271 var file_net_proto_rawDesc = []byte{
272 0x0a, 0x09, 0x6e, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x69, 0x6f, 0x2e,
273 0x6c, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6e, 0x65,
274 0x74, 0x22, 0x59, 0x0a, 0x09, 0x49, 0x50, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x14,
275 0x0a, 0x04, 0x69, 0x70, 0x76, 0x34, 0x18, 0x01, 0x20, 0x01, 0x28, 0x07, 0x48, 0x00, 0x52, 0x04,
276 0x69, 0x70, 0x76, 0x34, 0x12, 0x30, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x36, 0x18, 0x02, 0x20, 0x01,
277 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x69, 0x6f, 0x2e, 0x6c, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x64, 0x2e,
278 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x49, 0x50, 0x76, 0x36, 0x48, 0x00,
279 0x52, 0x04, 0x69, 0x70, 0x76, 0x36, 0x42, 0x04, 0x0a, 0x02, 0x69, 0x70, 0x22, 0x5b, 0x0a, 0x09,
280 0x49, 0x50, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x2f, 0x0a, 0x02, 0x69, 0x70, 0x18,
281 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x69, 0x6f, 0x2e, 0x6c, 0x69, 0x6e, 0x6b, 0x65,
282 0x72, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x49, 0x50, 0x41,
283 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x02, 0x69, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72,
284 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09,
285 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x4c, 0x65, 0x6e, 0x22, 0x30, 0x0a, 0x04, 0x49, 0x50, 0x76,
286 0x36, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x72, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x06,
287 0x52, 0x05, 0x66, 0x69, 0x72, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x61, 0x73, 0x74, 0x18,
288 0x02, 0x20, 0x01, 0x28, 0x06, 0x52, 0x04, 0x6c, 0x61, 0x73, 0x74, 0x22, 0x51, 0x0a, 0x0a, 0x54,
289 0x63, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2f, 0x0a, 0x02, 0x69, 0x70, 0x18,
290 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x69, 0x6f, 0x2e, 0x6c, 0x69, 0x6e, 0x6b, 0x65,
291 0x72, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x49, 0x50, 0x41,
292 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x02, 0x69, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f,
293 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x2e,
294 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x6e,
295 0x6b, 0x65, 0x72, 0x64, 0x2f, 0x6c, 0x69, 0x6e, 0x6b, 0x65, 0x72, 0x64, 0x32, 0x2d, 0x70, 0x72,
296 0x6f, 0x78, 0x79, 0x2d, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x6e, 0x65, 0x74, 0x62, 0x06,
297 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
298 }
299
300 var (
301 file_net_proto_rawDescOnce sync.Once
302 file_net_proto_rawDescData = file_net_proto_rawDesc
303 )
304
305 func file_net_proto_rawDescGZIP() []byte {
306 file_net_proto_rawDescOnce.Do(func() {
307 file_net_proto_rawDescData = protoimpl.X.CompressGZIP(file_net_proto_rawDescData)
308 })
309 return file_net_proto_rawDescData
310 }
311
312 var file_net_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
313 var file_net_proto_goTypes = []interface{}{
314 (*IPAddress)(nil),
315 (*IPNetwork)(nil),
316 (*IPv6)(nil),
317 (*TcpAddress)(nil),
318 }
319 var file_net_proto_depIdxs = []int32{
320 2,
321 0,
322 0,
323 3,
324 3,
325 3,
326 3,
327 0,
328 }
329
330 func init() { file_net_proto_init() }
331 func file_net_proto_init() {
332 if File_net_proto != nil {
333 return
334 }
335 if !protoimpl.UnsafeEnabled {
336 file_net_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
337 switch v := v.(*IPAddress); i {
338 case 0:
339 return &v.state
340 case 1:
341 return &v.sizeCache
342 case 2:
343 return &v.unknownFields
344 default:
345 return nil
346 }
347 }
348 file_net_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
349 switch v := v.(*IPNetwork); i {
350 case 0:
351 return &v.state
352 case 1:
353 return &v.sizeCache
354 case 2:
355 return &v.unknownFields
356 default:
357 return nil
358 }
359 }
360 file_net_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
361 switch v := v.(*IPv6); i {
362 case 0:
363 return &v.state
364 case 1:
365 return &v.sizeCache
366 case 2:
367 return &v.unknownFields
368 default:
369 return nil
370 }
371 }
372 file_net_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
373 switch v := v.(*TcpAddress); i {
374 case 0:
375 return &v.state
376 case 1:
377 return &v.sizeCache
378 case 2:
379 return &v.unknownFields
380 default:
381 return nil
382 }
383 }
384 }
385 file_net_proto_msgTypes[0].OneofWrappers = []interface{}{
386 (*IPAddress_Ipv4)(nil),
387 (*IPAddress_Ipv6)(nil),
388 }
389 type x struct{}
390 out := protoimpl.TypeBuilder{
391 File: protoimpl.DescBuilder{
392 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
393 RawDescriptor: file_net_proto_rawDesc,
394 NumEnums: 0,
395 NumMessages: 4,
396 NumExtensions: 0,
397 NumServices: 0,
398 },
399 GoTypes: file_net_proto_goTypes,
400 DependencyIndexes: file_net_proto_depIdxs,
401 MessageInfos: file_net_proto_msgTypes,
402 }.Build()
403 File_net_proto = out.File
404 file_net_proto_rawDesc = nil
405 file_net_proto_goTypes = nil
406 file_net_proto_depIdxs = nil
407 }
408
View as plain text