<div dir="ltr">Thanks! will try it out.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Feb 13, 2024 at 11:55 PM Íñigo Huguet <<a href="mailto:ihuguet@redhat.com">ihuguet@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">NetworkManager used D-Bus for interprocess communication. If you can<br>
use D-Bus in your application, this is the property that you need to<br>
check, I think:<br>
<a href="https://networkmanager.dev/docs/api/latest/gdbus-org.freedesktop.NetworkManager.Device.html#gdbus-property-org-freedesktop-NetworkManager-Device.Managed" rel="noreferrer" target="_blank">https://networkmanager.dev/docs/api/latest/gdbus-org.freedesktop.NetworkManager.Device.html#gdbus-property-org-freedesktop-NetworkManager-Device.Managed</a><br>
<br>
A dirtier workaround would be to `exec` this command and check if the<br>
output is "10 (unmanaged)":<br>
    LANG=C nmcli -g GENERAL.STATE d show eth0<br>
<br>
On Sat, Feb 10, 2024 at 11:48 AM Usman S. Ansari <<a href="mailto:usman.ansari@gmail.com" target="_blank">usman.ansari@gmail.com</a>> wrote:<br>
><br>
> Hello,<br>
><br>
> How can I tell from a C program that the networking manager is controlling the interface?<br>
<br>
<br>
<br>
-- <br>
Íñigo Huguet<br>
<br>
</blockquote></div>