On 03/06/2012 03:52 PM, hiren panchasara wrote:
On Tue, Mar 6, 2012 at 12:41 PM, Laine Stump <laine(a)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(a)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.
Yes, there are structs storing the info and some apis to get them.
Thanks for thorough explanation.
Hiren