Re: several questions about networkmanager-programming.



On Wed, 2007-02-07 at 18:33 -0500, Jaldhar H. Vyas wrote:
> Hello,
> 
> I have to write a program that interfaces with network-manager and the 
> following questions have arisen;  Via DBus:
> 
> 1.  Can I determine if a particular interface is using DHCP or a static IP
>      address?

No.

> 2.  Can I determine the computers host name and domain name?

You can read /etc/resolv.conf and hostname(1)

> 3.  Is it possible to define more than two (primary and secondary) DNS
>      servers?

Manually?  Some backends might support this via manual config right now.
If you mean via DHCP, then NM should be retrieving all DNS servers that
DHCP returns and stuffing them into /etc/resolv.conf.

> 4. Is it possible to get the domain search info from resolv.conf?

Yes, by reading /etc/resolv.conf.  NM will write search info there if
the DHCP server provides it.

Dan




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