* python nl80211 code
@ 2009-12-01 8:53 Kalle Valo
2009-12-01 9:23 ` Johannes Berg
0 siblings, 1 reply; 7+ messages in thread
From: Kalle Valo @ 2009-12-01 8:53 UTC (permalink / raw)
To: linux-wireless
Hello,
I want to run some tests through nl80211 and, as usual, I prefer to
use python for that. Are there any scripts/examples using nl80211 with
python available? Preferably with an open enough license.
--
Kalle Valo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: python nl80211 code
2009-12-01 8:53 python nl80211 code Kalle Valo
@ 2009-12-01 9:23 ` Johannes Berg
2009-12-01 10:31 ` Kalle Valo
0 siblings, 1 reply; 7+ messages in thread
From: Johannes Berg @ 2009-12-01 9:23 UTC (permalink / raw)
To: Kalle Valo; +Cc: linux-wireless
[-- Attachment #1: Type: text/plain, Size: 492 bytes --]
On Tue, 2009-12-01 at 10:53 +0200, Kalle Valo wrote:
> Hello,
>
> I want to run some tests through nl80211 and, as usual, I prefer to
> use python for that. Are there any scripts/examples using nl80211 with
> python available? Preferably with an open enough license.
http://git.sipsolutions.net/pynl80211.git/
Doesn't have much of a license but was intended to be GPLv2, but there
was only one commit from somebody other than me who'd probably relicense
if needed.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: python nl80211 code
2009-12-01 9:23 ` Johannes Berg
@ 2009-12-01 10:31 ` Kalle Valo
2009-12-01 11:24 ` Johannes Berg
0 siblings, 1 reply; 7+ messages in thread
From: Kalle Valo @ 2009-12-01 10:31 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
Johannes Berg <johannes@sipsolutions.net> writes:
> On Tue, 2009-12-01 at 10:53 +0200, Kalle Valo wrote:
>> Hello,
>>
>> I want to run some tests through nl80211 and, as usual, I prefer to
>> use python for that. Are there any scripts/examples using nl80211 with
>> python available? Preferably with an open enough license.
>
> http://git.sipsolutions.net/pynl80211.git/
Thanks. This looks interesting but doesn't compile right now:
$ make
Checking netlink numbers:
check.r5cOZHc/check.c: In function 'main':
check.r5cOZHc/check.c:63: error: lvalue required as left operand of
assignment
check.r5cOZHc/check.c:78: error: 'NL80211_CHAN_MAX' undeclared (first
use in this function)
check.r5cOZHc/check.c:78: error: (Each undeclared identifier is
reported only once
check.r5cOZHc/check.c:78: error: for each function it appears in.)
check.r5cOZHc/check.c:80: error: lvalue required as left operand of
assignment
check.r5cOZHc/check.c:86: error: 'NL80211_RATE_MAX' undeclared (first
use in this function)
[...]
The parsing of nl80211 seems to fail. If I find some time, I try to
look at it.
> Doesn't have much of a license but was intended to be GPLv2, but there
> was only one commit from somebody other than me who'd probably relicense
> if needed.
That's good enough :)
--
Kalle Valo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: python nl80211 code
2009-12-01 10:31 ` Kalle Valo
@ 2009-12-01 11:24 ` Johannes Berg
2009-12-01 11:47 ` Kalle Valo
0 siblings, 1 reply; 7+ messages in thread
From: Johannes Berg @ 2009-12-01 11:24 UTC (permalink / raw)
To: Kalle Valo; +Cc: linux-wireless
[-- Attachment #1: Type: text/plain, Size: 1017 bytes --]
On Tue, 2009-12-01 at 12:31 +0200, Kalle Valo wrote:
> Thanks. This looks interesting but doesn't compile right now:
>
> $ make
> Checking netlink numbers:
> check.r5cOZHc/check.c: In function 'main':
> check.r5cOZHc/check.c:63: error: lvalue required as left operand of
> assignment
> check.r5cOZHc/check.c:78: error: 'NL80211_CHAN_MAX' undeclared (first
> use in this function)
> check.r5cOZHc/check.c:78: error: (Each undeclared identifier is
> reported only once
> check.r5cOZHc/check.c:78: error: for each function it appears in.)
> check.r5cOZHc/check.c:80: error: lvalue required as left operand of
> assignment
> check.r5cOZHc/check.c:86: error: 'NL80211_RATE_MAX' undeclared (first
> use in this function)
> [...]
>
> The parsing of nl80211 seems to fail. If I find some time, I try to
> look at it.
Oh, that's not surprising, it's over two years old and after I started
writing the C tool (iw) I never maintained the comments in nl80211.h
that this tried to parse.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: python nl80211 code
2009-12-01 11:24 ` Johannes Berg
@ 2009-12-01 11:47 ` Kalle Valo
2009-12-01 11:50 ` Johannes Berg
0 siblings, 1 reply; 7+ messages in thread
From: Kalle Valo @ 2009-12-01 11:47 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
Johannes Berg <johannes@sipsolutions.net> writes:
>> The parsing of nl80211 seems to fail. If I find some time, I try to
>> look at it.
>
> Oh, that's not surprising, it's over two years old and after I started
> writing the C tool (iw) I never maintained the comments in nl80211.h
> that this tried to parse.
Ok, good to know. What do you think if I remove the parsing of
nl80211.h and instead add the nl80211 commands manually as python
code? Sure, it's monkey code but easier to maintain IMHO.
Or have some intermediate language, maybe. Any ideas?
--
Kalle Valo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: python nl80211 code
2009-12-01 11:47 ` Kalle Valo
@ 2009-12-01 11:50 ` Johannes Berg
2009-12-01 11:52 ` Kalle Valo
0 siblings, 1 reply; 7+ messages in thread
From: Johannes Berg @ 2009-12-01 11:50 UTC (permalink / raw)
To: Kalle Valo; +Cc: linux-wireless
[-- Attachment #1: Type: text/plain, Size: 789 bytes --]
On Tue, 2009-12-01 at 13:47 +0200, Kalle Valo wrote:
> Johannes Berg <johannes@sipsolutions.net> writes:
>
> >> The parsing of nl80211 seems to fail. If I find some time, I try to
> >> look at it.
> >
> > Oh, that's not surprising, it's over two years old and after I started
> > writing the C tool (iw) I never maintained the comments in nl80211.h
> > that this tried to parse.
>
> Ok, good to know. What do you think if I remove the parsing of
> nl80211.h and instead add the nl80211 commands manually as python
> code? Sure, it's monkey code but easier to maintain IMHO.
Yeah, I agree.
> Or have some intermediate language, maybe. Any ideas?
I guess we could use sparse to output introspection information for
nl80211.h instead, but is it worth it?
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: python nl80211 code
2009-12-01 11:50 ` Johannes Berg
@ 2009-12-01 11:52 ` Kalle Valo
0 siblings, 0 replies; 7+ messages in thread
From: Kalle Valo @ 2009-12-01 11:52 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
Johannes Berg <johannes@sipsolutions.net> writes:
>> Ok, good to know. What do you think if I remove the parsing of
>> nl80211.h and instead add the nl80211 commands manually as python
>> code? Sure, it's monkey code but easier to maintain IMHO.
>
> Yeah, I agree.
Good. I'll do that then.
>> Or have some intermediate language, maybe. Any ideas?
>
> I guess we could use sparse to output introspection information for
> nl80211.h instead, but is it worth it?
Increases coolness factory but that's about it =)
--
Kalle Valo
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-12-01 11:52 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-01 8:53 python nl80211 code Kalle Valo
2009-12-01 9:23 ` Johannes Berg
2009-12-01 10:31 ` Kalle Valo
2009-12-01 11:24 ` Johannes Berg
2009-12-01 11:47 ` Kalle Valo
2009-12-01 11:50 ` Johannes Berg
2009-12-01 11:52 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox