Hi,
First of all, I am not to sure if this is where i am suppose to post
this kind of question. I am currently trying to convert a wireless
application, that runs a wireless card using the linux-wlan-ng drivers.
My goal is to make this application run with the newest hostAP drivers,
but I am having trouble accomplishing this task. Here is the code that
currently runs with the linux-wlan-ng drivers..
//Original code //
//--------------------------------------------------------------------
#define LINUX_WLAN_NG 0x89f1 /*used by linux-wlan */
#define LENGTH 16 /* Max length of a device name */
request_t req; /* The formal request to the ioctl
//Fill in the request
req.len = MSGSIZE;
req.data = msg;
req.result = 0;
req.magic = MAGIC;
strncpy(req.name, name, LENGTH);
//Open the socket to the prism2 card
s = socket(AF_INET, SOCK_STREAM, 0);
if(-1 == s)
{
perror("Could not open socket");
ret = ERR;
}
//Perform the ioctl call
if(0 == ret)
{
if(ioctl(s, LINUX_WLAN_NG , &req) == -1)
{
perror("Bad ioctl request");
ret = ERR;
}
}
return ret;
}
Now my problem is I am really not to sure how I would go about
modifying this code so that it does the same (communicate), using the
hostAP drivers. Here is what I have so far..
/*----------------------------------------------------------------------------------------------*/
struct iwreq iwr;
memset(&iwr, 0, sizeof(iwr));
strncpy(iwr.ifr_name, name, LENGTH);
iwr.u.data.pointer = msg;
iwr.u.data.length = MSGSIZE;
s = socket(AF_INET, SOCK_STREAM, 0);
if(-1 == s)
{
perror("Could not open socket");
ret = ERR;
}
if(0 == ret)
{
if (ioctl(s, /*NOT SURE WHAT HEX GOES HERE*/, &iwr) ==
-1)
{
perror("Bad ioctl request");
ret = ERR;
}
}
return ret;
}
This code compiles correctly, when I actually place a hex value in for
the second aurgument of my ioctl call, but doesn't seem to communicate
with the hostAP drivers correctly. I think my second aurgument in the
ioctl call is incorrect.
Any help will be appreciated, I have been working on this problem for
some time now, and I am looking for some ideas/help.
Thank You,
Tom 2 1164 to*******@gmail.com wrote:
Hi,
First of all, I am not to sure if this is where i am suppose to post
this kind of question. I am currently trying to convert a wireless
application, that runs a wireless card using the linux-wlan-ng drivers.
My goal is to make this application run with the newest hostAP drivers,
but I am having trouble accomplishing this task. Here is the code that
currently runs with the linux-wlan-ng drivers..
<snip>
This newsgroup only deals with the standard C langauge. Your question
appears to be intimately connected to the Linux kernel. Please try
asking in one of the many Linux groups on Usenet as well as other
mailing lists. to*******@gmail.com wrote:
>
First of all, I am not to sure if this is where i am suppose to
post this kind of question. I am currently trying to convert a
wireless application, that runs a wireless card using the
linux-wlan-ng drivers. My goal is to make this application run
with the newest hostAP drivers, but I am having trouble
accomplishing this task. Here is the code that currently runs
with the linux-wlan-ng drivers..
Not here, unless you can show us where the ISO C standard deals
with 'wireless', 'linuis-wlan-ng drivers', 'hostAP drivers', etc.
This newsgroup deals with the standard C language. For system
specific things go to newsgroups dealing with such a system.
--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Martin |
last post by:
When was inheritance intruduced into object oriented programming?
More generally, does anyone know or have any sources on when the different
features were introduced into object oriented...
|
by: G. |
last post by:
Hi all,
During my degree, BEng (Hons) Electronics and Communications Engineering, we
did C programming every year, but I never kept it up, as I had no interest
and didn't see the point. But now...
|
by: user |
last post by:
Hi all,
At the outset, I regret having to post this slightly OT post here.
However, I strongly feel that people in this group would be the best to
advise me on my predicament.
I am working as...
|
by: evolnet.regular |
last post by:
I've been utilising C for lots of small and a few medium-sized personal
projects over the course of the past decade, and I've realised lately
just how little progress it's made since then. I've...
|
by: Kevin Spencer |
last post by:
Is it just me, or am I really observing a trend away from analysis and
probem-solving amongst programmers? Let me be more specific:
It seems that every day, in greater numbers, people are coming...
|
by: - |
last post by:
I kinda like programming (Java is the only language I know) but have not
been able to develop a complete software or get anywhere close to it.
The reason why I like it is because it gives me great...
|
by: Robert Seacord |
last post by:
The CERT/CC has just deployed a new web site dedicated to developing
secure coding standards for the C programming language, C++, and
eventually other programming language.
We have already...
|
by: Jakle |
last post by:
I have been googling, but can seem to find out about C GUI libraries.
My main platform is Windows, but it would be nice to find a cross platform
library.
I've been programming with php, which...
|
by: Enteng |
last post by:
Hi I'm thinking about learning C as my first programming language.
Would you recommend it?
Also how do you suggest that I learn it?What books/tutorials should I
read for someone like me?
Thanks...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |