Add ActiveConnection.IP6Config
This commit is contained in:
parent
c8c883838e
commit
c6e950e45a
1 changed files with 33 additions and 1 deletions
|
@ -57,9 +57,18 @@ type ActiveConnection interface {
|
||||||
// GetIP4Config gets the IP4Config of the connection.
|
// GetIP4Config gets the IP4Config of the connection.
|
||||||
GetIP4Config() IP4Config
|
GetIP4Config() IP4Config
|
||||||
|
|
||||||
// GetDHCP4Config gets the DHCP4Config of the connection.
|
// GetDHCP4Config gets the DHCP6Config of the connection.
|
||||||
GetDHCP4Config() DHCP4Config
|
GetDHCP4Config() DHCP4Config
|
||||||
|
|
||||||
|
// GetDefault gets the default IPv6 flag of the connection.
|
||||||
|
GetDefault6() bool
|
||||||
|
|
||||||
|
// GetIP6Config gets the IP6Config of the connection.
|
||||||
|
GetIP6Config() IP6Config
|
||||||
|
|
||||||
|
// GetDHCP6Config gets the DHCP4Config of the connection.
|
||||||
|
//GetDHCP6Config() DHCP6Config
|
||||||
|
|
||||||
// GetVPN gets the VPN flag of the connection.
|
// GetVPN gets the VPN flag of the connection.
|
||||||
GetVPN() bool
|
GetVPN() bool
|
||||||
|
|
||||||
|
@ -150,6 +159,29 @@ func (a *activeConnection) GetDHCP4Config() DHCP4Config {
|
||||||
return r
|
return r
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (a *activeConnection) GetDefault6() bool {
|
||||||
|
b := a.getProperty(ActiveConnectionPropertyDefault6)
|
||||||
|
return b.(bool)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (a *activeConnection) GetIP6Config() IP6Config {
|
||||||
|
path := a.getObjectProperty(ActiveConnectionPropertyIp6Config)
|
||||||
|
r, err := NewIP6Config(path)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
//func (a *activeConnection) GetDHCP6Config() DHCP6Config {
|
||||||
|
// path := a.getObjectProperty(ActiveConnectionPropertyDhcp6Config)
|
||||||
|
// r, err := NewDHCP6Config(path)
|
||||||
|
// if err != nil {
|
||||||
|
// panic(err)
|
||||||
|
// }
|
||||||
|
// return r
|
||||||
|
//}
|
||||||
|
|
||||||
func (a *activeConnection) GetVPN() bool {
|
func (a *activeConnection) GetVPN() bool {
|
||||||
ret := a.getProperty(ActiveConnectionPropertyVpn)
|
ret := a.getProperty(ActiveConnectionPropertyVpn)
|
||||||
return ret.(bool)
|
return ret.(bool)
|
||||||
|
|
Reference in a new issue