Diffstat (limited to 'libopie2/opienet/onetutils.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opienet/onetutils.h | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/libopie2/opienet/onetutils.h b/libopie2/opienet/onetutils.h index f1d34a0..32f5355 100644 --- a/libopie2/opienet/onetutils.h +++ b/libopie2/opienet/onetutils.h | |||
@@ -1,19 +1,18 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | 3 | (C) 2003-2005 Michael 'Mickey' Lauer <mickey@Vanille.de> | |
4 | (C) 2003 Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> | ||
5 | =. | 4 | =. |
6 | .=l. | 5 | .=l. |
7 | .>+-= | 6 | .>+-= |
8 | _;:, .> :=|. This program is free software; you can | 7 | _;:, .> :=|. This program is free software; you can |
9 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
11 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
12 | - . .-<_> .<> Foundation; version 2 of the License. | 11 | - . .-<_> .<> Foundation; version 2 of the License. |
13 | ._= =} : | 12 | ._= =} : |
14 | .%`+i> _;_. | 13 | .%`+i> _;_. |
15 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
17 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
@@ -147,19 +146,39 @@ int stringToMode( const QString& ); | |||
147 | #define IW_PRIV_TYPE_INT 0x4000 | 146 | #define IW_PRIV_TYPE_INT 0x4000 |
148 | #define IW_PRIV_TYPE_FLOAT 0x5000 | 147 | #define IW_PRIV_TYPE_FLOAT 0x5000 |
149 | #define IW_PRIV_TYPE_ADDR 0x6000 | 148 | #define IW_PRIV_TYPE_ADDR 0x6000 |
150 | #define IW_PRIV_SIZE_FIXED 0x0800 | 149 | #define IW_PRIV_SIZE_FIXED 0x0800 |
151 | #define IW_PRIV_SIZE_MASK 0x07FF | 150 | #define IW_PRIV_SIZE_MASK 0x07FF |
152 | 151 | ||
152 | #define IW_HEADER_TYPE_NULL 0 /* Not available */ | ||
153 | #define IW_HEADER_TYPE_CHAR 2 /* char [IFNAMSIZ] */ | ||
154 | #define IW_HEADER_TYPE_UINT 4 /* __u32 */ | ||
155 | #define IW_HEADER_TYPE_FREQ 5 /* struct iw_freq */ | ||
156 | #define IW_HEADER_TYPE_ADDR 6 /* struct sockaddr */ | ||
157 | #define IW_HEADER_TYPE_POINT 8 /* struct iw_point */ | ||
158 | #define IW_HEADER_TYPE_PARAM 9 /* struct iw_param */ | ||
159 | #define IW_HEADER_TYPE_QUAL 10 /* struct iw_quality */ | ||
160 | |||
161 | #define IW_EV_POINT_OFF (((char *) &(((struct iw_point *) NULL)->length)) - \ | ||
162 | (char *) NULL) | ||
163 | |||
153 | #ifndef ARPHRD_IEEE80211 | 164 | #ifndef ARPHRD_IEEE80211 |
154 | #define ARPHRD_IEEE80211 801 | 165 | #define ARPHRD_IEEE80211 801 |
155 | #endif | 166 | #endif |
156 | #ifndef ARPHRD_IEEE80211_PRISM | 167 | #ifndef ARPHRD_IEEE80211_PRISM |
157 | #define ARPHRD_IEEE80211_PRISM 802 | 168 | #define ARPHRD_IEEE80211_PRISM 802 |
158 | #endif | 169 | #endif |
159 | 170 | ||
171 | /* Wireless Extension Scanning Stuff */ | ||
172 | struct iw_stream_descr | ||
173 | { | ||
174 | char * end; /* End of the stream */ | ||
175 | char * current; /* Current event in stream of events */ | ||
176 | char * value; /* Current value in event */ | ||
177 | }; | ||
178 | |||
160 | 179 | ||
161 | /* Network to host order macros */ | 180 | /* Network to host order macros */ |
162 | 181 | ||
163 | #ifdef LBL_ALIGN | 182 | #ifdef LBL_ALIGN |
164 | #define EXTRACT_16BITS(p) \ | 183 | #define EXTRACT_16BITS(p) \ |
165 | ((u_int16_t)((u_int16_t)*((const u_int8_t *)(p) + 0) << 8 | \ | 184 | ((u_int16_t)((u_int16_t)*((const u_int8_t *)(p) + 0) << 8 | \ |