radiotap feature discovery
Hi!
With all these injection things, we'll invariably find devices that do not support some of them, e.g. will not support not setting the sequence number because the hardware always assigns them.
Thus, I think we need a way to do feature discovery. This isn't relevant for RX -- there the driver just provides what it has -- but is for TX where tools would like to know what they can do.
One way I could think of would be to define a whole bunch of flags for the various injection features, and export those somehow. Not sure I like this, since it means we need to keep track of yet another bitmap.
The other way I could imagine would be to export, in a yet to be defined way, a radiotap header that lists the capabilities. For example, upon feature query you'd return a header like this:
0x00, 0x00, // <-- radiotap version 0x0b, 0x00, // <- radiotap header length 0x04, 0x84, 0x00, 0x00, // <-- bitmap 0x00, // <-- rate 0x00, // <-- tx power 0x08, 0x00 // <-- tx flags
This would indicate support for controlling
* rate
* tx power
* tx flags - only no-ACK
How to export this information is to be determined and would most likely be platform dependent though.
Thoughts?
johannes
A message that is not in the archive (sent off-list or not yet received): 1239897757.14169.16.camel-YfaajirXv2244ywRPIzf9A@public.gmane.org
Quoted 10 lines · Johannes Berg
The other way I could imagine would be to export, in a yet to be defined way, a radiotap header that lists the capabilities. For example, upon feature query you'd return a header like this:
0x00, 0x00, // <-- radiotap version 0x0b, 0x00, // <- radiotap header length 0x04, 0x84, 0x00, 0x00, // <-- bitmap 0x00, // <-- rate 0x00, // <-- tx power 0x08, 0x00 // <-- tx flags
Oops, that header length was broken, should be 0x0c, 0x00
johannes
Quoted 25 lines · Johannes Berg
Hi!
With all these injection things, we'll invariably find devices that do not support some of them, e.g. will not support not setting the sequence number because the hardware always assigns them.
Thus, I think we need a way to do feature discovery. This isn't relevant for RX -- there the driver just provides what it has -- but is for TX where tools would like to know what they can do.
One way I could think of would be to define a whole bunch of flags for the various injection features, and export those somehow. Not sure I like this, since it means we need to keep track of yet another bitmap.
The other way I could imagine would be to export, in a yet to be defined way, a radiotap header that lists the capabilities. For example, upon feature query you'd return a header like this:
0x00, 0x00, // <-- radiotap version 0x0b, 0x00, // <- radiotap header length 0x04, 0x84, 0x00, 0x00, // <-- bitmap 0x00, // <-- rate 0x00, // <-- tx power 0x08, 0x00 // <-- tx flags
Quoted 7 lines
This would indicate support for controlling
* rate
* tx power
* tx flags - only no-ACKHow to export this information is to be determined and would most likely be platform dependent though.
Some standardization may be possible. For example, Linux, *BSD, et cetera, may be able to share a getsockopt(2) interface for querying the capabilities on a socket. Platforms with BPF could share an ioctl(2) interface for the same.
Quoted 1 line
Thoughts?
Suppose that we let the OS pass back one or more "capability headers." Each capability header consists of two radiotap headers. The first header contains supported Tx parameters. The second header must be as long as the first, and it is a bitmap that tells which bits are variable
(0) and which are fixed (1). In your example, the first header
Quoted 6 lines
0x00, 0x00, // <-- radiotap version 0x0b, 0x00, // <- radiotap header length 0x04, 0x84, 0x00, 0x00, // <-- bitmap 0x00, // <-- rate 0x00, // <-- tx power 0x08, 0x00 // <-- tx flags
may be followed by the bitmap
Quoted 6 lines
0xff, 0xff, // <-- radiotap version 0xf0, 0xff, // <- radiotap header length 0xfb, 0x7b, 0xff, 0xff, // <-- bitmap 0x00, // <-- rate 0x00, // <-- tx power 0xf7, 0xff // <-- tx flags
meaning that only radiotap version 0 is supported, the header length is somewhat variable, only rate, tx power and flags may be set, and only the no-ACK Tx flag is allowed.
Dave
Signature · 2 lines
David Young OJC Technologies [email protected] Urbana, IL * (217) 278-3933
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 17 lines
Quoted 17 lines
The other way I could imagine would be to export, in a yet to be defined way, a radiotap header that lists the capabilities. For example, upon feature query you'd return a header like this:
0x00, 0x00, // <-- radiotap version 0x0b, 0x00, // <- radiotap header length 0x04, 0x84, 0x00, 0x00, // <-- bitmap 0x00, // <-- rate 0x00, // <-- tx power 0x08, 0x00 // <-- tx flagsThis would indicate support for controlling
* rate
* tx power
* tx flags - only no-ACK
Quoted 7 lines
Quoted 2 lines
How to export this information is to be determined and would most likely be platform dependent though.
Some standardization may be possible. For example, Linux, *BSD, et cetera, may be able to share a getsockopt(2) interface for querying the capabilities on a socket. Platforms with BPF could share an ioctl(2) interface for the same.
Indeed, that would be doable. Any suggestions?
Quoted 24 lines
Quoted 1 line
Thoughts?
Suppose that we let the OS pass back one or more "capability headers." Each capability header consists of two radiotap headers. The first header contains supported Tx parameters. The second header must be as long as the first, and it is a bitmap that tells which bits are variable
(0) and which are fixed (1). In your example, the first headerQuoted 6 lines
0x00, 0x00, // <-- radiotap version 0x0b, 0x00, // <- radiotap header length 0x04, 0x84, 0x00, 0x00, // <-- bitmap 0x00, // <-- rate 0x00, // <-- tx power 0x08, 0x00 // <-- tx flagsmay be followed by the bitmap
Quoted 6 lines
0xff, 0xff, // <-- radiotap version 0xf0, 0xff, // <- radiotap header length 0xfb, 0x7b, 0xff, 0xff, // <-- bitmap 0x00, // <-- rate 0x00, // <-- tx power 0xf7, 0xff // <-- tx flags
Quoted 3 lines
meaning that only radiotap version 0 is supported, the header length is somewhat variable, only rate, tx power and flags may be set, and only the no-ACK Tx flag is allowed.
Hmm. That seems useful on first sight, but is it really? It seems to be useful only for things like the tx flags.
Supporting multiple radiotap versions is still impossible, since the bits would have entirely different meanings, or even the format changed, otherwise we wouldn't have cycled the version number.
For the bitmap we already know - I don't think any reasonable implementation would _require_ some field to be present.
For rate/txpower there may be limits you cannot express with this, but must discover in some other way, or the implementation just clamps or something.
So that leaves tx flags only, and could there really be flags that are _required_ to be set or will be assumed to be set? I guess with the 'override default' thing I just asked for that might make sense...
johannes
A message that is not in the archive (sent off-list or not yet received): 1239903002.26575.17.camel-YfaajirXv2244ywRPIzf9A@public.gmane.org
Quoted 51 lines · Johannes Berg
Quoted 17 lines
Quoted 17 lines
The other way I could imagine would be to export, in a yet to be defined way, a radiotap header that lists the capabilities. For example, upon feature query you'd return a header like this:
0x00, 0x00, // <-- radiotap version 0x0b, 0x00, // <- radiotap header length 0x04, 0x84, 0x00, 0x00, // <-- bitmap 0x00, // <-- rate 0x00, // <-- tx power 0x08, 0x00 // <-- tx flagsThis would indicate support for controlling
* rate
* tx power
* tx flags - only no-ACKQuoted 7 lines
Quoted 2 lines
How to export this information is to be determined and would most likely be platform dependent though.
Some standardization may be possible. For example, Linux, *BSD, et cetera, may be able to share a getsockopt(2) interface for querying the capabilities on a socket. Platforms with BPF could share an ioctl(2) interface for the same.
Indeed, that would be doable. Any suggestions?
Quoted 24 lines
Quoted 1 line
Thoughts?
Suppose that we let the OS pass back one or more "capability headers." Each capability header consists of two radiotap headers. The first header contains supported Tx parameters. The second header must be as long as the first, and it is a bitmap that tells which bits are variable
(0) and which are fixed (1). In your example, the first headerQuoted 6 lines
0x00, 0x00, // <-- radiotap version 0x0b, 0x00, // <- radiotap header length 0x04, 0x84, 0x00, 0x00, // <-- bitmap 0x00, // <-- rate 0x00, // <-- tx power 0x08, 0x00 // <-- tx flagsmay be followed by the bitmap
Quoted 6 lines
0xff, 0xff, // <-- radiotap version 0xf0, 0xff, // <- radiotap header length 0xfb, 0x7b, 0xff, 0xff, // <-- bitmap 0x00, // <-- rate 0x00, // <-- tx power 0xf7, 0xff // <-- tx flags
Quoted 6 lines
Quoted 3 lines
meaning that only radiotap version 0 is supported, the header length is somewhat variable, only rate, tx power and flags may be set, and only the no-ACK Tx flag is allowed.
Hmm. That seems useful on first sight, but is it really? It seems to be useful only for things like the tx flags.
I think that the usefulness comes down to either the interpretation (bad) or the rigor of the specification.
Quoted 3 lines
Supporting multiple radiotap versions is still impossible, since the bits would have entirely different meanings, or even the format changed, otherwise we wouldn't have cycled the version number.
Sure.
Quoted 2 lines
For the bitmap we already know - I don't think any reasonable implementation would _require_ some field to be present.
Neither do I. I marked the bits in the presence bitmap as variable instead of fixed for that reason. Do you think it is too confusing for the fields to still be present in the bitmask?
Quoted 3 lines
For rate/txpower there may be limits you cannot express with this, but must discover in some other way, or the implementation just clamps or something.
You're right, there needs to be more to the capabilities spec than that. We may need to indicate either a range or an enumeration of allowable values.
We may also need to indicate that a particular Tx flags setting is only permitted at a particular Tx rate setting, or vice versa.
Dave
Signature · 2 lines
David Young OJC Technologies [email protected] Urbana, IL * (217) 278-3933