Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Wireless network programming in Unix (question) Post 302447209 by aztroboy on Saturday 21st of August 2010 09:27:03 PM
Old 08-21-2010
Wireless network programming in Unix (question)

Greetings everyone,

I've been using OpenWRT for some time primarly 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? I've taken a look here and I can see that it's ok to use these structures:

Code:
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;
};

Has anyone done some wireless network programming/scripting?

I'm running OpenWRT on a WRT54G-TM, Broadcom BCM5352 chip, Linux 2.4.35.4.

thank you
 

10 More Discussions You Might Find Interesting

1. Linux

question about accepr() in network programming

I'm working on my homework to write a chatroom program. Different users can be on-line at the same and talk to each other. I found that each time I invoked the accept function. A new socket was created. I don't how can I receive message from the client who is already on-line and send it to others.... (0 Replies)
Discussion started by: niukun
0 Replies

2. UNIX for Dummies Questions & Answers

Unix Network Programming

I am going to purchase Unix Network Programming by Stevens. The only question I have is which edition to buy. The older (early 90's) edition, or the newer (late 90's) edition. I know conventional thinking would point to the latest ( and greatest?), but I wanted to get some feedback from the forum.... (3 Replies)
Discussion started by: dangral
3 Replies

3. Programming

Network Programming in Unix

Good day everyone, Please help if you are interested in. I need to do a chat client-server program. Does anyone know where I can get references or sample programs? Thank you very much for your time Eric (2 Replies)
Discussion started by: powermind
2 Replies

4. UNIX for Dummies Questions & Answers

Unix and Linux Network Programming

I want to develop a hybrid IM application which will consist of a chat and an offline messaging (BBS) part. Server must support Multiple connection (concurrent) Arguments should not be hard coded (code will be checked at different machines) No input at the command line Must run in the... (3 Replies)
Discussion started by: never mind
3 Replies

5. Programming

Unix network programming

Hi! I am working on fedora.. trying to execute BSD4.4 client-server program which includes "unp.h" header file... While executing make command, I got error like, " expected " , " , " ; ",or ")" in connect_nonb file...ERROR 1 " I tried to change mode of makefile but I can't get... (4 Replies)
Discussion started by: nisha_vaghela
4 Replies

6. Programming

Unix Network Programming

I have written a client-server program which does some data from a file in server to the client. In this I don't want the client to wait indefinitely if server is not running. For this I am using SELECT system call, in this system call we can specify timings as an argument, which tells the client... (2 Replies)
Discussion started by: naresh046
2 Replies

7. UNIX for Dummies Questions & Answers

How does unix system administration, unix programming, unix network programming differ?

How does unix system administration, unix programming, unix network programming differ? Please help. (0 Replies)
Discussion started by: thulasidharan2k
0 Replies

8. IP Networking

Network programming on UNIX env on windows

Hi, I have to start doing network programming in C/Unix but I have windows installed. Could someone please guide me how to set up the environment best suited for the networking programming? Regards Vinayak (1 Reply)
Discussion started by: vinayakj20
1 Replies

9. Programming

UNIX Network Programming making files problem

I have started reading the book Unix Network Programming, Volume 1: The Sockets Networking API. I downloaded all the source code and the readme says I must make the files. zuro@zuro:~/book/unpv12e$ cd lib zuro@zuro:~/book/unpv12e/lib$ make gcc -g -O2 -D_REENTRANT -Wall -c -o... (5 Replies)
Discussion started by: xuro
5 Replies

10. Programming

UNIX network programming execution problem

I have started reading the book Unix Network Programming, Volume 1: The Sockets Networking API. I downloaded all the source code and performed all the steps present in README file.Now when i compile my first program it give the following error. sainandan@nandan:~/unpv13e/intro$ ./daytimetcpcli... (1 Reply)
Discussion started by: bsainandan
1 Replies
socket_send6(3) 					     Library Functions Manual						   socket_send6(3)

NAME
socket_send6 - send a UDP datagram SYNTAX
#include <socket.h> ssize_t socket_send6(int s, const char* buf, size_t len, const char ip[16], uint16 port, uint32 scope_id); DESCRIPTION
socket_send6 sends len bytes starting at buf in a UDP datagram over the socket s to UDP port port on IP address ip. You can call socket_send6 without calling socket_bind6. This has the effect as first calling socket_bind6 with IP address :: and port 0. The meaning of scope_id is dependent on the implementation and IPv6 IP. On link-local IPv6 addresses it specifies the outgoing interface index. The name (e.g. "eth0") for a given interface index can be queried with getifname. scope_id should normally be set to 0. RETURN VALUE
socket_send6 returns 0 if the datagram was sent successfully. If not, it returns -1 and sets errno appropriately. EXAMPLE
#include <socket.h> int s; char ip[16]; uint16 p; uint32 scope_id; s = socket_tcp4(); socket_bind6(s,ip,p); socket_send6(s,"hello, world",12,ip,p,scope_id); SEE ALSO
socket_send4(3), socket_getifidx(3) socket_send6(3)
All times are GMT -4. The time now is 03:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy