FW: Raw Sockets

Dave Hinkle hinkle
Thu May 8 13:46:53 PDT 2003


Ok, I've written a little program to simplify as much as possible the code
that doesn't work.  The example program opens up a raw socket and sends an
Ethernet packet (type 1535) every second.

I ran the program on my linux box as so: (eth0 is a realtek card)

rawsocket eth0

And on another machine I go:

tcpdump -i eth0 ether proto 1535

I will see one packet per second.
I then run the program as so: (eth2 is an aironet wireless card associated
to a cisco bridge)

rawsocket eth2

And on the other machine I will see 1 packet per second.  If I pull out the
aironet card, and slide in the prismII card, configure it to Managed mode
and to the proper essid and then go:

rawsocket wlan0

I see nothing on the other computer as far as my packets go.  If I run the
tcpdump on the machine with the prism card in it, I can see the packets as
they're going "out", they just never show up on the subnet from the point of
view of the other computers.


I'm hoping that someone better with kernel code than me can fix this
problem, I cannot find one single reference on writing linux Ethernet
drivers.
	
	David

Btw, I'm using release 0.0.2, and a "Long Range Wireless LAN PC Card" from
"Wireless LAN Simple Mobility" pcmcia card.   I've also tried and failed
with agera mini pci cards.


-----Original Message-----
From: Michael Smith [mailto:msmith at cbnco.com] 
Sent: Thursday, May 08, 2003 12:08 PM
To: Dave Hinkle
Cc: hostap at shmoo.com
Subject: Re: Raw Sockets

On Thu, 8 May 2003, Dave Hinkle wrote:

> My first question is, does anybody know off hand why this doesn't work?
Do
> I need to encapsulate my Ethernet packet inside some sort of 802.11 packet
> for this driver?  If nobody knows off hand why it doesn't work I'll write
up
> a simplified piece of example code that fails on hostap cards.

Hi Dave,

I've used raw sockets to test bandwidth with HostAP. Back then I
was using the 2002-05-12 release I think, and DWL-520's and NL-2511 Senao
cards.

There is nothing special to the encapsulation - just send plain Ethernet
frames, i.e. it should work over a wired network too.

Mike

-------------- next part --------------
A non-text attachment was scrubbed...
Name: rawsocket.c
Type: application/octet-stream
Size: 2433 bytes
Desc: not available
Url : http://lists.shmoo.com/pipermail/hostap/attachments/20030508/e94968b8/attachment.obj 



More information about the Hostap mailing list