Changes in uspace/srv/net/include/ip_codes.h [21580dd:aadf01e] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/include/ip_codes.h
r21580dd raadf01e 94 94 /** Normal delay. 95 95 */ 96 #define IPTOS_NORMALDELAY ( 0x0 << IPTOS_DELAY_SHIFT)96 #define IPTOS_NORMALDELAY (0x0 << IPTOS_DELAY_SHIFT) 97 97 98 98 /** Low delay. 99 99 */ 100 #define IPTOS_LOWDELAY ( 0x1 << IPTOS_DELAY_SHIFT)100 #define IPTOS_LOWDELAY (0x1 << IPTOS_DELAY_SHIFT) 101 101 102 102 /** Normal throughput. 103 103 */ 104 #define IPTOS_NORMALTHROUGHPUT ( 0x0 << IPTOS_THROUGHPUT_SHIFT)104 #define IPTOS_NORMALTHROUGHPUT (0x0 << IPTOS_THROUGHPUT_SHIFT) 105 105 106 106 /** Throughput. 107 107 */ 108 #define IPTOS_THROUGHPUT ( 0x1 << IPTOS_THROUGHPUT_SHIFT)108 #define IPTOS_THROUGHPUT (0x1 << IPTOS_THROUGHPUT_SHIFT) 109 109 110 110 /** Normal reliability. 111 111 */ 112 #define IPTOS_NORMALRELIABILITY ( 0x0 << IPTOS_RELIABILITY_SHIFT)112 #define IPTOS_NORMALRELIABILITY (0x0 << IPTOS_RELIABILITY_SHIFT) 113 113 114 114 /** Reliability. 115 115 */ 116 #define IPTOS_RELIABILITY ( 0x1 << IPTOS_RELIABILITY_SHIFT)116 #define IPTOS_RELIABILITY (0x1 << IPTOS_RELIABILITY_SHIFT) 117 117 118 118 /** Normal cost. 119 119 */ 120 #define IPTOS_NORMALCOST ( 0x0 << IPTOS_COST_SHIFT)120 #define IPTOS_NORMALCOST (0x0 << IPTOS_COST_SHIFT) 121 121 122 122 /** Minimum cost. 123 123 */ 124 #define IPTOS_MICNCOST ( 0x1 << IPTOS_COST_SHIFT)124 #define IPTOS_MICNCOST (0x1 << IPTOS_COST_SHIFT) 125 125 126 126 /*@}*/ … … 137 137 /** Routine precedence. 138 138 */ 139 #define IPTOS_PREC_ROUTINE ( 0x0 << IPTOS_PRECEDENCE_SHIFT)139 #define IPTOS_PREC_ROUTINE (0x0 << IPTOS_PRECEDENCE_SHIFT) 140 140 141 141 /** Priority precedence. 142 142 */ 143 #define IPTOS_PREC_PRIORITY ( 0x1 << IPTOS_PRECEDENCE_SHIFT)143 #define IPTOS_PREC_PRIORITY (0x1 << IPTOS_PRECEDENCE_SHIFT) 144 144 145 145 /** Immediate precedence. 146 146 */ 147 #define IPTOS_PREC_IMMEDIATE ( 0x2 << IPTOS_PRECEDENCE_SHIFT)147 #define IPTOS_PREC_IMMEDIATE (0x2 << IPTOS_PRECEDENCE_SHIFT) 148 148 149 149 /** Flash precedence. 150 150 */ 151 #define IPTOS_PREC_FLASH ( 0x3 << IPTOS_PRECEDENCE_SHIFT)151 #define IPTOS_PREC_FLASH (0x3 << IPTOS_PRECEDENCE_SHIFT) 152 152 153 153 /** Flash override precedence. 154 154 */ 155 #define IPTOS_PREC_FLASHOVERRIDE ( 0x4 << IPTOS_PRECEDENCE_SHIFT)155 #define IPTOS_PREC_FLASHOVERRIDE (0x4 << IPTOS_PRECEDENCE_SHIFT) 156 156 157 157 /** Critical precedence. 158 158 */ 159 #define IPTOS_PREC_CRITIC_ECP ( 0x5 << IPTOS_PRECEDENCE_SHIFT)159 #define IPTOS_PREC_CRITIC_ECP (0x5 << IPTOS_PRECEDENCE_SHIFT) 160 160 161 161 /** Inter-network control precedence. 162 162 */ 163 #define IPTOS_PREC_INTERNETCONTROL ( 0x6 << IPTOS_PRECEDENCE_SHIFT)163 #define IPTOS_PREC_INTERNETCONTROL (0x6 << IPTOS_PRECEDENCE_SHIFT) 164 164 165 165 /** Network control precedence. 166 166 */ 167 #define IPTOS_PREC_NETCONTROL ( 0x7 << IPTOS_PRECEDENCE_SHIFT)167 #define IPTOS_PREC_NETCONTROL (0x7 << IPTOS_PRECEDENCE_SHIFT) 168 168 169 169 /*@}*/ … … 195 195 /** Copy flag. 196 196 */ 197 #define IPOPT_COPY ( 1 << IPOPT_COPY_SHIFT)197 #define IPOPT_COPY (1 << IPOPT_COPY_SHIFT) 198 198 199 199 /** Returns IP option type. … … 202 202 * @param[in] number The IP option number. 203 203 */ 204 #define IPOPT_TYPE( copy, class, number ) ((( copy ) & IPOPT_COPY ) | (( class ) & IPOPT_CLASS_MASK ) | (( number << IPOPT_NUMBER_SHIFT ) & IPOPT_NUMBER_MASK))204 #define IPOPT_TYPE(copy, class, number) (((copy) &IPOPT_COPY) | ((class) &IPOPT_CLASS_MASK) | ((number << IPOPT_NUMBER_SHIFT) &IPOPT_NUMBER_MASK)) 205 205 206 206 /** Returns a value indicating whether the IP option should be copied. 207 207 * @param[in] o The IP option. 208 208 */ 209 #define IPOPT_COPIED( o ) (( o ) & IPOPT_COPY)209 #define IPOPT_COPIED(o) ((o) &IPOPT_COPY) 210 210 211 211 /** Returns an IP option class. 212 212 * @param[in] o The IP option. 213 213 */ 214 #define IPOPT_CLASS( o ) (( o ) & IPOPT_CLASS_MASK)214 #define IPOPT_CLASS(o) ((o) &IPOPT_CLASS_MASK) 215 215 216 216 /** Returns an IP option number. 217 217 * @param[in] o The IP option. 218 218 */ 219 #define IPOPT_NUMBER( o ) (( o ) & IPOPT_NUMBER_MASK)219 #define IPOPT_NUMBER(o) ((o) &IPOPT_NUMBER_MASK) 220 220 221 221 /*@}*/ … … 227 227 /** Control class. 228 228 */ 229 #define IPOPT_CONTROL ( 0 << IPOPT_CLASS_SHIFT)229 #define IPOPT_CONTROL (0 << IPOPT_CLASS_SHIFT) 230 230 231 231 /** Reserved class 1. 232 232 */ 233 #define IPOPT_RESERVED1 ( 1 << IPOPT_CLASS_SHIFT)233 #define IPOPT_RESERVED1 (1 << IPOPT_CLASS_SHIFT) 234 234 235 235 /** Measurement class. 236 236 */ 237 #define IPOPT_MEASUREMENT ( 2 << IPOPT_CLASS_SHIFT)237 #define IPOPT_MEASUREMENT (2 << IPOPT_CLASS_SHIFT) 238 238 239 239 /** Reserved class 2. 240 240 */ 241 #define IPOPT_RESERVED2 ( 3 << IPOPT_CLASS_SHIFT)241 #define IPOPT_RESERVED2 (3 << IPOPT_CLASS_SHIFT) 242 242 243 243 /*@}*/ … … 250 250 */ 251 251 //#define IPOPT_END_OF_LIST 0x0 252 #define IPOPT_END IPOPT_TYPE( 0, IPOPT_CONTROL, 0)252 #define IPOPT_END IPOPT_TYPE(0, IPOPT_CONTROL, 0) 253 253 254 254 /** No operation. 255 255 */ 256 256 //#define IPOPT_NO_OPERATION 0x1 257 #define IPOPT_NOOP IPOPT_TYPE( 0, IPOPT_CONTROL, 1)257 #define IPOPT_NOOP IPOPT_TYPE(0, IPOPT_CONTROL, 1) 258 258 259 259 /** Security. 260 260 */ 261 261 //#define IPOPT_SECURITY 0x82 262 #define IPOPT_SEC IPOPT_TYPE( IPOPT_COPY, IPOPT_CONTROL, 2)262 #define IPOPT_SEC IPOPT_TYPE(IPOPT_COPY, IPOPT_CONTROL, 2) 263 263 264 264 /** Loose source. 265 265 */ 266 266 //#define IPOPT_LOOSE_SOURCE 0x83 267 #define IPOPT_LSRR IPOPT_TYPE( IPOPT_COPY, IPOPT_CONTROL, 3)267 #define IPOPT_LSRR IPOPT_TYPE(IPOPT_COPY, IPOPT_CONTROL, 3) 268 268 269 269 /** Strict route. 270 270 */ 271 271 //#define IPOPT_STRICT_SOURCE 0x89 272 #define IPOPT_SSRR IPOPT_TYPE( IPOPT_COPY, IPOPT_CONTROL, 9)272 #define IPOPT_SSRR IPOPT_TYPE(IPOPT_COPY, IPOPT_CONTROL, 9) 273 273 274 274 /** Record route. 275 275 */ 276 276 //#define IPOPT_RECORD_ROUTE 0x07 277 #define IPOPT_RR IPOPT_TYPE( IPOPT_COPY, IPOPT_CONTROL, 7)277 #define IPOPT_RR IPOPT_TYPE(IPOPT_COPY, IPOPT_CONTROL, 7) 278 278 279 279 /** Stream identifier. 280 280 */ 281 281 //#define IPOPT_STREAM_IDENTIFIER 0x88 282 #define IPOPT_SID IPOPT_TYPE( IPOPT_COPY, IPOPT_CONTROL, 8)282 #define IPOPT_SID IPOPT_TYPE(IPOPT_COPY, IPOPT_CONTROL, 8) 283 283 284 284 /** Stream identifier length. … … 289 289 */ 290 290 //#define IPOPT_INTERNET_TIMESTAMP 0x44 291 #define IPOPT_TIMESTAMP IPOPT_TYPE( IPOPT_COPY, IPOPT_MEASUREMENT, 4)291 #define IPOPT_TIMESTAMP IPOPT_TYPE(IPOPT_COPY, IPOPT_MEASUREMENT, 4) 292 292 293 293 /** Commercial IP security option. 294 294 */ 295 #define IPOPT_CIPSO IPOPT_TYPE( IPOPT_COPY, IPOPT_CONTROL, 5)295 #define IPOPT_CIPSO IPOPT_TYPE(IPOPT_COPY, IPOPT_CONTROL, 5) 296 296 297 297 /** No operation variant.
Note:
See TracChangeset
for help on using the changeset viewer.