David Leadbeater > Net-Lorcon-0.01 > Net::Lorcon

Download:
Net-Lorcon-0.01.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.01   Source   Latest Release: Net-Lorcon-0.02

NAME ^

Net::Lorcon - Raw wireless packet injection using the Lorcon library

SYNOPSIS ^

  use Net::Lorcon;

  my $tx = Net::Lorcon->new("eth1", "prism54");

  $tx->open;

  $tx->txpacket("packet..");

DESCRIPTION ^

This module enables raw 802.11 packet injection provided you have a Wi-Fi card supported by Lorcon.

Lorcon can be obtained from http://www.802.11mercenary.net/lorcon/.

FUNCTIONS ^

Net::Lorcon::getcardlist

Returns a list of supported driver names.

Net::Lorcon::resolvecard

Returns the ID of the given card. Not normally needed as new will automatically call this.

METHODS ^

new(device, driver)

Constructs a new Net::Lorcon object. device is the name of the device to use for packet injection. driver is the driver to use (one of the names returned from getcardlist)

getcapabilities()

Returns the capabilites of this device. This is an integer with the TX80211_CAP_* constants below ORed together.

open()

Opens the device ready for transmitting packets

close()

Closes the device. (Automatically called when object is destroyed).

setmode(mode)

Sets the mode of the device. Expects constants from <linux/wireless.h> (IW_MODE_MONITOR, etc).

getmode()

Returns an integer representing the current mode.

setfunctionalmode(func_mode)

(Not implemented in the version of Lorcon I have)

setchannel(channel)

Sets the channel to trasmit on.

getchan

Returns the channel the wireless card is currently on.

txpacket(packet)

Transmits the given packet. The expected input is a full 802.11 packet.

EXPORT

None by default.

Exportable constants

INJ_* are the various injection methods supported by Lorcon. TX80211_CAP_* are returned by getcapabilites.

  INJ_AIRJACK
  INJ_HOSTAP
  INJ_MADWIFING
  INJ_MADWIFIOLD
  INJ_MAX
  INJ_NODRIVER
  INJ_PRISM54
  INJ_RT2500
  INJ_RT2570
  INJ_RTL8180
  INJ_WLANNG
  MAX_IFNAME_LEN
  TX80211_CAP_BSSTIME
  TX80211_CAP_CTRL
  TX80211_CAP_DSSSTX
  TX80211_CAP_DURID
  TX80211_CAP_FRAG
  TX80211_CAP_MIMOTX
  TX80211_CAP_NONE
  TX80211_CAP_OFDMTX
  TX80211_CAP_SELFACK
  TX80211_CAP_SEQ
  TX80211_CAP_SETRATE
  TX80211_CAP_SNIFF
  TX80211_CAP_SNIFFACK
  TX80211_CAP_TRANSMIT
  TX80211_CAP_TXNOWAIT
  TX80211_STATUS_MAX
  TX80211_ENOERR
  TX80211_ENOSUCHINJ
  TX80211_ENOHANDLER
  IW_MODE_AUTO
  IW_MODE_ADHOC
  IW_MODE_INFRA
  IW_MODE_MASTER
  IW_MODE_REPEAT
  IW_MODE_SECOND
  IW_MODE_MONITOR

SEE ALSO ^

lorcon(7), 802.11 Wireless Networks by Matthew Gast.

AUTHOR ^

David Leadbeater, <dgl at dgl dot cx>

COPYRIGHT AND LICENSE ^

Copyright (C) 2007 by David Leadbeater

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: