Subversion Repositories HelenOS

Rev

Rev 4261 | Rev 4351 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4261 Rev 4271
Line 165... Line 165...
165
    /* ( device_id ), measured_strings_send( address ) */
165
    /* ( device_id ), measured_strings_send( address ) */
166
//  NET_IL_MY_ADDR,
166
//  NET_IL_MY_ADDR,
167
    NET_IP_ECHO = NET_IP_FIRST,
167
    NET_IP_ECHO = NET_IP_FIRST,
168
    /* ( packet_id ) */
168
    /* ( packet_id ) */
169
    NET_IP_SEND,
169
    NET_IP_SEND,
170
    /* ( device_id, nil_service, proto ), measured_strings_send( proto_addr ) */
-
 
171
    NET_ARP_DEVICE = NET_ARP_FIRST,
-
 
172
    /* ( device_id, protocol ), measured_strings_send( target ), measured_strings_return( translation ) */
-
 
173
    NET_ARP_TRANSLATE,
-
 
174
    /* ( device_id ) */
-
 
175
    NET_ARP_CLEAR_DEVICE,
-
 
176
    /* () */
-
 
177
    NET_ARP_CLEAN_CACHE,
-
 
178
    NET_PACKET_CREATE_1 = NET_PACKET_FIRST,
170
    NET_PACKET_CREATE_1 = NET_PACKET_FIRST,
179
    NET_PACKET_CREATE_4,
171
    NET_PACKET_CREATE_4,
180
    NET_PACKET_GET,
172
    NET_PACKET_GET,
181
    NET_PACKET_GET_SIZE,
173
    NET_PACKET_GET_SIZE,
182
    NET_PACKET_RELEASE
174
    NET_PACKET_RELEASE
183
} net_messages;
175
} net_messages;
184
 
176
 
185
static inline int generic_get_addr( int phone, int message, device_id_t device_id, measured_string_ref * address, char ** data ){
177
static inline int generic_get_addr( int phone, int message, device_id_t device_id, measured_string_ref * address, char ** data ){
186
    aid_t           message_id;
178
    aid_t           message_id;
187
//  ipc_call_t      answer;
-
 
188
    ipcarg_t        result;
179
    ipcarg_t        result;
189
    int             string;
180
    int             string;
190
 
181
 
191
    if( !( address && data )) return EBADMEM;
182
    if( !( address && data )) return EBADMEM;
192
    message_id = async_send_1( phone, message, device_id, NULL /* & answer */ );
183
    message_id = async_send_1( phone, message, device_id, NULL );
193
    string = measured_strings_return( phone, address, data, 1 );
184
    string = measured_strings_return( phone, address, data, 1 );
194
    async_wait_for( message_id, & result );
185
    async_wait_for( message_id, & result );
195
    if(( string == EOK ) && ( result != EOK )){
186
    if(( string == EOK ) && ( result != EOK )){
196
        free( * address );
187
        free( * address );
197
        free( * data );
188
        free( * data );