NAME

Net::Interface::Wireless::FreeBSD - Get information for wireless interfactes.

VERSION

Version 1.0.0

SYNOPSIS

use Net::Interface::Wireless::FreeBSD qw/ListWirelessInterfaces/;

#gets a array of wireless interfaces
my @wifs=ListWirelessInterfaces();

#get a list of visible APs with exporting the Listscan function for the first wireless device found
my %scanhash=Net::Interface::Wireless::FreeBSD::ListScan($wifs[0]);

while(my ($ssid, $ap)=each(%scanhash)){
	print "SSID: ".$ssid.
		"\nBSSID: ".$ap->{bssid}.
		"\nChannel: ".$ap->{channel}.
		"\nSNR: ".$ap->{snr}.
		"\nRate: ".$ap->{rate}.
		"\nBeacon Interval: ".$ap->{int}.
		"\nESS: ".$ap->{ess}.
		"\nIBSS".$ap->{ibss}.
		"\nPrivacy: ".$ap->{privacy}.
		"\nShort Preanble: ".$ap->{"short preamble"}.
		"\nShort Time Slot: ".$ap->{"short time slot"}."\n\n";
};

EXPORT

ListWirelessInterfaces ListScan

FUNCTIONS

ListWirelessInterfaces

This looks in "/dev/net/" and checks to see if any of them there are recognized interfaces.

Currently it recognizes an(4), ath(4), awi(4), ipw(4), iwi(4), ral(4), ural(4), and wi(4).

ListScan($interface)

Fetch a list of seen APs. This can be used as a non-super user. It just lists seen APs.

This function returns undef upon error and upon success a hash. For info on the hash return, please see the section SCAN RETURN.

Scan($interface)

Fetch a list of seen APs, but can only be ran by a super user. This initiates a actual scan.

You may have to potential reassociate with a AP afterwards if you are connected to one.

This function returns undef upon error and upon success a hash. For info on the hash return, please see the section SCAN RETURN.

SCAN RETURN

The return is a hash, whose keys are the seen SSIDs. The value of each key is then another hash. See below for a list of keys for that hash.

bssid

The BSSID of the base station in question.

channel

The channel the base station is operating on.

snr

The signal to noise ratio of a connection.

rate

The base rate for the AP. This is what it is set to, not a guarrentee you will get it.

int

The beacon interval for the base station.

ess

A boolean value for if the AP is in ESS mode or not. This is always defined, even if not in ESS mode.

ibss

A boolean value for if the AP is in IBSS/ad-hoc mode or not. This is always defined, even if not in IBSS/ad-hoc mode.

privacy

Wether or not the AP any sort of encryption enabled. This is always defined, even if not it is using encryption.

short preable

Wether or not the AP is set for short preable. This is always defined, even if not it set to short preable.

short time slot

Wether or not the AP is set for short time slot. This is always defined, even if not it set to short time slot.

AUTHOR

Zane C. Bowers, <vvelox at vvelox.net>

BUGS

Please report any bugs or feature requests to bug-net-interface-wireless-freebsd at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-Interface-Wireless-FreeBSD. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Net::Interface::Wireless::FreeBSD

You can also look for information at:

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

Copyright 2008 Zane C. Bowers, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.