-
Notifications
You must be signed in to change notification settings - Fork 63
/
net.pb.netconn.go
653 lines (586 loc) · 21.4 KB
/
net.pb.netconn.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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
// Code generated by kraftkit.sh/tools/protoc-gen-go-netconn. DO NOT EDIT.
// source: machine/qemu/qmp/v7alpha2/net.proto
package qmpv7alpha2
// Available netdev drivers.
type NetClientDriver string
const (
NET_CLIENT_DRIVER_NONE = NetClientDriver("none")
NET_CLIENT_DRIVER_NIC = NetClientDriver("nic")
NET_CLIENT_DRIVER_USER = NetClientDriver("user")
NET_CLIENT_DRIVER_TAP = NetClientDriver("tap")
NET_CLIENT_DRIVER_L2TPV3 = NetClientDriver("l2tpv3")
NET_CLIENT_DRIVER_SOCKET = NetClientDriver("socket")
NET_CLIENT_DRIVER_STREAM = NetClientDriver("stream")
NET_CLIENT_DRIVER_DGRAM = NetClientDriver("dgram")
NET_CLIENT_DRIVER_VDE = NetClientDriver("vde")
NET_CLIENT_DRIVER_BRIDGE = NetClientDriver("bridge")
NET_CLIENT_DRIVER_HUBPORT = NetClientDriver("hubport")
NET_CLIENT_DRIVER_NETMAP = NetClientDriver("netmap")
NET_CLIENT_DRIVER_VHOST_USER = NetClientDriver("vhost-user")
NET_CLIENT_DRIVER_VHOST_VDPA = NetClientDriver("vhost-vdpa")
)
func (e NetClientDriver) String() string {
return string(e)
}
func NetClientDrivers() []NetClientDriver {
return []NetClientDriver{
NET_CLIENT_DRIVER_NONE,
NET_CLIENT_DRIVER_NIC,
NET_CLIENT_DRIVER_USER,
NET_CLIENT_DRIVER_TAP,
NET_CLIENT_DRIVER_L2TPV3,
NET_CLIENT_DRIVER_SOCKET,
NET_CLIENT_DRIVER_STREAM,
NET_CLIENT_DRIVER_DGRAM,
NET_CLIENT_DRIVER_VDE,
NET_CLIENT_DRIVER_BRIDGE,
NET_CLIENT_DRIVER_HUBPORT,
NET_CLIENT_DRIVER_NETMAP,
NET_CLIENT_DRIVER_VHOST_USER,
NET_CLIENT_DRIVER_VHOST_VDPA,
}
}
// Packets receiving state
//
// Since: 1.6
type RxState string
const (
// filter assigned packets according to the mac-table
RX_STATE_NORMAL = RxState("normal")
// don't receive any assigned packet
RX_STATE_NONE = RxState("none")
// receive all assigned packets
RX_STATE_ALL = RxState("all")
)
func (e RxState) String() string {
return string(e)
}
func RxStates() []RxState {
return []RxState{
RX_STATE_NORMAL,
RX_STATE_NONE,
RX_STATE_ALL,
}
}
type SetLinkRequest struct {
Execute string `json:"execute" default:"set_link"`
Arguments SetLinkRequestArguments `json:"arguments,omitempty"`
}
type SetLinkRequestArguments struct {
Name string `json:"name"`
Up bool `json:"up"`
}
// Create a new Network Interface Card.
//
// Since: 1.2
type NetLegacyNicOptions struct {
// identifier for monitor commands.
Id string `json:"id"`
// Specify the driver used for interpreting remaining arguments.
Type NetClientDriver `json:"type"`
// id of -netdev to connect to
Netdev string `json:"netdev"`
// MAC address
Macaddr string `json:"macaddr"`
// device model (e1000, rtl8139, virtio etc.)
Model string `json:"model"`
// PCI device address
Addr string `json:"addr"`
// number of MSI-x vectors, 0 to disable MSI-X
Vectors uint32 `json:"vectors"`
}
// Use the user mode network stack which requires no administrator privilege to
// run.
//
// Since: 1.2
type NetdevUserOptions struct {
// identifier for monitor commands.
Id string `json:"id"`
// Specify the driver used for interpreting remaining arguments.
Type NetClientDriver `json:"type"`
// client hostname reported by the builtin DHCP server
Hostname string `json:"hostname"`
// isolate the guest from the host
Restrict bool `json:"restrict"`
// whether to support IPv4, default true for enabled (since 2.6)
Ipv4 bool `json:"ipv4"`
// whether to support IPv6, default true for enabled (since 2.6)
Ipv6 bool `json:"ipv6"`
// legacy parameter, use net= instead
Ip string `json:"ip"`
// IP network address that the guest will see, in the form addr[/netmask] The
// netmask is optional, and can be either in the form a.b.c.d or as a number
// of valid top-most bits. Default is 10.0.2.0/24.
Net string `json:"net"`
// guest-visible address of the host
Host string `json:"host"`
// root directory of the built-in TFTP server
Tftp string `json:"tftp"`
// BOOTP filename, for use with tftp=
Bootfile string `json:"bootfile"`
// the first of the 16 IPs the built-in DHCP server can assign
Dhcpstart string `json:"dhcpstart"`
// guest-visible address of the virtual nameserver
Dns string `json:"dns"`
// list of DNS suffixes to search, passed as DHCP option to the guest
Dnssearch string `json:"dnssearch"`
// guest-visible domain name of the virtual nameserver (since 3.0)
Domainname string `json:"domainname"`
// IPv6 network prefix (default is fec0::) (since 2.6). The network prefix is
// given in the usual hexadecimal IPv6 address notation.
Ipv6Prefix string `json:"ipv6-prefix"`
// IPv6 network prefix length (default is 64) (since 2.6)
Ipv6Prefixlen int64 `json:"ipv6-prefixlen"`
// guest-visible IPv6 address of the host (since 2.6)
Ipv6Host string `json:"ipv6-host"`
// guest-visible IPv6 address of the virtual nameserver (since 2.6)
Ipv6Dns string `json:"ipv6-dns"`
// root directory of the built-in SMB server
Smb string `json:"smb"`
// IP address of the built-in SMB server
Smbserver string `json:"smbserver"`
// redirect incoming TCP or UDP host connections to guest endpoints
Hostfwd string `json:"hostfwd"`
// forward guest TCP connections
Guestfwd string `json:"guestfwd"`
// RFC2132 "TFTP server name" string (Since 3.1)
TftpServerName string `json:"tftp-server-name"`
}
// Used to configure a host TAP network interface backend.
//
// Since: 1.2
type NetdevTapOptions struct {
// identifier for monitor commands.
Id string `json:"id"`
// Specify the driver used for interpreting remaining arguments.
Type NetClientDriver `json:"type"`
// interface name
Ifname string `json:"ifname"`
// file descriptor of an already opened tap
Fd string `json:"fd"`
// multiple file descriptors of already opened multiqueue capable tap
Fds string `json:"fds"`
// script to initialize the interface
Script string `json:"script"`
// script to shut down the interface
Downscript string `json:"downscript"`
// bridge name (since 2.8)
Br string `json:"br"`
// command to execute to configure bridge
Helper string `json:"helper"`
// send buffer limit. Understands [TGMKkb] suffixes.
Sndbuf uint64 `json:"sndbuf"`
// enable the IFF_VNET_HDR flag on the tap interface
VnetHdr bool `json:"vnet_hdr"`
// enable vhost-net network accelerator
Vhost bool `json:"vhost"`
// file descriptor of an already opened vhost net device
Vhostfd string `json:"vhostfd"`
// file descriptors of multiple already opened vhost net devices
Vhostfds string `json:"vhostfds"`
// vhost on for non-MSIX virtio guests
Vhostforce bool `json:"vhostforce"`
// number of queues to be created for multiqueue capable tap
Queues uint32 `json:"queues"`
// maximum number of microseconds that could be spent on busy polling for tap
// (since 2.7)
PollUs uint32 `json:"poll-us"`
}
// Configure an Ethernet over L2TPv3 tunnel.
//
// Since: 2.1
type NetdevL2TPv3Options struct {
// identifier for monitor commands.
Id string `json:"id"`
// Specify the driver used for interpreting remaining arguments.
Type NetClientDriver `json:"type"`
// source address
Src string `json:"src"`
// destination address
Dst string `json:"dst"`
// source port - mandatory for udp, optional for ip
Srcport string `json:"srcport"`
// destination port - mandatory for udp, optional for ip
Dstport string `json:"dstport"`
// force the use of ipv6
Ipv6 bool `json:"ipv6"`
// use the udp version of l2tpv3 encapsulation
Udp bool `json:"udp"`
// use 64 bit cookies
Cookie64 bool `json:"cookie64"`
// have sequence counter
Counter bool `json:"counter"`
// pin sequence counter to zero - workaround for buggy implementations or
// networks with packet reorder
Pincounter bool `json:"pincounter"`
// 32 or 64 bit transmit cookie
Txcookie uint64 `json:"txcookie"`
// 32 or 64 bit receive cookie
Rxcookie uint64 `json:"rxcookie"`
// 32 bit transmit session
Txsession uint32 `json:"txsession"`
// 32 bit receive session - if not specified set to the same value as transmit
Rxsession uint32 `json:"rxsession"`
// additional offset - allows the insertion of additional application-specific
// data before the packet payload
Offset uint32 `json:"offset"`
}
// Socket netdevs are used to establish a network connection to another QEMU
// virtual machine via a TCP socket.
//
// Since: 1.2
type NetdevSocketOptions struct {
// identifier for monitor commands.
Id string `json:"id"`
// Specify the driver used for interpreting remaining arguments.
Type NetClientDriver `json:"type"`
// file descriptor of an already opened socket
Fd string `json:"fd"`
// port number, and optional hostname, to listen on
Listen string `json:"listen"`
// port number, and optional hostname, to connect to
Connect string `json:"connect"`
// UDP multicast address and port number
Mcast string `json:"mcast"`
// source address and port for multicast and udp packets
Localaddr string `json:"localaddr"`
// UDP unicast address and port number
Udp string `json:"udp"`
}
// Configuration info for stream socket netdev
//
// Only SocketAddress types 'unix', 'inet' and 'fd' are supported.
//
// Since: 7.2
type NetdevStreamOptions struct {
// identifier for monitor commands.
Id string `json:"id"`
// Specify the driver used for interpreting remaining arguments.
Type NetClientDriver `json:"type"`
// socket address to listen on (server=true) or connect to (server=false)
Addr SocketAddress `json:"addr"`
// create server socket (default: false)
Server bool `json:"server"`
}
// Configuration info for datagram socket netdev.
//
// Only SocketAddress types 'unix', 'inet' and 'fd' are supported.
//
// If remote address is present and it's a multicast address, local address
// is optional. Otherwise local address is required and remote address is
// optional.
//
// .. table:: Valid parameters combination table
//
// :widths: auto
//
// ============= ======== =====
// remote local okay?
// ============= ======== =====
// absent absent no
// absent not fd no
// absent fd yes
// multicast absent yes
// multicast present yes
// not multicast absent no
// not multicast present yes
// ============= ======== =====
//
// Since: 7.2
type NetdevDgramOptions struct {
// identifier for monitor commands.
Id string `json:"id"`
// Specify the driver used for interpreting remaining arguments.
Type NetClientDriver `json:"type"`
// local address
Local SocketAddress `json:"local"`
// remote address
Remote SocketAddress `json:"remote"`
}
// Connect to a vde switch running on the host.
//
// Since: 1.2
type NetdevVdeOptions struct {
// identifier for monitor commands.
Id string `json:"id"`
// Specify the driver used for interpreting remaining arguments.
Type NetClientDriver `json:"type"`
// socket path
Sock string `json:"sock"`
// port number
Port int32 `json:"port"`
// group owner of socket
Group string `json:"group"`
// permissions for socket
Mode int32 `json:"mode"`
}
// Connect a host TAP network interface to a host bridge device.
//
// Since: 1.2
type NetdevBridgeOptions struct {
// identifier for monitor commands.
Id string `json:"id"`
// Specify the driver used for interpreting remaining arguments.
Type NetClientDriver `json:"type"`
// bridge name
Br string `json:"br"`
// command to execute to configure bridge
Helper string `json:"helper"`
}
// Connect two or more net clients through a software hub.
//
// Since: 1.2
type NetdevHubPortOptions struct {
// identifier for monitor commands.
Id string `json:"id"`
// Specify the driver used for interpreting remaining arguments.
Type NetClientDriver `json:"type"`
// hub identifier number
Hubid int32 `json:"hubid"`
// used to connect hub to a netdev instead of a device (since 2.12)
Netdev string `json:"netdev"`
}
// Connect a client to a netmap-enabled NIC or to a VALE switch port
//
// Since: 2.0
type NetdevNetmapOptions struct {
// identifier for monitor commands.
Id string `json:"id"`
// Specify the driver used for interpreting remaining arguments.
Type NetClientDriver `json:"type"`
// Either the name of an existing network interface supported by netmap, or
// the name of a VALE port (created on the fly). A VALE port name is in the
// form 'valeXXX:YYY', where XXX and YYY are non-negative integers. XXX
// identifies a switch and YYY identifies a port of the switch. VALE ports
// having the same XXX are therefore connected to the same switch.
Ifname string `json:"ifname"`
// path of the netmap device (default: '/dev/netmap').
Devname string `json:"devname"`
}
// Vhost-user network backend
//
// Since: 2.1
type NetdevVhostUserOptions struct {
// identifier for monitor commands.
Id string `json:"id"`
// Specify the driver used for interpreting remaining arguments.
Type NetClientDriver `json:"type"`
// name of a unix socket chardev
Chardev string `json:"chardev"`
// vhost on for non-MSIX virtio guests (default: false).
Vhostforce bool `json:"vhostforce"`
// number of queues to be created for multiqueue vhost-user (default: 1)
// (Since 2.5)
Queues int32 `json:"queues"`
}
// Vhost-vdpa network backend
//
// vDPA device is a device that uses a datapath which complies with the virtio
// specifications with a vendor specific control path.
//
// Since: 5.1
type NetdevVhostVDPAOptions struct {
// identifier for monitor commands.
Id string `json:"id"`
// Specify the driver used for interpreting remaining arguments.
Type NetClientDriver `json:"type"`
// path of vhost-vdpa device (default:'/dev/vhost-vdpa-0')
Vhostdev string `json:"vhostdev"`
// file descriptor of an already opened vhost vdpa device
Vhostfd string `json:"vhostfd"`
// number of queues to be created for multiqueue vhost-vdpa (default: 1)
Queues int32 `json:"queues"`
// Start device with (experimental) shadow virtqueue. (Since 7.1) (default:
// false). `x-svq` is experimental.
XSvq bool `json:"x-svq"`
}
// vmnet (host mode) network backend.
//
// Allows the vmnet interface to communicate with other vmnet interfaces that
// are in host mode and also with the host.
//
// Since: 7.1
type NetdevVmnetHostOptions struct {
// identifier for monitor commands.
Id string `json:"id"`
// Specify the driver used for interpreting remaining arguments.
Type NetClientDriver `json:"type"`
// The starting IPv4 address to use for the interface. Must be in the private
// IP range (RFC 1918). Must be specified along with @end-address and
// @subnet-mask. This address is used as the gateway address. The subsequent
// address up to and including end-address are placed in the DHCP pool.
StartAddress string `json:"start-address"`
// The DHCP IPv4 range end address to use for the interface. Must be in the
// private IP range (RFC 1918). Must be specified along with @start-address
// and @subnet-mask.
EndAddress string `json:"end-address"`
// The IPv4 subnet mask to use on the interface. Must be specified along with
// @start-address and @subnet-mask.
SubnetMask string `json:"subnet-mask"`
// Enable isolation for this interface. Interface isolation ensures that vmnet
// interface is not able to communicate with any other vmnet interfaces. Only
// communication with host is allowed. Requires at least macOS Big Sur 11.0.
Isolated bool `json:"isolated"`
// The identifier (UUID) to uniquely identify the isolated network vmnet
// interface should be added to. If set, no DHCP service is provided for this
// interface and network communication is allowed only with other interfaces
// added to this network identified by the UUID. Requires at least macOS Big
// Sur 11.0.
NetUuid string `json:"net-uuid"`
}
// vmnet (shared mode) network backend.
//
// Allows traffic originating from the vmnet interface to reach the Internet
// through a network address translator (NAT). The vmnet interface can
// communicate with the host and with other shared mode interfaces on the same
// subnet. If no DHCP settings, subnet mask and IPv6 prefix specified, the
// interface can communicate with any of other interfaces in shared mode.
//
// Since: 7.1
type NetdevVmnetSharedOptions struct {
// identifier for monitor commands.
Id string `json:"id"`
// Specify the driver used for interpreting remaining arguments.
Type NetClientDriver `json:"type"`
// The starting IPv4 address to use for the interface. Must be in the private
// IP range (RFC 1918). Must be specified along with @end-address and
// @subnet-mask. This address is used as the gateway address. The subsequent
// address up to and including end-address are placed in the DHCP pool.
StartAddress string `json:"start-address"`
// The DHCP IPv4 range end address to use for the interface. Must be in the
// private IP range (RFC 1918). Must be specified along with @start-address
// and @subnet-mask.
EndAddress string `json:"end-address"`
// The IPv4 subnet mask to use on the interface. Must be specified along with
// @start-address and @subnet-mask.
SubnetMask string `json:"subnet-mask"`
// Enable isolation for this interface. Interface isolation ensures that vmnet
// interface is not able to communicate with any other vmnet interfaces. Only
// communication with host is allowed. Requires at least macOS Big Sur 11.0.
Isolated bool `json:"isolated"`
// The IPv6 prefix to use into guest network. Must be a unique local address
// i.e. start with fd00::/8 and have length of 64.
Nat66Prefix string `json:"nat66-prefix"`
}
// vmnet (bridged mode) network backend.
//
// Bridges the vmnet interface with a physical network interface.
//
// Since: 7.1
type NetdevVmnetBridgedOptions struct {
// identifier for monitor commands.
Id string `json:"id"`
// Specify the driver used for interpreting remaining arguments.
Type NetClientDriver `json:"type"`
// The name of the physical interface to be bridged.
Ifname string `json:"ifname"`
// Enable isolation for this interface. Interface isolation ensures that vmnet
// interface is not able to communicate with any other vmnet interfaces. Only
// communication with host is allowed. Requires at least macOS Big Sur 11.0.
Isolated bool `json:"isolated"`
}
type NetdevAddLegacyNicRequest struct {
Execute string `json:"execute" default:"netdev_add"`
Arguments NetLegacyNicOptions `json:"arguments"`
}
type NetdevAddDevUserRequest struct {
Execute string `json:"execute" default:"netdev_add"`
Arguments NetdevUserOptions `json:"arguments"`
}
type NetdevAddDevTapRequest struct {
Execute string `json:"execute" default:"netdev_add"`
Arguments NetdevTapOptions `json:"arguments"`
}
type NetdevAddDevL2TPv3Request struct {
Execute string `json:"execute" default:"netdev_add"`
Arguments NetdevL2TPv3Options `json:"arguments"`
}
type NetdevAddDevSocketRequest struct {
Execute string `json:"execute" default:"netdev_add"`
Arguments NetdevSocketOptions `json:"arguments"`
}
type NetdevAddDevStreamRequest struct {
Execute string `json:"execute" default:"netdev_add"`
Arguments NetdevStreamOptions `json:"arguments"`
}
type NetdevAddDevDgramRequest struct {
Execute string `json:"execute" default:"netdev_add"`
Arguments NetdevDgramOptions `json:"arguments"`
}
type NetdevAddDevVdeRequest struct {
Execute string `json:"execute" default:"netdev_add"`
Arguments NetdevVdeOptions `json:"arguments"`
}
type NetdevAddDevBridgeRequest struct {
Execute string `json:"execute" default:"netdev_add"`
Arguments NetdevBridgeOptions `json:"arguments"`
}
type NetdevAddDevHubPortRequest struct {
Execute string `json:"execute" default:"netdev_add"`
Arguments NetdevHubPortOptions `json:"arguments"`
}
type NetdevAddDevNetmapRequest struct {
Execute string `json:"execute" default:"netdev_add"`
Arguments NetdevNetmapOptions `json:"arguments"`
}
type NetdevAddDevVhostUserRequest struct {
Execute string `json:"execute" default:"netdev_add"`
Arguments NetdevVhostUserOptions `json:"arguments"`
}
type NetdevAddDevVhostVDPARequest struct {
Execute string `json:"execute" default:"netdev_add"`
Arguments NetdevVhostVDPAOptions `json:"arguments"`
}
type NetdevAddDevVmnetHostRequest struct {
Execute string `json:"execute" default:"netdev_add"`
Arguments NetdevVmnetHostOptions `json:"arguments"`
}
type NetdevAddDevVmnetSharedRequest struct {
Execute string `json:"execute" default:"netdev_add"`
Arguments NetdevVmnetSharedOptions `json:"arguments"`
}
type NetdevAddDevVmnetBridgedRequest struct {
Execute string `json:"execute" default:"netdev_add"`
Arguments NetdevVmnetBridgedOptions `json:"arguments"`
}
type NetdevDelRequest struct {
Execute string `json:"execute" default:"netdev_del"`
Arguments NetdevDelRequestArguments `json:"arguments"`
}
type NetdevDelRequestArguments struct {
Id string `json:"id"`
}
type QueryRxFilterRequest struct {
Execute string `json:"execute" default:"query-rx-filter"`
Arguments QueryRxFilterRequestArguments `json:"arguments"`
}
type QueryRxFilterRequestArguments struct {
Name string `json:"name"`
}
// Rx-filter information for a NIC.
type QueryRxFilterResponse struct {
// net client name
Name string `json:"name"`
// whether promiscuous mode is enabled
Promiscuous bool `json:"promiscuous"`
// multicast receive state
Multicast RxState `json:"multicast"`
// unicast receive state
Unicast RxState `json:"unicast"`
// vlan receive state (Since 2.0)
Vlan RxState `json:"vlan"`
// whether to receive broadcast
BroadcastAllowed bool `json:"broadcast-allowed"`
// multicast table is overflowed or not
MulticastOverflow bool `json:"multicast-overflow"`
// unicast table is overflowed or not
UnicastOverflow bool `json:"unicast-overflow"`
// the main macaddr string
MainMac string `json:"main-mac"`
// a list of active vlan id
VlanTable []int32 `json:"vlan-table"`
// a list of unicast macaddr string
UnicastTable []string `json:"unicast-table"`
// a list of multicast macaddr string
MulticastTable []string `json:"multicast-table"`
}