question about code

borgit borgit
Tue Apr 18 08:11:30 PDT 2006


I am referring to the HostAP driver code, specifically we are working with
version 0.3.7.  What we want to do is to send a couple of integers in the
payload of a broadcast packet that we have created.  And to do this we need
to convert them to a string, because as far as I understand we can only send
strings.  Thanks for your idea of using the simple_strto* family of
functions, and I totally forgot about the sprintf function for int to string
conversion, it should work good.

Thanks again.

-----Original Message-----
From: hostap-bounces+borgit=hotmail.com at shmoo.com
[mailto:hostap-bounces+borgit=hotmail.com at shmoo.com] On Behalf Of Jouni
Malinen
Sent: Monday, April 17, 2006 10:59 PM
To: hostap at shmoo.com
Subject: Re: question about code

On Mon, Apr 17, 2006 at 02:45:26PM -0400, borgit wrote:

> We are trying to make some modifications to the hostAP code where we want
to
> use the functions atoi() and itoa() to perform integer to string
conversion
> (and vice-versa).  The problem is that we can't seem to include the
stdlib.h
> library (that contains these functions) in the code.  Attempts to do so
> yield errors during compilation that say that the library is not found in
> the specific path, or if we copy the library to the asm directory, then
the
> library is included, but there are compile errors that are found inside
the
> library.

What exactly are you referring to with "hostAP"? Host AP driver, i.e.,
kernel code? Standard C libraries are not generally available in
kernel.. What kind of integer/string conversion do you need in the
kernel? In many cases, I would expect there to be a better way of doing
this and the conversion could be avoided completely.

linux/kernel.h has prototypes for number of related functions
(simple_strto* family for string->int and sprintf for int->string).

-- 
Jouni Malinen                                            PGP id EFC895FA
_______________________________________________
HostAP mailing list
HostAP at shmoo.com
http://lists.shmoo.com/mailman/listinfo/hostap




More information about the Hostap mailing list