| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | .\" $NetBSD: ieee80211_radiotap.9,v 1.12 2010/04/05 19:34:28 joerg Exp $ | | 1 | .\" $NetBSD: ieee80211_radiotap.9,v 1.13 2013/03/06 22:19:03 wiz Exp $ |
2 | .\" | | 2 | .\" |
3 | .\" Copyright (c) 2004 Bruce M. Simpson <bms@spc.org>, | | 3 | .\" Copyright (c) 2004 Bruce M. Simpson <bms@spc.org>, |
4 | .\" Darron Broad <darron@kewl.org>. | | 4 | .\" Darron Broad <darron@kewl.org>. |
5 | .\" Copyright (c) 2004, 2007 David Young <dyoung@pobox.com>. | | 5 | .\" Copyright (c) 2004, 2007 David Young <dyoung@pobox.com>. |
6 | .\" All rights reserved. | | 6 | .\" All rights reserved. |
7 | .\" | | 7 | .\" |
8 | .\" Redistribution and use in source and binary forms, with or without | | 8 | .\" Redistribution and use in source and binary forms, with or without |
9 | .\" modification, are permitted provided that the following conditions | | 9 | .\" modification, are permitted provided that the following conditions |
10 | .\" are met: | | 10 | .\" are met: |
11 | .\" 1. Redistributions of source code must retain the above copyright | | 11 | .\" 1. Redistributions of source code must retain the above copyright |
12 | .\" notice, this list of conditions and the following disclaimer. | | 12 | .\" notice, this list of conditions and the following disclaimer. |
13 | .\" 2. Redistributions in binary form must reproduce the above copyright | | 13 | .\" 2. Redistributions in binary form must reproduce the above copyright |
14 | .\" notice, this list of conditions and the following disclaimer in the | | 14 | .\" notice, this list of conditions and the following disclaimer in the |
| @@ -81,28 +81,28 @@ struct ieee80211_radiotap_header { | | | @@ -81,28 +81,28 @@ struct ieee80211_radiotap_header { |
81 | u_int8_t it_pad; | | 81 | u_int8_t it_pad; |
82 | u_int16_t it_len; /* entire length */ | | 82 | u_int16_t it_len; /* entire length */ |
83 | u_int32_t it_present; /* fields present */ | | 83 | u_int32_t it_present; /* fields present */ |
84 | } __attribute__((__packed__)); | | 84 | } __attribute__((__packed__)); |
85 | .Ed | | 85 | .Ed |
86 | .Pp | | 86 | .Pp |
87 | .\" | | 87 | .\" |
88 | A device driver implementing | | 88 | A device driver implementing |
89 | .Vt radiotap | | 89 | .Vt radiotap |
90 | typically defines a structure embedding an instance of | | 90 | typically defines a structure embedding an instance of |
91 | .Vt "struct ieee80211_radiotap_header" | | 91 | .Vt "struct ieee80211_radiotap_header" |
92 | at the beginning, | | 92 | at the beginning, |
93 | with subsequent fields naturally aligned, | | 93 | with subsequent fields naturally aligned, |
94 | and in the appropriate order. Also, a driver defines | | 94 | and in the appropriate order. |
95 | a macro to set the bits of the | | 95 | Also, a driver defines a macro to set the bits of the |
96 | .Va it_present | | 96 | .Va it_present |
97 | bitmap to indicate which fields exist and are filled in by the driver. | | 97 | bitmap to indicate which fields exist and are filled in by the driver. |
98 | .\" | | 98 | .\" |
99 | .Pp | | 99 | .Pp |
100 | Radiotap capture fields are in little-endian byte order. | | 100 | Radiotap capture fields are in little-endian byte order. |
101 | .Pp | | 101 | .Pp |
102 | Radiotap capture fields | | 102 | Radiotap capture fields |
103 | .Em must be naturally aligned . | | 103 | .Em must be naturally aligned . |
104 | That is, 16-, 32-, and 64-bit fields must begin on 16-, 32-, and | | 104 | That is, 16-, 32-, and 64-bit fields must begin on 16-, 32-, and |
105 | 64-bit boundaries, respectively. | | 105 | 64-bit boundaries, respectively. |
106 | In this way, drivers can avoid unaligned accesses to radiotap | | 106 | In this way, drivers can avoid unaligned accesses to radiotap |
107 | capture fields. | | 107 | capture fields. |
108 | radiotap-compliant drivers must insert padding before a capture | | 108 | radiotap-compliant drivers must insert padding before a capture |