Rev 3886 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3886 | Rev 3901 | ||
---|---|---|---|
Line 35... | Line 35... | ||
35 | */ |
35 | */ |
36 | 36 | ||
37 | #ifndef __NET_IP_MESSAGES_H__ |
37 | #ifndef __NET_IP_MESSAGES_H__ |
38 | #define __NET_IP_MESSAGES_H__ |
38 | #define __NET_IP_MESSAGES_H__ |
39 | 39 | ||
- | 40 | #include <async.h> |
|
- | 41 | ||
40 | #include <ipc/ipc.h> |
42 | #include <ipc/ipc.h> |
41 | 43 | ||
42 | #include "../../err.h" |
44 | #include "../../err.h" |
43 | #include "../../messages.h" |
45 | #include "../../messages.h" |
44 | 46 | ||
Line 65... | Line 67... | ||
65 | 67 | ||
66 | #define ip_echo( ip_phone, arg1, arg2, arg3, arg4, arg5, answer1, answer2, answer3, answer4, answer5 ) \ |
68 | #define ip_echo( ip_phone, arg1, arg2, arg3, arg4, arg5, answer1, answer2, answer3, answer4, answer5 ) \ |
67 | async_req_5_5( ip_phone, NET_IP_ECHO, ( arg1 ), ( arg2 ), ( arg3 ), ( arg4 ), ( arg5 ), ( answer1 ), ( answer2 ), ( answer3 ), ( answer4 ), ( answer5 )) |
69 | async_req_5_5( ip_phone, NET_IP_ECHO, ( arg1 ), ( arg2 ), ( arg3 ), ( arg4 ), ( arg5 ), ( answer1 ), ( answer2 ), ( answer3 ), ( answer4 ), ( answer5 )) |
68 | 70 | ||
69 | #define ip_send( ip_phone, device_id, packet ) \ |
71 | #define ip_send( ip_phone, device_id, packet ) \ |
70 | { \ |
- | |
71 | ERROR_DECLARE; \ |
- | |
72 | \ |
- | |
73 | aid_t message; \ |
- | |
74 | ipc_call_t answer; \ |
- | |
75 | ipcarg_t result; \ |
- | |
76 | \ |
- | |
77 | message = async_send_1(( ip_phone ), NET_IP_SEND, ( device_id ), & answer ); \ |
72 | async_msg_1( ip_phone, NET_IP_SEND, packet_get_id( packet )) |
78 | if( ERROR_OCCURED( packet_send(( packet ), ( ip_phone )))){ \ |
- | |
79 | async_wait_for( message, NULL ); \ |
- | |
80 | result = ERROR_CODE; \ |
- | |
81 | }else{ \ |
- | |
82 | async_wait_for( message, & result ); \ |
- | |
83 | } \ |
- | |
84 | result; \ |
- | |
85 | } |
- | |
86 | 73 | ||
87 | #endif |
74 | #endif |
88 | 75 | ||
89 | #endif |
76 | #endif |
90 | 77 |