hal/doc/spec hal-spec.html,1.19,1.20 hal-spec.xml.in,1.17,1.18
David Zeuthen
david at freedesktop.org
Thu Sep 16 15:04:17 PDT 2004
Update of /cvs/hal/hal/doc/spec
In directory gabe:/tmp/cvs-serv3493/doc/spec
Modified Files:
hal-spec.html hal-spec.xml.in
Log Message:
2004-09-16 David Zeuthen <david at fubar.dk>
Revisit networking. Basically a) split ethernet and wireless into
net.80203 and net.80211 properties; b) support renaming of
devices; c) use uint64 datatype; d) add property for whether an
interface is up and track this; and e) general cleanups when
properties are available and not
* doc/spec/hal-spec.xml.in: Update spec with changes made. Also
add uint64 property type
* hald/device_store.c (hal_device_store_match_key_value_int): New
function
* hald/device_store.h: Add prototype for function
hal_device_store_match_key_value_int
* hald/linux/hald_helper.h: Add net_ifindex member
* hald/linux/net_class_device.c:
(mii_get_rate): Rename net.ethernet.rate to net.80203.rate and make
the type uint64
(mii_get_link): Rename net.ethernet.link to net.80203.link
(set_device_link_status): Remove function
(link_detection_handle_message): Also listen for interface up/down
messages on the netlink socket; maintains net.interface_up. Also
handle renaming messages. Remove net.80203.* properties if the
interface is down. Remove net.80203.rate if net.80203.link is FALSE.
Only check rate for net.80203 devices (fixes crasher for my new
Atheros card; remember?)
(net_class_pre_process): Rename from net.ethernet to net.80203 and
also have separate net.80211 namespace. Add net.interface_up and
net.linux.ifindex properties. Set net.{80203,80211}.mac_address
as a uint64 rather than net.ethernet.{mac_addr,mac_addr_upper24,
mac_addr_lower24}.
(net_class_accept): Small reorg of code
(net_class_post_merge): Always start listening to netlink socket
* hald/linux/osspec.c:
(process_coldplug_list): Use NULL for hotplug_msg when invoking
add_device
(recover_net_device): New function
(add_device): Use net_ifindex and recover net device to handle
renaming of networking devices by udev and/or initscripts. Now
optionally uses the hotplug msg which may be NULL.
(rem_device): Optionally use the hotplug msg which may be NULL.
(hald_helper_hotplug): Pass on hotplug msg
(hald_helper_device_name): Pass on hotplug msg
(hald_helper_hotplug_process_queue): Pass on hotplug msg
(hald_helper_data): Pass on hotplug msg
* tools/linux/hal_hotplug.c:
(wait_for_sysfs_info): Wait for ifindex for net devices and
extract the value
(main): pass on net_ifindex value to hotplug msg
Index: hal-spec.html
===================================================================
RCS file: /cvs/hal/hal/doc/spec/hal-spec.html,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- hal-spec.html 26 Aug 2004 22:16:16 -0000 1.19
+++ hal-spec.html 16 Sep 2004 22:04:15 -0000 1.20
@@ -304,10 +304,18 @@
></DT
><DT
><A
-HREF="#device-properties-net-ethernet"
+HREF="#device-properties-net-80203"
><TT
CLASS="literal"
->net.ethernet</TT
+>net.80203</TT
+> namespace</A
+></DT
+><DT
+><A
+HREF="#device-properties-net-80211"
+><TT
+CLASS="literal"
+>net.80211</TT
> namespace</A
></DT
><DT
@@ -392,26 +400,26 @@
><DL
><DT
><A
-HREF="#AEN1774"
+HREF="#AEN1808"
>Interface org.freedesktop.Hal.Manager</A
></DT
><DD
><DL
><DT
><A
-HREF="#AEN1785"
+HREF="#AEN1819"
>Example</A
></DT
></DL
></DD
><DT
><A
-HREF="#AEN1793"
+HREF="#AEN1827"
>Interface org.freedesktop.Hal.Device</A
></DT
><DT
><A
-HREF="#AEN1802"
+HREF="#AEN1836"
>Interface org.freedesktop.Hal.AgentManager</A
></DT
></DL
@@ -1028,7 +1036,7 @@
><P
><TT
CLASS="literal"
->int32</TT
+>int</TT
> -
32-bit signed integer</P
></LI
@@ -1036,6 +1044,14 @@
><P
><TT
CLASS="literal"
+>uint64</TT
+> -
+ 64-bit unsigned integer</P
+></LI
+><LI
+><P
+><TT
+CLASS="literal"
>bool</TT
> -
truth value</P
@@ -1350,7 +1366,7 @@
><P
></P
><A
-NAME="AEN198"
+NAME="AEN201"
></A
><TABLE
BORDER="1"
@@ -1520,7 +1536,7 @@
><P
></P
><A
-NAME="AEN266"
+NAME="AEN269"
></A
><TABLE
BORDER="1"
@@ -1659,7 +1675,7 @@
><P
></P
><A
-NAME="AEN310"
+NAME="AEN313"
></A
><TABLE
BORDER="1"
@@ -1882,7 +1898,7 @@
><P
></P
><A
-NAME="AEN399"
+NAME="AEN402"
></A
><TABLE
BORDER="1"
@@ -2274,7 +2290,7 @@
><P
></P
><A
-NAME="AEN562"
+NAME="AEN565"
></A
><TABLE
BORDER="1"
@@ -2403,7 +2419,7 @@
><P
></P
><A
-NAME="AEN609"
+NAME="AEN612"
></A
><TABLE
BORDER="1"
@@ -2488,7 +2504,7 @@
><P
></P
><A
-NAME="AEN637"
+NAME="AEN640"
></A
><TABLE
BORDER="1"
@@ -2584,7 +2600,7 @@
><P
></P
><A
-NAME="AEN667"
+NAME="AEN670"
></A
><TABLE
BORDER="1"
@@ -2653,7 +2669,7 @@
><P
></P
><A
-NAME="AEN688"
+NAME="AEN691"
></A
><TABLE
BORDER="1"
@@ -2770,7 +2786,7 @@
><P
></P
><A
-NAME="AEN729"
+NAME="AEN732"
></A
><TABLE
BORDER="1"
@@ -2892,7 +2908,7 @@
><P
></P
><A
-NAME="AEN774"
+NAME="AEN777"
></A
><TABLE
BORDER="1"
@@ -3013,7 +3029,7 @@
><P
></P
><A
-NAME="AEN819"
+NAME="AEN822"
></A
><TABLE
BORDER="1"
@@ -3086,7 +3102,7 @@
><P
></P
><A
-NAME="AEN841"
+NAME="AEN844"
></A
><TABLE
BORDER="1"
@@ -3283,7 +3299,7 @@
><P
></P
><A
-NAME="AEN901"
+NAME="AEN904"
></A
><TABLE
BORDER="1"
@@ -3506,7 +3522,7 @@
><P
></P
><A
-NAME="AEN997"
+NAME="AEN1000"
></A
><TABLE
BORDER="1"
@@ -3644,7 +3660,7 @@
><P
></P
><A
-NAME="AEN1040"
+NAME="AEN1043"
></A
><TABLE
BORDER="1"
@@ -3755,7 +3771,7 @@
><P
></P
><A
-NAME="AEN1076"
+NAME="AEN1079"
></A
><TABLE
BORDER="1"
@@ -4017,7 +4033,7 @@
><P
></P
><A
-NAME="AEN1183"
+NAME="AEN1186"
></A
><TABLE
BORDER="1"
@@ -4436,7 +4452,7 @@
><P
></P
><A
-NAME="AEN1352"
+NAME="AEN1355"
></A
><TABLE
BORDER="1"
@@ -4635,7 +4651,7 @@
><P
></P
><A
-NAME="AEN1432"
+NAME="AEN1435"
></A
><TABLE
BORDER="1"
@@ -4667,7 +4683,7 @@
><TD
>Yes</TD
><TD
->Hardware address as a string</TD
+>Hardware address as a string. Is hardware dependant</TD
></TR
><TR
><TD
@@ -4693,7 +4709,34 @@
><TD
>Yes</TD
><TD
->Name of the interface</TD
+>Name of the interface; may change if an interface is
+ renamed</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>net.interface_up</TT
+> (bool)</TD
+><TD
+> </TD
+><TD
+>Yes</TD
+><TD
+>Whether the interface is up</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>net.linux.ifindex</TT
+> (string)</TD
+><TD
+> </TD
+><TD
+>Yes (only on Linux)</TD
+><TD
+>Index of the interface</TD
></TR
><TR
><TD
@@ -4732,10 +4775,10 @@
><HR><H3
CLASS="sect2"
><A
-NAME="device-properties-net-ethernet"
+NAME="device-properties-net-80203"
><TT
CLASS="literal"
->net.ethernet</TT
+>net.80203</TT
> namespace</A
></H3
><P
@@ -4744,12 +4787,12 @@
for device objects with the capability
<TT
CLASS="literal"
->net.ethernet</TT
+>net.80203</TT
>.
Note that device
objects can only have the <TT
CLASS="literal"
->net.ethernet</TT
+>net.80203</TT
> capability
if they already have the capability <TT
CLASS="literal"
@@ -4762,7 +4805,7 @@
><P
></P
><A
-NAME="AEN1478"
+NAME="AEN1493"
></A
><TABLE
BORDER="1"
@@ -4787,12 +4830,24 @@
><TD
><TT
CLASS="literal"
->net.ethernet.link</TT
+>net.80203.link</TT
> (bool)</TD
><TD
> </TD
><TD
->Only if net.arp_proto_hw_id=1</TD
+> Only if the <TT
+CLASS="literal"
+>net.80203</TT
+> capability is set
+ and <TT
+CLASS="literal"
+>net.interface_up</TT
+> is
+ <TT
+CLASS="literal"
+>TRUE</TT
+>.
+ </TD
><TD
>True iff the ethernet adaptor is connected to a
another transceiver</TD
@@ -4801,12 +4856,24 @@
><TD
><TT
CLASS="literal"
->net.ethernet.rate</TT
-> (int)</TD
+>net.80203.rate</TT
+> (uint64)</TD
><TD
>example: 100000000</TD
><TD
->Only if net.arp_proto_hw_id=1</TD
+> Only if the <TT
+CLASS="literal"
+>net.80203</TT
+> capability is set
+ and <TT
+CLASS="literal"
+>net.80203.link</TT
+> is
+ <TT
+CLASS="literal"
+>TRUE</TT
+>.
+ </TD
><TD
>Bandwidth of connection, in bits/s</TD
></TR
@@ -4814,42 +4881,98 @@
><TD
><TT
CLASS="literal"
->net.ethernet.mac_addr</TT
-> (string)</TD
+>net.80203.mac_address</TT
+> (uint64)</TD
><TD
->example: 00:10:60:5d:8e:f4</TD
+>example: 0x0010605d8ef4</TD
><TD
->Only if net.arp_proto_hw_id=1</TD
+>Only if the <TT
+CLASS="literal"
+>net.80203</TT
+> is set</TD
><TD
->Textual representation of MAC address</TD
+>48-bit address</TD
></TR
-><TR
-><TD
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+><P
+> </P
+></DIV
+><DIV
+CLASS="sect2"
+><HR><H3
+CLASS="sect2"
+><A
+NAME="device-properties-net-80211"
><TT
CLASS="literal"
->net.ethernet.mac_addr_lower24</TT
-> (int)</TD
-><TD
->example: 0x00001060</TD
-><TD
->Only if net.arp_proto_hw_id=1</TD
-><TD
->Binary representation of lower 24 bits of the MAC
- address</TD
+>net.80211</TT
+> namespace</A
+></H3
+><P
+>
+ Wireless ethernet networking devices is described in this namespace
+ for device objects with the capability
+ <TT
+CLASS="literal"
+>net.80211</TT
+>.
+ Note that device
+ objects can only have the <TT
+CLASS="literal"
+>net.80211</TT
+> capability
+ if they already have the capability <TT
+CLASS="literal"
+>net</TT
+>.
+
+ </P
+><DIV
+CLASS="informaltable"
+><P
+></P
+><A
+NAME="AEN1535"
+></A
+><TABLE
+BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><THEAD
+><TR
+><TH
+>Key (type)</TH
+><TH
+>Values</TH
+><TH
+>Mandatory</TH
+><TH
+>Description</TH
></TR
+></THEAD
+><TBODY
><TR
><TD
><TT
CLASS="literal"
->net.ethernet.mac_addr_upper24</TT
-> (int)</TD
+>net.80211.mac_address</TT
+> (uint64)</TD
><TD
->example: 0x005d8ef4</TD
+>example: 0x0010605d8ef4</TD
><TD
->Only if net.arp_proto_hw_id=1</TD
+> Only if the <TT
+CLASS="literal"
+>net.80211</TT
+> capability is set
+ </TD
><TD
->Binary representation of the upper 24 bits of the MAC
- address</TD
+>48-bit address</TD
></TR
></TBODY
></TABLE
@@ -4886,7 +5009,7 @@
><P
></P
><A
-NAME="AEN1523"
+NAME="AEN1557"
></A
><TABLE
BORDER="1"
@@ -4953,7 +5076,7 @@
><P
></P
><A
-NAME="AEN1543"
+NAME="AEN1577"
></A
><TABLE
BORDER="1"
@@ -5018,7 +5141,7 @@
><P
></P
><A
-NAME="AEN1563"
+NAME="AEN1597"
></A
><TABLE
BORDER="1"
@@ -5145,7 +5268,7 @@
><P
></P
><A
-NAME="AEN1607"
+NAME="AEN1641"
></A
><TABLE
BORDER="1"
@@ -5292,7 +5415,7 @@
><P
></P
><A
-NAME="AEN1655"
+NAME="AEN1689"
></A
><TABLE
BORDER="1"
@@ -5646,7 +5769,7 @@
><P
></P
><A
-NAME="AEN1732"
+NAME="AEN1766"
></A
><TABLE
BORDER="1"
@@ -5806,7 +5929,7 @@
><HR><H2
CLASS="sect1"
><A
-NAME="AEN1774"
+NAME="AEN1808"
>Interface org.freedesktop.Hal.Manager</A
></H2
><P
@@ -5922,7 +6045,7 @@
><HR><H3
CLASS="sect2"
><A
-NAME="AEN1785"
+NAME="AEN1819"
>Example</A
></H3
><P
@@ -6040,7 +6163,7 @@
><HR><H2
CLASS="sect1"
><A
-NAME="AEN1793"
+NAME="AEN1827"
>Interface org.freedesktop.Hal.Device</A
></H2
><P
@@ -6193,7 +6316,7 @@
><HR><H2
CLASS="sect1"
><A
-NAME="AEN1802"
+NAME="AEN1836"
>Interface org.freedesktop.Hal.AgentManager</A
></H2
><P
Index: hal-spec.xml.in
===================================================================
RCS file: /cvs/hal/hal/doc/spec/hal-spec.xml.in,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- hal-spec.xml.in 26 Aug 2004 18:04:20 -0000 1.17
+++ hal-spec.xml.in 16 Sep 2004 22:04:15 -0000 1.18
@@ -406,8 +406,10 @@
<itemizedlist>
<listitem><para><literal>string</literal> -
UTF8 string</para></listitem>
- <listitem><para><literal>int32</literal> -
+ <listitem><para><literal>int</literal> -
32-bit signed integer</para></listitem>
+ <listitem><para><literal>uint64</literal> -
+ 64-bit unsigned integer</para></listitem>
<listitem><para><literal>bool</literal> -
truth value</para></listitem>
<listitem><para><literal>double</literal> -
@@ -2312,7 +2314,7 @@
<entry><literal>net.address</literal> (string)</entry>
<entry></entry>
<entry>Yes</entry>
- <entry>Hardware address as a string</entry>
+ <entry>Hardware address as a string. Is hardware dependant</entry>
</row>
<row>
<entry><literal>net.arp_proto_hw_id</literal> (string)</entry>
@@ -2324,7 +2326,20 @@
<entry><literal>net.interface</literal> (string)</entry>
<entry></entry>
<entry>Yes</entry>
- <entry>Name of the interface</entry>
+ <entry>Name of the interface; may change if an interface is
+ renamed</entry>
+ </row>
+ <row>
+ <entry><literal>net.interface_up</literal> (bool)</entry>
+ <entry></entry>
+ <entry>Yes</entry>
+ <entry>Whether the interface is up</entry>
+ </row>
+ <row>
+ <entry><literal>net.linux.ifindex</literal> (string)</entry>
+ <entry></entry>
+ <entry>Yes (only on Linux)</entry>
+ <entry>Index of the interface</entry>
</row>
<row>
<entry><literal>net.linux.sysfs_path</literal> (string)</entry>
@@ -2346,15 +2361,15 @@
- <sect2 id="device-properties-net-ethernet">
- <title><literal>net.ethernet</literal> namespace</title>
+ <sect2 id="device-properties-net-80203">
+ <title><literal>net.80203</literal> namespace</title>
<para>
Ethernet networking devices is described in this namespace
for device objects with the capability
- <literal>net.ethernet</literal>.
+ <literal>net.80203</literal>.
Note that device
- objects can only have the <literal>net.ethernet</literal> capability
+ objects can only have the <literal>net.80203</literal> capability
if they already have the capability <literal>net</literal>.
</para>
@@ -2372,39 +2387,73 @@
<tbody>
<row>
- <entry><literal>net.ethernet.link</literal> (bool)</entry>
+ <entry><literal>net.80203.link</literal> (bool)</entry>
<entry></entry>
- <entry>Only if net.arp_proto_hw_id=1</entry>
+ <entry>
+ Only if the <literal>net.80203</literal> capability is set
+ and <literal>net.interface_up</literal> is
+ <literal>TRUE</literal>.
+ </entry>
<entry>True iff the ethernet adaptor is connected to a
another transceiver</entry>
</row>
<row>
- <entry><literal>net.ethernet.rate</literal> (int)</entry>
+ <entry><literal>net.80203.rate</literal> (uint64)</entry>
<entry>example: 100000000</entry>
- <entry>Only if net.arp_proto_hw_id=1</entry>
+ <entry>
+ Only if the <literal>net.80203</literal> capability is set
+ and <literal>net.80203.link</literal> is
+ <literal>TRUE</literal>.
+ </entry>
<entry>Bandwidth of connection, in bits/s</entry>
</row>
<row>
- <entry><literal>net.ethernet.mac_addr</literal> (string)</entry>
- <entry>example: 00:10:60:5d:8e:f4</entry>
- <entry>Only if net.arp_proto_hw_id=1</entry>
- <entry>Textual representation of MAC address</entry>
+ <entry><literal>net.80203.mac_address</literal> (uint64)</entry>
+ <entry>example: 0x0010605d8ef4</entry>
+ <entry>Only if the <literal>net.80203</literal> is set</entry>
+ <entry>48-bit address</entry>
</row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ </para>
+ </sect2>
+
+
+
+ <sect2 id="device-properties-net-80211">
+ <title><literal>net.80211</literal> namespace</title>
+ <para>
+
+ Wireless ethernet networking devices is described in this namespace
+ for device objects with the capability
+ <literal>net.80211</literal>.
+ Note that device
+ objects can only have the <literal>net.80211</literal> capability
+ if they already have the capability <literal>net</literal>.
+
+ </para>
+
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
<row>
- <entry><literal>net.ethernet.mac_addr_lower24</literal> (int)</entry>
- <entry>example: 0x00001060</entry>
- <entry>Only if net.arp_proto_hw_id=1</entry>
- <entry>Binary representation of lower 24 bits of the MAC
- address</entry>
+ <entry>Key (type)</entry>
+ <entry>Values</entry>
+ <entry>Mandatory</entry>
+ <entry>Description</entry>
</row>
+ </thead>
+ <tbody>
<row>
- <entry><literal>net.ethernet.mac_addr_upper24</literal> (int)</entry>
- <entry>example: 0x005d8ef4</entry>
- <entry>Only if net.arp_proto_hw_id=1</entry>
- <entry>Binary representation of the upper 24 bits of the MAC
- address</entry>
+ <entry><literal>net.80211.mac_address</literal> (uint64)</entry>
+ <entry>example: 0x0010605d8ef4</entry>
+ <entry>
+ Only if the <literal>net.80211</literal> capability is set
+ </entry>
+ <entry>48-bit address</entry>
</row>
-
</tbody>
</tgroup>
</informaltable>
@@ -2412,6 +2461,8 @@
</para>
</sect2>
+
+
<sect2 id="device-properties-input">
<title><literal>input</literal> namespace</title>
<para>
More information about the hal-commit
mailing list