nm_device_disconnect



Hi,
I am using libnm-glib version 0.9.4.0-0ubuntu4.3 on ubuntu 12.04 precise pangolin. I would like to time the delay of activation of an adhoc network and I would like to do statistics: creating an adhoc network with a pc, scan and connect with an other, log the different times and repeat. So far I am able to create the adhoc network, scan and connect. I am stuck at the repeat part since I would like to disconnect the network but I do not find how to proceed. It seems that there exists a nm_device_disconnect function with the following prototype: gboolean nm_device_disconnect (NMDevice *device, GError **error);
in the source of the NetworkManager
however in the include directory of libnm-glib the file nm-device.h contains only the following function: void nm_device_disconnect (NMDevice *device, NMDeviceDeactivateFn callback, gpointer user_data);

I tried to use the last one with a dummy callback function and with a pointer to a NMClient object but it did not disconnect the network.

Thanks for any hint or pointer.

--

Manuel



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]