Skip to content

Commit c4a5913

Browse files
Sliimseveas
authored andcommitted
Add new devices type
According to the NetworkManager documentation: https://developer.gnome.org/NetworkManager/stable/nm-dbus-types.html#NMDeviceType There is 4 new device type: NM_DEVICE_TYPE_WPAN = 27 - a IEEE 802.15.4 (WPAN) MAC Layer Device NM_DEVICE_TYPE_6LOWPAN = 28 - 6LoWPAN interface NM_DEVICE_TYPE_WIREGUARD = 29 - a WireGuard interface NM_DEVICE_TYPE_WIFI_P2P = 30 - an 802.11 Wi-Fi P2P device (Since: 1.16) This changes add contants and classes for these devices and add them in the device_class dict. Fix seveas#68 seveas#76 See also seveas#80
1 parent 094c935 commit c4a5913

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

NetworkManager.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,11 @@ def device_class(typ):
389389
NM_DEVICE_TYPE_PPP: PPP,
390390
NM_DEVICE_TYPE_OVS_INTERFACE: OvsIf,
391391
NM_DEVICE_TYPE_OVS_PORT: OvsPort,
392-
NM_DEVICE_TYPE_OVS_BRIDGE: OvsBridge
392+
NM_DEVICE_TYPE_OVS_BRIDGE: OvsBridge,
393+
NM_DEVICE_TYPE_WPAN: Wpan,
394+
NM_DEVICE_TYPE_6LOWPAN: SixLoWpan,
395+
NM_DEVICE_TYPE_WIREGUARD: WireGuard,
396+
NM_DEVICE_TYPE_WIFI_P2P: WifiP2p
393397
}[typ]
394398

395399
class Adsl(Device): pass
@@ -416,6 +420,10 @@ class PPP(Device): pass
416420
class OvsIf(Device): pass
417421
class OvsPort(Device): pass
418422
class OvsBridge(Device): pass
423+
class Wpan(Device): pass
424+
class SixLoWpan(Device): pass
425+
class WireGuard(Device): pass
426+
class WifiP2p(Device): pass
419427

420428
class NSP(TransientNMDbusInterface):
421429
interface_names = ['org.freedesktop.NetworkManager.Wimax.NSP']

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy