/
rpc.go
46 lines (41 loc) · 1.43 KB
/
rpc.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
package interfaces
type InterfaceRpc struct {
Information struct {
Interfaces []PhyInterface `xml:"physical-interface"`
} `xml:"interface-information"`
}
type PhyInterface struct {
Name string `xml:"name"`
AdminStatus string `xml:"admin-status"`
OperStatus string `xml:"oper-status"`
Description string `xml:"description"`
MacAddress string `xml:"current-physical-address"`
Stats TrafficStat `xml:"traffic-statistics"`
LogicalInterfaces []LogInterface `xml:"logical-interface"`
InputErrors struct {
Drops int64 `xml:"input-drops"`
Errors int64 `xml:"input-errors"`
} `xml:"input-error-list"`
OutputErrors struct {
Drops int64 `xml:"output-drops"`
Errors int64 `xml:"output-errors"`
} `xml:"output-error-list"`
}
type LogInterface struct {
Name string `xml:"name"`
Description string `xml:"description"`
Stats TrafficStat `xml:"traffic-statistics"`
}
type TrafficStat struct {
InputBytes int64 `xml:"input-bytes"`
InputPackets int64 `xml:"input-packets"`
OutputBytes int64 `xml:"output-bytes"`
OutputPackets int64 `xml:"output-packets"`
IPv6Traffic IPv6Stat `xml:"ipv6-transit-statistics"`
}
type IPv6Stat struct {
InputBytes int64 `xml:"input-bytes"`
InputPackets int64 `xml:"input-packets"`
OutputBytes int64 `xml:"output-bytes"`
OutputPackets int64 `xml:"output-packets"`
}