List of DBus methods for talking to NetworkManager
- From: Jack Spaar <jspaar users sourceforge net>
- To: networkmanager-list gnome org
- Subject: List of DBus methods for talking to NetworkManager
- Date: Tue, 24 Oct 2006 17:26:58 -0700
As a reference for scripting with dbus-send, I extracted these
lists of DBus methods from the NM source. Maybe this will be
handy for others.
Of course it would be better if this were in wiki somewhere.
(If it is already, please let me know. Otherwise, feel free
to borrow any of this.)
--Jack Spaar
------------------
List of DBus methods for talking to NetworkManager
Note0: IMPORTANT: These are current as of NetworkManager-0.6.4, but you should fully expect the DBus API to change in future.
Note1: Some of these are methods and others are signals. Signals don't return a reply:
dbus-send --system --type=signal --dest=org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager.setWirelessEnabled boolean:false
Note2: Apparently not all of these are meant for general use. E.g., setLinkActive now works only with test devices.
Note3: You may need a more recent version of dbus for dbus-send to handle all object types. dbus-0.61 is new enough.
# Methods from nm-dbus-nm.c, general to NM process, invoked like so:
# dbus-send --system --print-reply --reply-timeout=2000 --type=method_call --dest=org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager.getDevices
Name Type Args Returns
-------------------------------------------------------------------------------
getDevices Method none Array of object path
getDialup Method
activateDialup
deactivateDialup
setActiveDevice
createWirelessNetwork
setWirelessEnabled Signal boolean none
getWirelessEnabled Method boolean
sleep
wake
state Method uint32 (enum NMState)
createTestDevice
removeTestDevice
# Methods from From nm-dbus-device.c, relevant to specific devices, like so:
# dbus-send --system --print-reply --reply-timeout=2000 --type=method_call --dest=org.freedesktop.NetworkManager /org/freedesktop/NetworkManager/Devices/ath0 org.freedesktop.NetworkManager.getProperties
Name Type Args Returns
-------------------------------------------------------------------------------getProperties Method compound
getName Method string, e.g. "ath0"
getType Method int32 (enum NMDeviceType)
getHalUdi Method string
getIP4Address Method uint32
getHWAddress Method string, e.g. "fe:ed:de:ad:be:ef"
getMode Method int32
getActiveNetwork Method object path
getNetworks Method Array of object path
getLinkActive Method boolean
setLinkActive Signal boolean none
getCapabilities Method uint32 (bitfield)
getDriver Method string
# Methods from From nm-dbus-net.c, relevant to specific network, like so:
# dbus-send --system --print-reply --reply-timeout=2000 --type=method_call --dest=org.freedesktop.NetworkManager /org/freedesktop/NetworkManager/Devices/ath0/Networks/private org.freedesktop.NetworkManager.getFrequency
Name Type Args Returns
-------------------------------------------------------------------------------getProperties Method structure
getName Method string, e.g. "myessid"
getAddress
getStrength
getFrequency Method double
getRate
getEncrypted
getMode
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]