Wireless network programming in Unix (question)

Asked By 30 points N/A Posted on -
qa-featured

Hello Greetings,

I have been using OpenWRT for some time primarily for research, in the University. I've also started with some basic network programming (sending UDP packets for instance). But since most of the available tutorials on Unix network programming are more related to Ethernet programming, I'm not sure if using it, for wireless interfaces would be the same.

I would like to know if there's any difference between Ethernet and wireless raw socket programming.  I would also like to do some raw packets sniffing on a wireless interface "eth1".  What structures should I use, in order to read the prism headers, in monitor mode?

Has anyone done some wireless network programming/scripting?

Regards,

Alen Donald

SHARE
Answered By 0 points N/A #95198

Wireless network programming in Unix (question)

qa-featured

Ethernet programming means, opening a file descriptor and binding it to a socket, in order to establish a TCP connection, or send UDP connectionless datagrams, then whether the underlying datalink layer is ethernet or wireless makes no difference. This is  what  is commonly referred to as, socket programming.

You can use these structures:

struct prism_value
{
  uint32 did;
  uint16 status;
  uint16 len;
  uint32 data;
};

struct prism_header
{
  uint32 msgcode;
  uint32 msglen;
  u8char devname[16];
  struct prism_value hosttime;
  struct prism_value mactime;
  struct prism_value channel;
  struct prism_value rssi;
  struct prism_value sq;
  struct prism_value signal;
  struct prism_value noise;
  struct prism_value rate;
  struct prism_value istx;
  struct prism_value frmlen;
};

Related Questions