Network Manager controlling network interface

Usman S. Ansari usman.ansari at gmail.com
Wed Feb 14 22:06:40 UTC 2024


Thanks! will try it out.

On Tue, Feb 13, 2024 at 11:55 PM Íñigo Huguet <ihuguet at redhat.com> wrote:

> NetworkManager used D-Bus for interprocess communication. If you can
> use D-Bus in your application, this is the property that you need to
> check, I think:
>
> https://networkmanager.dev/docs/api/latest/gdbus-org.freedesktop.NetworkManager.Device.html#gdbus-property-org-freedesktop-NetworkManager-Device.Managed
>
> A dirtier workaround would be to `exec` this command and check if the
> output is "10 (unmanaged)":
>     LANG=C nmcli -g GENERAL.STATE d show eth0
>
> On Sat, Feb 10, 2024 at 11:48 AM Usman S. Ansari <usman.ansari at gmail.com>
> wrote:
> >
> > Hello,
> >
> > How can I tell from a C program that the networking manager is
> controlling the interface?
>
>
>
> --
> Íñigo Huguet
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/networkmanager/attachments/20240214/5debe33b/attachment.htm>


More information about the Networkmanager mailing list