惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Tenable Blog
D
DataBreaches.Net
S
Secure Thoughts
B
Blog
S
Schneier on Security
Y
Y Combinator Blog
P
Proofpoint News Feed
C
Cybersecurity and Infrastructure Security Agency CISA
C
Cyber Attacks, Cyber Crime and Cyber Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
F
Full Disclosure
Engineering at Meta
Engineering at Meta
L
LangChain Blog
T
Threatpost
阮一峰的网络日志
阮一峰的网络日志
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The Hacker News
The Hacker News
月光博客
月光博客
大猫的无限游戏
大猫的无限游戏
Cyberwarzone
Cyberwarzone
T
The Exploit Database - CXSecurity.com
雷峰网
雷峰网
博客园 - 司徒正美
Help Net Security
Help Net Security
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Application and Cybersecurity Blog
Application and Cybersecurity Blog
P
Privacy International News Feed
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Vulnerabilities – Threatpost
Cisco Talos Blog
Cisco Talos Blog
L
LINUX DO - 热门话题
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Threat Research - Cisco Blogs
Recent Announcements
Recent Announcements
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
H
Heimdal Security Blog
Jina AI
Jina AI
C
Cisco Blogs
Attack and Defense Labs
Attack and Defense Labs
Microsoft Security Blog
Microsoft Security Blog
L
Lohrmann on Cybersecurity
aimingoo的专栏
aimingoo的专栏
D
Docker
I
Intezer
C
Check Point Blog
Cloudbric
Cloudbric
小众软件
小众软件
V2EX - 技术
V2EX - 技术

NetworkManager

NetworkManager 1.54 NetworkManager 1.52 Protect your VPN from TunnelVision attacks NetworkManager 1.50 Addressing hostname assignment in NetworkManager 1.40 Help NetworkManager project to triage issues NetworkManager 1.48 NetworkManager 1.46 NetworkManager 1.44 NetworkManager 1.42 Set up NMCI on Fedora Linux VM Using Python and NetworkManager to control the network [link] Notes on D-Bus NetworkManager 1.40 NetworkManager 1.38 From ifcfg to keyfiles [link] NetworkManager 1.36 NetworkManager 1.34 NetworkManager 1.32 NetworkManager 1.30 Initscripts’ ifcfg-rh Format in NetworkManager and its Future [link] How to set up your NetworkManager environment [link] NetworkManager 1.28 [link] Looking forward to Linux network configuration in the initial ramdisk (initrd) [link] NetworkManager 1.26 [link] Internet connection sharing with NetworkManager [link] Why NetworkManager? [link] Please welcome: NetworkManager 1.20 [link] Becoming friends with NetworkManager [link] WireGuard in NetworkManager [link] MAC Address Spoofing in NetworkManager 1.4.0 [link] NetworkManager for administrators man pages Video tutorials VPN support RFKill
Resources for developers
2001-01-01 · via NetworkManager

D-Bus API

NetworkManager provides a D-Bus interface on the system bus. You can use this interface to query network state and the details of network interfaces like current IP addresses or DHCP options, and to activate, deactivate, created, edit, and delete saved network connections.

Check the D-Bus API reference: STABLE DEVEL

libnm API

libnm wraps the D-Bus API in easy-to-use GObjects and is often much simpler for glib-based applications to use.

libnm’s API provides two core aspects. One is NMConnection and NMSetting types, which help handling NetworkManager’s connection profiles. The other is NMClient, which is a cache of the D-Bus objects from D-Bus API.

Check the libnm API reference: STABLE DEVEL

This is a simple example on how to print existing connections in Python using GObject introspection:

#!/usr/bin/python3

# GObject-introspection is needed to call libnm from python
import gi
gi.require_version("NM", "1.0")
from gi.repository import NM

def print_values(setting, key, value, flags, data):
    print("     {}.{}: {}".format(setting.get_name(), key, value))

# Create the client object. This automatically loads all the D-Bus
# tree and creates in-memory objects for connections, devices, access
# points, etc.
client = NM.Client.new(None)

# Obtain a list of connection profiles ...
connections = client.get_connections()

# ... and print their properties
for c in connections:
    print("{}:".format(c.get_id()))
    c.for_each_setting_value(print_values, None)
    print("\n")

Examples

Examples in Python and other languages are available in the NetworkManager git tree.

Release Numbering

Major NetworkManager releases are numbered 1.y.0, with y being an even number. For example, 1.0.0, 1.2.0, …, 1.18.0.

Minor stable releases are numbered 1.y.z, with y and z being even numbers. For example 1.4.2, 1.18.2.

Development snapshots from the upstream main branch are numbered 1.y.z with y being an odd number. This is the development for the upcoming stable release 1.$((y+1)).0. Such snapshots don’t guarantee a stable API and have less testing. Use with care.