<div>Thanks for the incite, I'll make sure to put this in there.</div>
<div>Chris<br><br>&nbsp;</div>
<div><span class="gmail_quote">On 8/5/06, <b class="gmail_sendername">Stefan Winter</b> &lt;<a href="mailto:swinter@kde.org">swinter@kde.org</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi folks,<br><br>I'm Stefan Winter, the author of KWiFiManager and the (infamous) kcmwifi. As<br>you may have read some time ago on k-c-d I will discontinue kcmwifi, keeping
<br>only KWiFiManager-the-monitoring-app alive, and let you guys from Solid do<br>the job for configuration handling.<br>I have just subscribed to kde-hardware-devel because I'd still like to keep an<br>eye on what's happening on the wifi configuration front.
<br>I encountered ervin's tarball with the initial wifi implementation on the list<br>archives from last month and took a brief look at it. Here are some things I<br>stumbled over...<br><br>(ifaces/wifi.h):<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /**
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* @brief retrieves the IP address.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* @return A list of the address information.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; virtual QString networkAddress() const = 0;<br><br>With the advent of IPv6, this is not going to be sufficient. Devices have more
<br>than one IP address (arguably, even with IPv4, but multile IPs is not usually<br>a scenario for wireless devices with IPv4). Mobile IPv6 and whatnot may lead<br>you to end<br>up with a fleabag of IP addresses when you are mobile.
<br>RESOLUTION: I'd suggest a QStringList (trunk KWiFiManager already retrieves a<br>QStringList BTW)<br><br>&nbsp;&nbsp; signals:<br>/**<br>* This signal is emitted when the network device is out of range of the WAP.<br>*<br>* @param outofrange Whether the network device is out of range of the WAP.
<br>*/<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; virtual void outOfRange( bool outofrange ) = 0;<br><br>Interesting. I'm not entirely sure how this can be reliably implemented.<br>Especially when you're close to the edge of a network, you may<br>experience &quot;flapping&quot; of the interface, and emitting this signal every
<br>fraction of a second doesn't sound appealing to me.<br>A recurring wish for kcmwifi was &quot;execute a shutdown script when the device<br>_leaves_ the network&quot;. My guess would be to connect to this signal and<br>
execute the script, but if there's flapping, that is not a good idea any<br>more.<br><br>(ifaces/enums.h)<br><br>&nbsp;&nbsp; struct Wifi<br>&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /**<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* This enum type defines which method of encryption is being used.
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* - None: The device doesn't use encryption<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* - WEP: The device uses WEP for encryption<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* - WPA: The device uses WPA for encryption<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* - WPA2: The device uses WPA2 for encryption
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* TODO: There is still much to be decided here.&nbsp;&nbsp;What bitrate of WEP?<br>What server method<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* for WPA, etc.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; enum EncryptionType { None, WEP, WPA, WPA2 };<br><br>
That's quite true. WEP is very inconsistent. There have been many vendor<br>extensions the WEP encryption scheme so that you can not be sure which key<br>lengths exist (&quot;bitrate&quot; as a term looks strange here). I've seen WEP-64 (&quot;ye
<br>olde&quot;), WEP-128, WEP-192 and WEP-256, but you can never be sure what's out<br>there. The wireless extension's new interface allows you to ask the card what<br>lengths are supported dynamically. Which is not good for use in an enum, of
<br>course.<br><br>Plus, you may want to have more fine-grained encryption types: WEP comes as a<br>static method (you enter the key) or an authentication-server supplied key<br>(&quot;dynamic WEP&quot;). Same goes for WPA and WPA2, it's just called PSK and
<br>Enterprise here.<br>Also, the struct misses the encryption algorithms that can be used in<br>conjunction with WPA and WPA2: you can choose between TKIP and AES in both<br>variants.<br><br>Then there's the question: how far do you want to go? If you are using
<br>dynamic/Enterprise encryption, you could also foresee a reporting mechanism<br>on what authentication method is used (and there are lots of them). But maybe<br>that is going _too_ far.<br><br>RESOLUTION:<br>1) I suggest to make it WEP_64, WEP_128, WEP_192, WEP_256, WEP_OTHER in the
<br>enum, with a method to retrieve length information in case of WEP_OTHER.<br>2) add enum&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; enum KeyType { None, Static, Dynamic };<br>3) add enum&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; enum WPA_Algorithm { None, TKIP, AES };<br><br>a method querying the state of the network connection should return a triplet
<br>of those enums.<br><br>&nbsp;&nbsp;&nbsp;&nbsp; /**<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* This enum type defines the network type the device is connected.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* - Unassociated: The device is not associated with any network.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* - Managed: The device is on a managed network and connected to a WAP.
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* - Adhoc: The device is on an ad-hoc (device-device) network.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; enum Mode {Unassociated, Managed, Adhoc};<br><br>Nice for a start, but you may want to consider that there are sophisticated<br>
setups where a card may itself act as an access point (many cheapo home linux<br>routers equipped with a nice card and a capable driver exist). That would add<br>the state Mode == Master to the enum. Plus, such &quot;software&quot; APs can use the
<br>WDS system to wirelessly connect to other APs. This is a state that the<br>wireless extensions call Mode == Repeater.<br>And there's also Mode == Secondary. But I NEVER figured out what that is<br>supposed to mean or do.
<br><br>RESOLUTION: I suggest to add at least Master and Repeater to the enum, even if<br>these are not used in an initial implementation.<br><br>Okay, that's it for a start. Have a nice weekend!<br><br>Greetings,<br><br>
Stefan Winter<br><br>--<br>The K Desktop Environment<br>- Stefan Winter -<br>Areas of Activity:<br>kdenetwork/wifi (KWiFiManager)<br>kde-i18n/de (German translation)<br>_______________________________________________<br>Kde-hardware-devel mailing list
<br><a href="mailto:Kde-hardware-devel@kde.org">Kde-hardware-devel@kde.org</a><br><a href="https://mail.kde.org/mailman/listinfo/kde-hardware-devel">https://mail.kde.org/mailman/listinfo/kde-hardware-devel</a><br></blockquote>
</div><br><br clear="all"><br>-- <br>War(n) - God's way of teaching Americans geography.