This repository has been archived by the owner on Oct 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
tun_manager_interface.go
66 lines (51 loc) · 1.74 KB
/
tun_manager_interface.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
package libwimark
// Tun Manager
type LinkDescriptor struct {
LinkName string `json:"name"`
LinkType string `json:"type"`
LinkHWAddr string `json:"hw_addr"`
}
type CPETunnelDescription struct {
TunnelID int `json:"tunnel_id"`
InterfacesAttached []string `json:"interfaces_attached"`
}
// // CreateL2Tunnel
// type CreateL2TunnelParams struct {
// CPETunnelID int `json:"cpe_tunnel_id"`
// CPEIP string `json:"cpe_ip"`
// }
// type CreateL2TunnelResult struct {
// WasCreated bool `json:"was_created"`
// HostTunnelID int `json:"host_tunnel_id"`
// }
// // DeleteL2Tunnel
// type DeleteL2TunnelParams struct {
// HostTunnelID int `json:"host_tunnel_id"`
// }
// type DeleteL2TunnelResult struct {
// WasDeleted bool `json:"was_deleted"`
// }
// CreateL2TunnelSession
type CreateL2TunnelSessionParams struct {
CPEIP string `json:"cpe_ip"`
CPESessionID int `json:"cpe_session_id"`
CPETunnelID int `json:"cpe_tunnel_id"`
HostIP string `json:"host_ip"`
CommutationInterfaceName string `json:"commutation_interface"`
CommutationInterfaceVlan int `json:"commutation_vlan,omitempty"`
}
type CreateL2TunnelSessionResult struct {
WasCreated bool `json:"was_created"`
HostSessionID int `json:"host_session_id"`
HostTunnelID int `json:"host_tunnel_id"`
HostL2InterfaceName string `json:"host_l2_interface"`
}
// DeleteL2TunnelSession
type DeleteL2TunnelSessionParams struct {
HostSessionID int `json:"host_session_id"`
HostInterfaceName string `json:"host_l2_interface"`
}
type DeleteL2TunnelSessionResult struct {
WasDeleted bool `json:"was_deleted"`
WasTunnelDeleted bool `json:"was_tunnel_deleted"`
}