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

Laine Stump laine at laine.org
Tue Mar 6 22:08:54 UTC 2012


On 03/06/2012 03:52 PM, hiren panchasara wrote:
>
>
> On Tue, Mar 6, 2012 at 12:41 PM, Laine Stump <laine at laine.org
> <mailto:laine at laine.org>> wrote:
>
>     On 03/06/2012 12:27 PM, hiren panchasara wrote:
>>
>>
>>     On Fri, Mar 2, 2012 at 10:52 PM, hiren panchasara
>>     <hiren.panchasara at gmail.com <mailto:hiren.panchasara at gmail.com>>
>>     wrote:
>>
>>         For regular "dumpxml <interface>", we read "struct ifaddrs"
>>         and get interface info.
>>
>>         What does "--live" signify in "dumpxml --live <interface>"?
>>         Help says "include information about the live interface". Can
>>         you elaborate a little more?
>>
>>
>>     I am asking this because for FreeBSD, network interface
>>     information is not stored in any files. So, whatever we get for
>>     regular "dumpxml <interface>" is _supposedly_ live.(?)
>
>     Where is the configuration stored? How would you configure an
>     interface manually so that it ends up with that configuration on
>     the next system boot? That's the information you should be
>     outputting for ncf_if_xml_desc() (i.e. the non-live version of
>     ncftool dumpxml). The "--live" means "show me what is the live
>     settings in the kernel right now").
>
>
> I do not know if there is a place/file which stores such info. I might
> be wrong. I will check for that. If I cannot find something like that,
> I can still poke the same structures for "dumpxml <interface>" and
> "dumpxml --live <interface>" but print only relevant values. That
> should be okay, I guess?


Unless you have to reconfigure the network setting from scratch every
time the system boots, the network config will be stored *somewhere* on
the disk, by definition. And there will either be an API you can call to
get / modify that config information, or you can modify the files
directly. netcf's job, exactly, is to 1) read this persistent config
information and return it to the caller in a standardized XML format,
and 2) accept config information in the standardized XML format, and
feed it back into the system's persistent config.

What do you do now if you want to modify your FreeBSD system's network
configuration? For example, if you want to switch from using dhcp to a
static IP address?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://fedorahosted.org/pipermail/netcf-devel/attachments/20120306/e814cb27/attachment.html>


More information about the netcf-devel mailing list