question about code

borgit borgit at
Tue Apr 18 11:11:30 EDT 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: at
[ at] On Behalf Of Jouni
Sent: Monday, April 17, 2006 10:59 PM
To: hostap at
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
> use the functions atoi() and itoa() to perform integer to string
> (and vice-versa).  The problem is that we can't seem to include the
> 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
> library is included, but there are compile errors that are found inside
> 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

More information about the HostAP mailing list