Skip to content

Commit 24266a3

Browse files
committed
1 parent 4b20a2d commit 24266a3

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Device.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@ type Device interface {
150150
// True if the device exists, or False for placeholder devices that do not yet exist but could be automatically created by NetworkManager if one of their AvailableConnections was activated.
151151
GetPropertyReal() (bool, error)
152152

153+
// The result of the last IPv4 connectivity check.
154+
GetPropertyIp4Connectivity() (NmConnectivity, error)
155+
153156
MarshalJSON() ([]byte, error)
154157
}
155158

@@ -309,6 +312,11 @@ func (d *device) GetPropertyReal() (bool, error) {
309312
return d.getBoolProperty(DevicePropertyReal)
310313
}
311314

315+
func (d *device) GetPropertyIp4Connectivity() (NmConnectivity, error) {
316+
u, err := d.getUint32Property(DevicePropertyIp4Connectivity)
317+
return NmConnectivity(u), err
318+
}
319+
312320
func (d *device) marshalMap() (map[string]interface{}, error) {
313321
Interface, err := d.GetPropertyInterface()
314322
if err != nil {

0 commit comments

Comments
 (0)