Le 05/04/2012 09:42, Guillaume Rousse a écrit :
While reviewing yesterday changes from Goneri, I found there was some
confusion in our code between two different concepts: network interfaces
and network addresses. Worse, we are not even consistent among the
various OS, most notably between Linux and Windows.
Let's consider a machine with two interfaces, one active with two
attached addresses, and one inactive.
Hi all
Strategy 6:
(Try to) follow established standards : http://dmtf.org/standards/cim
<LogicalPort> <!--
https://www.vmware.com/support/developer/cim-sdk/smash/u4/ga/apirefdoc/CIM_LogicalPort.html
-->
<Name>lo</Name>
<Status>0</Status>
</LogicalPort>
<EthernetPort> <!--
https://www.vmware.com/support/developer/cim-sdk/smash/u4/ga/apirefdoc/CIM_EthernetPort.html
-->
<Name>eth0</Name>
<Status>0</Status>
</EthernetPort>
<EthernetPort>
<Name>eth1</Name>
<Status>0</Status>
</EthernetPort>
<EthernetPort>
<Name>eth2</Name>
<Status>10</Status> <!-- not connected -->
</EthernetPort>
<LogicalPort>
<Name>bond0</Name>
<Status>10</Status>
<_Relations>
<Slaves>eth0</Slaves> <!-- not a "normalized" relation, may inherit
from the "depend" relation -->
<Slaves>eth1</Slaves>
</_Relations>
</LogicalPort>
<IPProtocolEndpoint> <!--
https://www.vmware.com/support/developer/cim-sdk/smash/u4/ga/apirefdoc/CIM_IPProtocolEndpoint.html
-->
<_Relations>
<LogicalPort>lo</LogicalPort>
</_Relations>
<IPv4Address>127.0.0.1</IPv4Address>
<AddressType>1</AddressType>
<SubnetMask>255.0.0.0</SubnetMask>
</IPProtocolEndpoint>
<IPProtocolEndpoint>
<_Relations>
<LogicalPort>bond0</LogicalPort>
</_Relations>
<IPv4Address>10.1.2.42</IPv4Address>
<AddressType>1</AddressType>
<SubnetMask>255.0.0.0</SubnetMask>
</IPProtocolEndpoint>
<IPProtocolEndpoint>
<_Relations>
<LogicalPort>bond0</LogicalPort>
</_Relations>
<IPv6Address>aaaaaa</IPv6Address>
<AddressType>2</AddressType>
</IPProtocolEndpoint>
Advantage: standards, expandable, interoperability
Inconvenient: much more work at initial steps
I'll be back ;-P
--
Stéphane
_______________________________________________
Fusioninventory-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/fusioninventory-devel