From c6e950e45a364e7781f25b1224005522dd1e945c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20M=C3=BCller?= Date: Fri, 17 May 2019 18:13:37 +0200 Subject: [PATCH] Add ActiveConnection.IP6Config --- ActiveConnection.go | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/ActiveConnection.go b/ActiveConnection.go index 3c9b5ec..36fc71f 100644 --- a/ActiveConnection.go +++ b/ActiveConnection.go @@ -57,9 +57,18 @@ type ActiveConnection interface { // GetIP4Config gets the IP4Config of the connection. GetIP4Config() IP4Config - // GetDHCP4Config gets the DHCP4Config of the connection. + // GetDHCP4Config gets the DHCP6Config of the connection. 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() bool @@ -150,6 +159,29 @@ func (a *activeConnection) GetDHCP4Config() DHCP4Config { 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 { ret := a.getProperty(ActiveConnectionPropertyVpn) return ret.(bool)