|
From: Thanos P. <pan...@ce...> - 2005-06-17 18:23:12
|
Stop working! thimios has already posted a patch for this in the CVS! :)
sorry, but I had forgotten all about it...
Christopher Ness wrote:
> On Fri, 2005-06-17 at 20:21 +0300, Thanos Panousis wrote:
>
>>Yes that is the case, our variables are named in a coherent way, and
>>that sucks. But there just a few vars there in config.php, so it fairly
>>easy to implement a single naming convention.
>
>
> What format would you like to see new additions to the config file?
>
>
>>You are also wright with the wifi interfaces that pop up. The last
>>version of wifiadmin was made with older versions of hostap, that did
>>not involve showing 2 ifs per wifi card. This must be fixed of course.
>>There is no way in the current design, to not show some ifs. All the
>>parsing of the wireless configuration is parsed on every request. So we
>>got to figure how to design this....
>>
>>I will post later with more ideas.
>
>
> Here is how I am currently looking though the code.
>
> The pages that I see using wireless interface settings are:
> iwsettings.php
> iwstatus.php
> iwsecurity.php
> ifsettings.php - does, but separate from the above
>
> I'm using version 0.0.4 of wifiadmin as my base, not CVS - would you
> prefer I diff against CVS? It is easier for me to track a stable
> release instead of vendor CVS drops.
>
> I added a check to get_wireless_status() that drops interfaces with the
> substring "wifi" in them. It would need to be extended to look up the
> strings to exclude from the config file instead of being hard coded.
>
> /*iwconfig output in an array with device names as keys*/
> function get_wireless_status(){
> global $iwconfig_bin;
> $iwconfig_output = trim(`$iwconfig_bin`);
> $device_status_strings = explode("\n\n", $iwconfig_output);
> foreach($device_status_strings as $device_status_string){
> sscanf($device_status_string,"%s ",$device);
> if (strstr($device_status_string, "no wireless
> extensions") !==
> continue;
> if (strstr($device, "wifi") !== false)
> continue;
> $devices_data[$device] =
> parse_iwconfig($device_status_string);
> $devices_data[$device]["name"] = $device;
> }
> return $devices_data;
> }
>
> This covers all iw*.php pages, but not ifsettings.php which calls
> get_ethernet_status() instead which could be modified in the same way,
> therefore a function call would be nice since it's used at least twice.
>
> Perhaps named
> boolean display_interface()
>
> True would mean to display the interface, false would mean not to
> display it.
>
> Is there a better place to put these interface checks? No need for a
> quick reply I'm moving on to other things this afternoon.
>
> Cheers,
> Chris
|