Changes in uspace/srv/net/messages.h [91478aa:aadf01e] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/messages.h
r91478aa raadf01e 120 120 /** The last network interface layer message. 121 121 */ 122 #define NET_NETIF_LAST ( NET_NETIF_FIRST + NET_NETIF_COUNT)122 #define NET_NETIF_LAST (NET_NETIF_FIRST + NET_NETIF_COUNT) 123 123 124 124 /** The first general networking message. 125 125 */ 126 #define NET_NET_FIRST ( NET_NETIF_LAST + 0)126 #define NET_NET_FIRST (NET_NETIF_LAST + 0) 127 127 128 128 /** The last general networking message. 129 129 */ 130 #define NET_NET_LAST ( NET_NET_FIRST + NET_NET_COUNT)130 #define NET_NET_LAST (NET_NET_FIRST + NET_NET_COUNT) 131 131 132 132 /** The first network interface layer message. 133 133 */ 134 #define NET_NIL_FIRST ( NET_NET_LAST + 0)134 #define NET_NIL_FIRST (NET_NET_LAST + 0) 135 135 136 136 /** The last network interface layer message. 137 137 */ 138 #define NET_NIL_LAST ( NET_NIL_FIRST + NET_NIL_COUNT)138 #define NET_NIL_LAST (NET_NIL_FIRST + NET_NIL_COUNT) 139 139 140 140 /** The first Ethernet message. 141 141 */ 142 #define NET_ETH_FIRST ( NET_NIL_LAST + 0)142 #define NET_ETH_FIRST (NET_NIL_LAST + 0) 143 143 144 144 /** The last Ethernet message. 145 145 */ 146 #define NET_ETH_LAST ( NET_ETH_FIRST + NET_ETH_COUNT)146 #define NET_ETH_LAST (NET_ETH_FIRST + NET_ETH_COUNT) 147 147 148 148 /** The first inter-network message. 149 149 */ 150 #define NET_IL_FIRST ( NET_ETH_LAST + 0)150 #define NET_IL_FIRST (NET_ETH_LAST + 0) 151 151 152 152 /** The last inter-network message. 153 153 */ 154 #define NET_IL_LAST ( NET_IL_FIRST + NET_IL_COUNT)154 #define NET_IL_LAST (NET_IL_FIRST + NET_IL_COUNT) 155 155 156 156 /** The first IP message. 157 157 */ 158 #define NET_IP_FIRST ( NET_IL_LAST + 0)158 #define NET_IP_FIRST (NET_IL_LAST + 0) 159 159 160 160 /** The last IP message. 161 161 */ 162 #define NET_IP_LAST ( NET_IP_FIRST + NET_IP_COUNT)162 #define NET_IP_LAST (NET_IP_FIRST + NET_IP_COUNT) 163 163 164 164 /** The first ARP message. 165 165 */ 166 #define NET_ARP_FIRST ( NET_IP_LAST + 0)166 #define NET_ARP_FIRST (NET_IP_LAST + 0) 167 167 168 168 /** The last ARP message. 169 169 */ 170 #define NET_ARP_LAST ( NET_ARP_FIRST + NET_ARP_COUNT)170 #define NET_ARP_LAST (NET_ARP_FIRST + NET_ARP_COUNT) 171 171 172 172 /** The first ICMP message. 173 173 */ 174 #define NET_ICMP_FIRST ( NET_ARP_LAST + 0)174 #define NET_ICMP_FIRST (NET_ARP_LAST + 0) 175 175 176 176 /** The last ICMP message. 177 177 */ 178 #define NET_ICMP_LAST ( NET_ICMP_FIRST + NET_ICMP_COUNT)178 #define NET_ICMP_LAST (NET_ICMP_FIRST + NET_ICMP_COUNT) 179 179 180 180 /** The first ICMP message. 181 181 */ 182 #define NET_TL_FIRST ( NET_ICMP_LAST + 0)182 #define NET_TL_FIRST (NET_ICMP_LAST + 0) 183 183 184 184 /** The last ICMP message. 185 185 */ 186 #define NET_TL_LAST ( NET_TL_FIRST + NET_TL_COUNT)186 #define NET_TL_LAST (NET_TL_FIRST + NET_TL_COUNT) 187 187 188 188 /** The first UDP message. 189 189 */ 190 #define NET_UDP_FIRST ( NET_TL_LAST + 0)190 #define NET_UDP_FIRST (NET_TL_LAST + 0) 191 191 192 192 /** The last UDP message. 193 193 */ 194 #define NET_UDP_LAST ( NET_UDP_FIRST + NET_UDP_COUNT)194 #define NET_UDP_LAST (NET_UDP_FIRST + NET_UDP_COUNT) 195 195 196 196 /** The first TCP message. 197 197 */ 198 #define NET_TCP_FIRST ( NET_UDP_LAST + 0)198 #define NET_TCP_FIRST (NET_UDP_LAST + 0) 199 199 200 200 /** The last TCP message. 201 201 */ 202 #define NET_TCP_LAST ( NET_TCP_FIRST + NET_TCP_COUNT)202 #define NET_TCP_LAST (NET_TCP_FIRST + NET_TCP_COUNT) 203 203 204 204 /** The first socket message. 205 205 */ 206 #define NET_SOCKET_FIRST ( NET_TCP_LAST + 0)206 #define NET_SOCKET_FIRST (NET_TCP_LAST + 0) 207 207 208 208 /** The last socket message. 209 209 */ 210 #define NET_SOCKET_LAST ( NET_SOCKET_FIRST + NET_SOCKET_COUNT)210 #define NET_SOCKET_LAST (NET_SOCKET_FIRST + NET_SOCKET_COUNT) 211 211 212 212 /** The first packet management system message. 213 213 */ 214 #define NET_PACKET_FIRST ( NET_SOCKET_LAST + 0)214 #define NET_PACKET_FIRST (NET_SOCKET_LAST + 0) 215 215 216 216 /** The last packet management system message. 217 217 */ 218 #define NET_PACKET_LAST ( NET_PACKET_FIRST + NET_PACKET_COUNT)218 #define NET_PACKET_LAST (NET_PACKET_FIRST + NET_PACKET_COUNT) 219 219 220 220 /** The last networking message. … … 224 224 /** The number of networking messages. 225 225 */ 226 #define NET_COUNT ( NET_LAST - NET_FIRST)226 #define NET_COUNT (NET_LAST - NET_FIRST) 227 227 228 228 /** Returns a value indicating whether the value is in the interval. … … 231 231 * @param[in] last_exclusive The first value after the interval. 232 232 */ 233 #define IS_IN_INTERVAL( item, first_inclusive, last_exclusive ) ((( item ) >= ( first_inclusive )) && (( item ) < ( last_exclusive)))233 #define IS_IN_INTERVAL(item, first_inclusive, last_exclusive) (((item) >= (first_inclusive)) && ((item) < (last_exclusive))) 234 234 235 235 /** Returns a value indicating whether the IPC call is a generic networking message. 236 236 * @param[in] call The IPC call to be checked. 237 237 */ 238 #define IS_NET_MESSAGE( call ) IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_FIRST, NET_LAST)238 #define IS_NET_MESSAGE(call) IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_FIRST, NET_LAST) 239 239 240 240 /** Returns a value indicating whether the IPC call is a generic networking message. 241 241 * @param[in] call The IPC call to be checked. 242 242 */ 243 #define IS_NET_NET_MESSAGE( call ) IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_NET_FIRST, NET_NET_LAST)243 #define IS_NET_NET_MESSAGE(call) IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_NET_FIRST, NET_NET_LAST) 244 244 245 245 /** Returns a value indicating whether the IPC call is a network interface layer message. 246 246 * @param[in] call The IPC call to be checked. 247 247 */ 248 #define IS_NET_NIL_MESSAGE( call ) IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_NIL_FIRST, NET_NIL_LAST)248 #define IS_NET_NIL_MESSAGE(call) IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_NIL_FIRST, NET_NIL_LAST) 249 249 250 250 /** Returns a value indicating whether the IPC call is an Ethernet message. 251 251 * @param[in] call The IPC call to be checked. 252 252 */ 253 #define IS_NET_ETH_MESSAGE( call ) IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_ETH_FIRST, NET_ETH_LAST)253 #define IS_NET_ETH_MESSAGE(call) IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_ETH_FIRST, NET_ETH_LAST) 254 254 255 255 /** Returns a value indicating whether the IPC call is an inter-network layer message. 256 256 * @param[in] call The IPC call to be checked. 257 257 */ 258 #define IS_NET_IL_MESSAGE( call ) IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_IL_FIRST, NET_IL_LAST)258 #define IS_NET_IL_MESSAGE(call) IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_IL_FIRST, NET_IL_LAST) 259 259 260 260 /** Returns a value indicating whether the IPC call is an IP message. 261 261 * @param[in] call The IPC call to be checked. 262 262 */ 263 #define IS_NET_IP_MESSAGE( call ) IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_IP_FIRST, NET_IP_LAST)263 #define IS_NET_IP_MESSAGE(call) IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_IP_FIRST, NET_IP_LAST) 264 264 265 265 /** Returns a value indicating whether the IPC call is an ARP message. 266 266 * @param[in] call The IPC call to be checked. 267 267 */ 268 #define IS_NET_ARP_MESSAGE( call ) IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_ARP_FIRST, NET_ARP_LAST)268 #define IS_NET_ARP_MESSAGE(call) IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_ARP_FIRST, NET_ARP_LAST) 269 269 270 270 /** Returns a value indicating whether the IPC call is an ICMP message. 271 271 * @param[in] call The IPC call to be checked. 272 272 */ 273 #define IS_NET_ICMP_MESSAGE( call ) IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_ICMP_FIRST, NET_ICMP_LAST)273 #define IS_NET_ICMP_MESSAGE(call) IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_ICMP_FIRST, NET_ICMP_LAST) 274 274 275 275 /** Returns a value indicating whether the IPC call is a transport layer message. 276 276 * @param[in] call The IPC call to be checked. 277 277 */ 278 #define IS_NET_TL_MESSAGE( call ) IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_TL_FIRST, NET_TL_LAST)278 #define IS_NET_TL_MESSAGE(call) IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_TL_FIRST, NET_TL_LAST) 279 279 280 280 /** Returns a value indicating whether the IPC call is a UDP message. 281 281 * @param[in] call The IPC call to be checked. 282 282 */ 283 #define IS_NET_UDP_MESSAGE( call ) IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_UDP_FIRST, NET_UDP_LAST)283 #define IS_NET_UDP_MESSAGE(call) IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_UDP_FIRST, NET_UDP_LAST) 284 284 285 285 /** Returns a value indicating whether the IPC call is a TCP message. 286 286 * @param[in] call The IPC call to be checked. 287 287 */ 288 #define IS_NET_TCP_MESSAGE( call ) IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_TCP_FIRST, NET_TCP_LAST)288 #define IS_NET_TCP_MESSAGE(call) IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_TCP_FIRST, NET_TCP_LAST) 289 289 290 290 /** Returns a value indicating whether the IPC call is a socket message. 291 291 * @param[in] call The IPC call to be checked. 292 292 */ 293 #define IS_NET_SOCKET_MESSAGE( call ) IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_SOCKET_FIRST, NET_SOCKET_LAST)293 #define IS_NET_SOCKET_MESSAGE(call) IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_SOCKET_FIRST, NET_SOCKET_LAST) 294 294 295 295 /** Returns a value indicating whether the IPC call is a packet manaagement system message. 296 296 * @param[in] call The IPC call to be checked. 297 297 */ 298 #define IS_NET_PACKET_MESSAGE( call ) IS_IN_INTERVAL( IPC_GET_METHOD( * call ), NET_PACKET_FIRST, NET_PACKET_LAST)298 #define IS_NET_PACKET_MESSAGE(call) IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_PACKET_FIRST, NET_PACKET_LAST) 299 299 300 300 /*@}*/ … … 307 307 * @param[in] call The message call structure. 308 308 */ 309 #define IPC_GET_DEVICE( call ) ( device_id_t ) IPC_GET_ARG1( * call)309 #define IPC_GET_DEVICE(call) (device_id_t) IPC_GET_ARG1(*call) 310 310 311 311 /** Returns the packet identifier message parameter. 312 312 * @param[in] call The message call structure. 313 313 */ 314 #define IPC_GET_PACKET( call ) ( packet_id_t ) IPC_GET_ARG2( * call)314 #define IPC_GET_PACKET(call) (packet_id_t) IPC_GET_ARG2(*call) 315 315 316 316 /** Returns the count message parameter. 317 317 * @param[in] call The message call structure. 318 318 */ 319 #define IPC_GET_COUNT( call ) ( size_t ) IPC_GET_ARG2( * call)319 #define IPC_GET_COUNT(call) (size_t) IPC_GET_ARG2(*call) 320 320 321 321 /** Returns the device state message parameter. 322 322 * @param[in] call The message call structure. 323 323 */ 324 #define IPC_GET_STATE( call ) ( device_state_t ) IPC_GET_ARG2( * call)324 #define IPC_GET_STATE(call) (device_state_t) IPC_GET_ARG2(*call) 325 325 326 326 /** Returns the maximum transmission unit message parameter. 327 327 * @param[in] call The message call structure. 328 328 */ 329 #define IPC_GET_MTU( call ) ( size_t ) IPC_GET_ARG2( * call)329 #define IPC_GET_MTU(call) (size_t) IPC_GET_ARG2(*call) 330 330 331 331 /** Returns the device driver service message parameter. 332 332 * @param[in] call The message call structure. 333 333 */ 334 #define IPC_GET_SERVICE( call ) ( services_t ) IPC_GET_ARG3( * call)334 #define IPC_GET_SERVICE(call) (services_t) IPC_GET_ARG3(*call) 335 335 336 336 /** Returns the target service message parameter. 337 337 * @param[in] call The message call structure. 338 338 */ 339 #define IPC_GET_TARGET( call ) ( services_t ) IPC_GET_ARG3( * call)339 #define IPC_GET_TARGET(call) (services_t) IPC_GET_ARG3(*call) 340 340 341 341 /** Returns the sender service message parameter. 342 342 * @param[in] call The message call structure. 343 343 */ 344 #define IPC_GET_SENDER( call ) ( services_t ) IPC_GET_ARG3( * call)344 #define IPC_GET_SENDER(call) (services_t) IPC_GET_ARG3(*call) 345 345 346 346 /** Returns the error service message parameter. 347 347 * @param[in] call The message call structure. 348 348 */ 349 #define IPC_GET_ERROR( call ) ( services_t ) IPC_GET_ARG4( * call)349 #define IPC_GET_ERROR(call) (services_t) IPC_GET_ARG4(*call) 350 350 351 351 /** Returns the phone message parameter. 352 352 * @param[in] call The message call structure. 353 353 */ 354 #define IPC_GET_PHONE( call ) ( int ) IPC_GET_ARG5( * call)354 #define IPC_GET_PHONE(call) (int) IPC_GET_ARG5(*call) 355 355 356 356 /** Sets the device identifier in the message answer. 357 357 * @param[out] answer The message answer structure. 358 358 */ 359 #define IPC_SET_DEVICE( answer ) (( device_id_t * ) & IPC_GET_ARG1( * answer))359 #define IPC_SET_DEVICE(answer) ((device_id_t *) &IPC_GET_ARG1(*answer)) 360 360 361 361 /** Sets the minimum address length in the message answer. 362 362 * @param[out] answer The message answer structure. 363 363 */ 364 #define IPC_SET_ADDR( answer ) (( size_t * ) & IPC_GET_ARG1( * answer))364 #define IPC_SET_ADDR(answer) ((size_t *) &IPC_GET_ARG1(*answer)) 365 365 366 366 /** Sets the minimum prefix size in the message answer. 367 367 * @param[out] answer The message answer structure. 368 368 */ 369 #define IPC_SET_PREFIX( answer ) (( size_t * ) & IPC_GET_ARG2( * answer))369 #define IPC_SET_PREFIX(answer) ((size_t *) &IPC_GET_ARG2(*answer)) 370 370 371 371 /** Sets the maximum content size in the message answer. 372 372 * @param[out] answer The message answer structure. 373 373 */ 374 #define IPC_SET_CONTENT( answer ) (( size_t * ) & IPC_GET_ARG3( * answer))374 #define IPC_SET_CONTENT(answer) ((size_t *) &IPC_GET_ARG3(*answer)) 375 375 376 376 /** Sets the minimum suffix size in the message answer. 377 377 * @param[out] answer The message answer structure. 378 378 */ 379 #define IPC_SET_SUFFIX( answer ) (( size_t * ) & IPC_GET_ARG4( * answer))379 #define IPC_SET_SUFFIX(answer) ((size_t *) &IPC_GET_ARG4(*answer)) 380 380 381 381 /*@}*/ … … 391 391 * @returns Other error codes as defined for the specific service message. 392 392 */ 393 static inline int generic_get_addr_req( int phone, int message, device_id_t device_id, measured_string_ref * address, char ** data ){ 394 aid_t message_id; 395 ipcarg_t result; 396 int string; 397 398 if( !( address && data )) return EBADMEM; 399 message_id = async_send_1( phone, ( ipcarg_t ) message, ( ipcarg_t ) device_id, NULL ); 400 string = measured_strings_return( phone, address, data, 1 ); 401 async_wait_for( message_id, & result ); 402 if(( string == EOK ) && ( result != EOK )){ 403 free( * address ); 404 free( * data ); 405 } 406 return ( int ) result; 393 static inline int generic_get_addr_req(int phone, int message, device_id_t device_id, measured_string_ref * address, char ** data){ 394 aid_t message_id; 395 ipcarg_t result; 396 int string; 397 398 if(!(address && data)){ 399 return EBADMEM; 400 } 401 message_id = async_send_1(phone, (ipcarg_t) message, (ipcarg_t) device_id, NULL); 402 string = measured_strings_return(phone, address, data, 1); 403 async_wait_for(message_id, &result); 404 if((string == EOK) && (result != EOK)){ 405 free(*address); 406 free(*data); 407 } 408 return (int) result; 407 409 } 408 410 … … 423 425 * @returns Other error codes as defined for the specific service message. 424 426 */ 425 static inline int generic_translate_req( int phone, int message, device_id_t device_id, services_t service, measured_string_ref configuration, size_t count, measured_string_ref * translation, char ** data ){ 426 aid_t message_id; 427 ipcarg_t result; 428 int string; 429 430 if( !( configuration && ( count > 0 ))) return EINVAL; 431 if( !( translation && data )) return EBADMEM; 432 message_id = async_send_3( phone, ( ipcarg_t ) message, ( ipcarg_t ) device_id, ( ipcarg_t ) count, ( ipcarg_t ) service, NULL ); 433 measured_strings_send( phone, configuration, count ); 434 string = measured_strings_return( phone, translation, data, count ); 435 async_wait_for( message_id, & result ); 436 if(( string == EOK ) && ( result != EOK )){ 437 free( * translation ); 438 free( * data ); 439 } 440 return ( int ) result; 427 static inline int generic_translate_req(int phone, int message, device_id_t device_id, services_t service, measured_string_ref configuration, size_t count, measured_string_ref * translation, char ** data){ 428 aid_t message_id; 429 ipcarg_t result; 430 int string; 431 432 if(!(configuration && (count > 0))){ 433 return EINVAL; 434 } 435 if(!(translation && data)){ 436 return EBADMEM; 437 } 438 message_id = async_send_3(phone, (ipcarg_t) message, (ipcarg_t) device_id, (ipcarg_t) count, (ipcarg_t) service, NULL); 439 measured_strings_send(phone, configuration, count); 440 string = measured_strings_return(phone, translation, data, count); 441 async_wait_for(message_id, &result); 442 if((string == EOK) && (result != EOK)){ 443 free(*translation); 444 free(*data); 445 } 446 return (int) result; 441 447 } 442 448 … … 450 456 * @returns EOK on success. 451 457 */ 452 static inline int generic_send_msg( int phone, int message, device_id_t device_id, packet_id_t packet_id, services_t sender, services_t error){453 if( error){454 async_msg_4( phone, ( ipcarg_t ) message, ( ipcarg_t ) device_id, ( ipcarg_t ) packet_id, ( ipcarg_t ) sender, ( ipcarg_t ) error);458 static inline int generic_send_msg(int phone, int message, device_id_t device_id, packet_id_t packet_id, services_t sender, services_t error){ 459 if(error){ 460 async_msg_4(phone, (ipcarg_t) message, (ipcarg_t) device_id, (ipcarg_t) packet_id, (ipcarg_t) sender, (ipcarg_t) error); 455 461 }else{ 456 async_msg_3( phone, ( ipcarg_t ) message, ( ipcarg_t ) device_id, ( ipcarg_t ) packet_id, ( ipcarg_t ) sender);462 async_msg_3(phone, (ipcarg_t) message, (ipcarg_t) device_id, (ipcarg_t) packet_id, (ipcarg_t) sender); 457 463 } 458 464 return EOK; … … 468 474 * @returns Other error codes as defined for the specific service message. 469 475 */ 470 static inline int generic_packet_size_req( int phone, int message, device_id_t device_id, packet_dimension_ref packet_dimension ){ 471 ipcarg_t result; 472 ipcarg_t prefix; 473 ipcarg_t content; 474 ipcarg_t suffix; 475 ipcarg_t addr_len; 476 477 if( ! packet_dimension ) return EBADMEM; 478 result = async_req_1_4( phone, ( ipcarg_t ) message, ( ipcarg_t ) device_id, & addr_len, & prefix, & content, & suffix ); 479 packet_dimension->prefix = ( size_t ) prefix; 480 packet_dimension->content = ( size_t ) content; 481 packet_dimension->suffix = ( size_t ) suffix; 482 packet_dimension->addr_len = ( size_t ) addr_len; 483 return ( int ) result; 476 static inline int generic_packet_size_req(int phone, int message, device_id_t device_id, packet_dimension_ref packet_dimension){ 477 ipcarg_t result; 478 ipcarg_t prefix; 479 ipcarg_t content; 480 ipcarg_t suffix; 481 ipcarg_t addr_len; 482 483 if(! packet_dimension){ 484 return EBADMEM; 485 } 486 result = async_req_1_4(phone, (ipcarg_t) message, (ipcarg_t) device_id, &addr_len, &prefix, &content, &suffix); 487 packet_dimension->prefix = (size_t) prefix; 488 packet_dimension->content = (size_t) content; 489 packet_dimension->suffix = (size_t) suffix; 490 packet_dimension->addr_len = (size_t) addr_len; 491 return (int) result; 484 492 } 485 493 … … 492 500 * @returns EOK on success. 493 501 */ 494 static inline int generic_device_state_msg( int phone, int message, device_id_t device_id, int state, services_t target){495 async_msg_3( phone, ( ipcarg_t ) message, ( ipcarg_t ) device_id, ( ipcarg_t ) state, target);502 static inline int generic_device_state_msg(int phone, int message, device_id_t device_id, int state, services_t target){ 503 async_msg_3(phone, (ipcarg_t) message, (ipcarg_t) device_id, (ipcarg_t) state, target); 496 504 return EOK; 497 505 } … … 506 514 * @returns EOK on success. 507 515 */ 508 static inline int generic_received_msg( int phone, int message, device_id_t device_id, packet_id_t packet_id, services_t target, services_t error){509 if( error){510 async_msg_4( phone, ( ipcarg_t ) message, ( ipcarg_t ) device_id, ( ipcarg_t ) packet_id, ( ipcarg_t ) target, ( ipcarg_t ) error);516 static inline int generic_received_msg(int phone, int message, device_id_t device_id, packet_id_t packet_id, services_t target, services_t error){ 517 if(error){ 518 async_msg_4(phone, (ipcarg_t) message, (ipcarg_t) device_id, (ipcarg_t) packet_id, (ipcarg_t) target, (ipcarg_t) error); 511 519 }else{ 512 async_msg_3( phone, ( ipcarg_t ) message, ( ipcarg_t ) device_id, ( ipcarg_t ) packet_id, ( ipcarg_t ) target);520 async_msg_3(phone, (ipcarg_t) message, (ipcarg_t) device_id, (ipcarg_t) packet_id, (ipcarg_t) target); 513 521 } 514 522 return EOK; … … 524 532 * @returns Other error codes as defined for the specific service message. 525 533 */ 526 static inline int generic_device_req( int phone, int message, device_id_t device_id, int arg2, services_t service){527 return ( int ) async_req_3_0( phone, ( ipcarg_t ) message, ( ipcarg_t ) device_id, ( ipcarg_t ) arg2, ( ipcarg_t ) service);534 static inline int generic_device_req(int phone, int message, device_id_t device_id, int arg2, services_t service){ 535 return (int) async_req_3_0(phone, (ipcarg_t) message, (ipcarg_t) device_id, (ipcarg_t) arg2, (ipcarg_t) service); 528 536 } 529 537
Note:
See TracChangeset
for help on using the changeset viewer.