Sample parser for radiotap header
Hi,
I'm trying to update the radiotap support for the click modular router. Where is the best place to look for a C implementation of a radiotap parser?
R.
Signature · 31 lines
-------------------------------------------------------- Roberto Riggio, Ph.D. CREATE-NET Network& Security Solutions for Pervasive Computing Systems (iNSPIRE) Senior Researcher Via alla Cascata 56/D - 38123 Povo Trento (Italy) e-mail: roberto.riggio-2TmCWn7/[email protected] Tel: (+39) 0461 408400 - interno/extension 708 Fax: (+39) 0461 421157 www.create-net.org/~rriggio -------------------------------------------------------- The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited according to the Italian Law 196/2003 of the Legislature. If you received this in error, please contact the sender and delete the material from any computer. Le informazioni contenute in questo messaggio di posta elettronica e nei file allegati sono da considerarsi strettamente riservate. Il loro utilizzo e' consentito esclusivamente al destinatario del messaggio, per le finalita' indicate nel messaggio stesso. Qualora riceveste questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla cancellazione del messaggio stesso dal Vostro sistema. Trattenere il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalita' diverse, costituisce comportamento contrario ai principi dettati dal D. Lgs. 196/2003.
A message that is not in the archive (sent off-list or not yet received): 4D64CDBF.8010100-2TmCWn7/[email protected]
Quoted 5 lines · Roberto Riggio
Hi,
I'm trying to update the radiotap support for the click modular router. Where is the best place to look for a C implementation of a radiotap parser?
There's a library linked on the website.
johannes
On Feb 23, 2011, at 01:05 AM, Roberto Riggio <roberto.riggio-2TmCWn7/[email protected]> wrote:
Hi,
I'm trying to update the radiotap support for the click modular router. Where is the best place to look for a C implementation of a radiotap parser?
R.
The radiotap.org site has a section for Parser Libraries where it lists:
http://git.sipsolutions.net/radiotap.git/
-Bill
A message that is not in the archive (sent off-list or not yet received): 408dc500-c062-ede0-c040-d21a120a386c-BUHhN+a2lJ4@public.gmane.org
Il 24/02/2011 07:16, Bill Stafford ha scritto:
Quoted 3 lines
The radiotap.org site has a section for Parser Libraries where it lists:
http://git.sipsolutions.net/radiotap.git/
Is this supposed to know about extended present bitmask? I'm creating a packet with four chained present bitmask in order to specify a MRR chain.
The problem is that when I'm trying to parse the header with the lib only the first "block" is parsed. In fact when I use the function:
ieee80211_radiotap_iterator_next
I get ENOENT as return code when the bit 31 is reached. Same result i I try to pass this packet to the linux kernel where the iterator implementation is the same.
Quoted 3 lines
-Bill
Signature · 31 lines
-------------------------------------------------------- Roberto Riggio, Ph.D. CREATE-NET Network& Security Solutions for Pervasive Computing Systems (iNSPIRE) Senior Researcher Via alla Cascata 56/D - 38123 Povo Trento (Italy) e-mail: roberto.riggio-2TmCWn7/[email protected] Tel: (+39) 0461 408400 - interno/extension 708 Fax: (+39) 0461 421157 www.create-net.org/~rriggio -------------------------------------------------------- The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited according to the Italian Law 196/2003 of the Legislature. If you received this in error, please contact the sender and delete the material from any computer. Le informazioni contenute in questo messaggio di posta elettronica e nei file allegati sono da considerarsi strettamente riservate. Il loro utilizzo e' consentito esclusivamente al destinatario del messaggio, per le finalita' indicate nel messaggio stesso. Qualora riceveste questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla cancellazione del messaggio stesso dal Vostro sistema. Trattenere il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalita' diverse, costituisce comportamento contrario ai principi dettati dal D. Lgs. 196/2003.
A message that is not in the archive (sent off-list or not yet received): 4D67F6A1.6060301-2TmCWn7/[email protected]
Quoted 4 lines · Roberto Riggio
Is this supposed to know about extended present bitmask? I'm creating a packet with four chained present bitmask in order to specify a MRR chain.
Quoted 8 lines
The problem is that when I'm trying to parse the header with the lib only the first "block" is parsed. In fact when I use the function:
ieee80211_radiotap_iterator_nextI get ENOENT as return code when the bit 31 is reached. Same result i I try to pass this packet to the linux kernel where the iterator implementation is the same.
You must be doing something wrong then, it is definitely parsing such radiotap headers, hopefully correctly. There are examples in the check/ directory for it, e.g. 00.bin:
00000000 00 00 20 00 01 00 00 a0 01 00 00 00 00 00 00 00 00000010 11 22 33 44 55 66 77 88 aa bb cc dd ee ff 00 11
is a radiotap header with two TSFT fields. I think you most likely forgot to reset the namespace.
johannes
A message that is not in the archive (sent off-list or not yet received): 1299054063.4076.2.camel-8upI4CBIZJIJvtFkdXX2HixXY32XiHfO@public.gmane.org
Il 02/03/2011 09:21, Johannes Berg ha scritto:
Quoted 8 lines
You must be doing something wrong then, it is definitely parsing such radiotap headers, hopefully correctly. There are examples in the check/ directory for it, e.g. 00.bin:
00000000 00 00 20 00 01 00 00 a0 01 00 00 00 00 00 00 00 00000010 11 22 33 44 55 66 77 88 aa bb cc dd ee ff 00 11is a radiotap header with two TSFT fields. I think you most likely forgot to reset the namespace.
Could you elaborate on this? What I'm doing is basically the following:
int ret = ieee80211_radiotap_iterator_init(&iterator, rthdr, skb->len, NULL);
the in the while loop i use:
ret = ieee80211_radiotap_iterator_next(&iterator);
and check the value of: iterator.this_arg_index
What do you mean by resetting the namespace?
Quoted 1 line
johannes
Signature · 31 lines
-------------------------------------------------------- Roberto Riggio, Ph.D. CREATE-NET Network& Security Solutions for Pervasive Computing Systems (iNSPIRE) Senior Researcher Via alla Cascata 56/D - 38123 Povo Trento (Italy) e-mail: roberto.riggio-2TmCWn7/[email protected] Tel: (+39) 0461 408400 - interno/extension 708 Fax: (+39) 0461 421157 www.create-net.org/~rriggio -------------------------------------------------------- The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited according to the Italian Law 196/2003 of the Legislature. If you received this in error, please contact the sender and delete the material from any computer. Le informazioni contenute in questo messaggio di posta elettronica e nei file allegati sono da considerarsi strettamente riservate. Il loro utilizzo e' consentito esclusivamente al destinatario del messaggio, per le finalita' indicate nel messaggio stesso. Qualora riceveste questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla cancellazione del messaggio stesso dal Vostro sistema. Trattenere il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalita' diverse, costituisce comportamento contrario ai principi dettati dal D. Lgs. 196/2003.
A message that is not in the archive (sent off-list or not yet received): 4D6E0306.1020307-2TmCWn7/[email protected]
Quoted 11 lines · Roberto Riggio
Il 02/03/2011 09:21, Johannes Berg ha scritto:
Quoted 8 lines
You must be doing something wrong then, it is definitely parsing such radiotap headers, hopefully correctly. There are examples in the check/ directory for it, e.g. 00.bin:
00000000 00 00 20 00 01 00 00 a0 01 00 00 00 00 00 00 00 00000010 11 22 33 44 55 66 77 88 aa bb cc dd ee ff 00 11is a radiotap header with two TSFT fields. I think you most likely forgot to reset the namespace.
Could you elaborate on this? What I'm doing is basically the following:
I think your radiotap header is malformed. Paste a hexdump and we can help.
johannes
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): 4D6E050E.3030807-2TmCWn7/[email protected]
Quoted 4 lines · Roberto Riggio
Il 02/03/2011 09:45, Johannes Berg ha scritto:
Quoted 2 lines
I think your radiotap header is malformed. Paste a hexdump and we can help.
00002000 04040380 04000280 04000280 04000200
243c000c00000000 00000000
Like I said, it's malformed. Cf.
http://radiotap.org/defined-fields/Radiotap%20Namespace
johannes
A message that is not in the archive (sent off-list or not yet received): 1299056027.4076.7.camel-8upI4CBIZJIJvtFkdXX2HixXY32XiHfO@public.gmane.org
Il 02/03/2011 09:53, Johannes Berg ha scritto:
Quoted 2 lines
Like I said, it's malformed. Cf.
http://radiotap.org/defined-fields/Radiotap%20Namespace
So, every time I set bit 31 I must also set bit 29. What is a situation where i should use bit 31 alone?
Quoted 2 lines
johannes
Signature · 31 lines
-------------------------------------------------------- Roberto Riggio, Ph.D. CREATE-NET Network& Security Solutions for Pervasive Computing Systems (iNSPIRE) Senior Researcher Via alla Cascata 56/D - 38123 Povo Trento (Italy) e-mail: roberto.riggio-2TmCWn7/[email protected] Tel: (+39) 0461 408400 - interno/extension 708 Fax: (+39) 0461 421157 www.create-net.org/~rriggio -------------------------------------------------------- The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited according to the Italian Law 196/2003 of the Legislature. If you received this in error, please contact the sender and delete the material from any computer. Le informazioni contenute in questo messaggio di posta elettronica e nei file allegati sono da considerarsi strettamente riservate. Il loro utilizzo e' consentito esclusivamente al destinatario del messaggio, per le finalita' indicate nel messaggio stesso. Qualora riceveste questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla cancellazione del messaggio stesso dal Vostro sistema. Trattenere il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalita' diverse, costituisce comportamento contrario ai principi dettati dal D. Lgs. 196/2003.
A message that is not in the archive (sent off-list or not yet received): 4D6E0758.3050809-2TmCWn7/[email protected]
Quoted 5 lines · Roberto Riggio
Il 02/03/2011 09:53, Johannes Berg ha scritto:
Quoted 2 lines
Like I said, it's malformed. Cf.
http://radiotap.org/defined-fields/Radiotap%20NamespaceSo, every time I set bit 31 I must also set bit 29.
No.
Quoted 2 lines
What is a situation
where i should use bit 31 alone?
It's explained on the frontpage of radiotap.org.
johannes