[netcf-devel] dumpxml output format of resulting xml file

Laine Stump laine at laine.org
Tue Mar 6 20:36:25 UTC 2012


On 03/03/2012 01:52 AM, hiren panchasara wrote:
> Hi Laine,
>
> For regular "dumpxml <interface>", we read "struct ifaddrs" and get
> interface info.

"ncftool dumpxml <interface>" is effectively ncf_if_xml_desc(), which
should return the current configuration as it is in the system's
configuration files (in /etc).

If I understand you, what you're doing actually isn't correct. For
ncf_if_xml_desc(), you should instead be reading the config files in
/etc and creating xml from that. For example, the output of
ncf_if_xml_desc() would show that the interface is configured to acquire
its IP address using dhcp, but wouldn't say what is the current IP address.


What does "--live" signify in "dumpxml --live <interface>"? Help says
"include information about the live interface". Can you elaborate a
little more?

"ncftool dumpxml <interface> --live" is calling ncf_if_xml_state(),
which should return the current state of the interface as it is running
on the system. *That* is where you should be querying the system to
learn current IP address, etc.



More information about the netcf-devel mailing list