/branches/network/uspace/srv/net/structures/measured_strings.c |
---|
71,6 → 71,25 |
return new; |
} |
measured_string_ref measured_string_copy( measured_string_ref source ){ |
measured_string_ref new; |
if( ! source ) return NULL; |
new = ( measured_string_ref ) malloc( sizeof( measured_string_t )); |
if( new ){ |
new->value = ( char * ) malloc( source->length + 1 ); |
if( new->value ){ |
new->length = source->length; |
memcpy( new->value, source->value, new->length ); |
new->value[ new->length ] = '\0'; |
return new; |
}else{ |
free( new ); |
} |
} |
return NULL; |
} |
int measured_strings_receive( measured_string_ref * strings, char ** data, size_t count ){ |
ERROR_DECLARE; |
/branches/network/uspace/srv/net/structures/measured_strings.h |
---|
70,6 → 70,14 |
*/ |
measured_string_ref measured_string_create_bulk( const char * string, size_t length ); |
/** Copies the given measured string with separated header and data parts. |
* @param source The source measured string to be copied. Input parameter. |
* @returns The copy of the given measured string. |
* @returns NULL if the source parameter is NULL. |
* @returns NULL if there is not enough memory left. |
*/ |
measured_string_ref measured_string_copy( measured_string_ref source ); |
/** Receives a measured strings array from a calling module. |
* Creates the array and the data memory blocks. |
* This method should be used only while processing IPC messages as the array size has to be negotiated in advance. |
/branches/network/uspace/srv/net/include/nil_messages.h |
---|
39,7 → 39,6 |
#include <async.h> |
#include <errno.h> |
#include <malloc.h> |
#include <ipc/ipc.h> |
/branches/network/uspace/srv/net/include/arp_messages.h |
---|
0,0 → 1,132 |
/* |
* Copyright (c) 2009 Lukas Mejdrech |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup arp |
* @{ |
*/ |
/** @file |
*/ |
#ifndef __NET_ARP_MESSAGES_H__ |
#define __NET_ARP_MESSAGES_H__ |
#include <async.h> |
#include <errno.h> |
#include <ipc/ipc.h> |
#include "../messages.h" |
#include "../structures/measured_strings.h" |
#include "device.h" |
typedef enum{ |
/* ( device_id, nil_service, proto ), measured_strings_send( proto_addr ) */ |
NET_ARP_DEVICE = NET_ARP_FIRST, |
/* ( device_id, protocol ), measured_strings_send( target ), measured_strings_return( translation ) */ |
NET_ARP_TRANSLATE, |
/* ( device_id ) */ |
NET_ARP_CLEAR_DEVICE, |
/* () */ |
NET_ARP_CLEAN_CACHE, |
} arp_messages; |
static inline int arp_device_req( int arp_phone, device_id_t device_id, services_t protocol, services_t netif, measured_string_ref address ); |
static inline int arp_translate_req( int arp_phone, device_id_t device_id, services_t protocol, measured_string_ref address, measured_string_ref * translation, char ** data ); |
static inline int arp_clear_device_req( int arp_phone, device_id_t device_id ); |
static inline int arp_clean_cache_req( int arp_phone ); |
#if ARP_BUNDLE |
#include "../il/arp/arp_wrappers.h" |
/** Returns the protocol service message parameter. |
*/ |
#define ARP_GET_PROTO( call ) ( services_t ) IPC_GET_ARG2( * call ) |
static inline int arp_device_req( int arp_phone, device_id_t device_id, services_t protocol, services_t netif, measured_string_ref address ){ |
return arp_device_wrapper( device_id, netif, protocol, address ); |
} |
static inline int arp_translate_req( int arp_phone, device_id_t device_id, services_t protocol, measured_string_ref address, measured_string_ref * translation, char ** data ){ |
return arp_translate_wrapper( device_id, protocol, address, translation, data ); |
} |
static inline int arp_clear_device_req( int arp_phone, device_id_t device_id ){ |
return arp_clear_device_wrapper( device_id ); |
} |
static inline int arp_clean_cache_req( int arp_phone ){ |
return arp_clean_cache_wrapper(); |
} |
#else |
static inline int arp_device_req( int arp_phone, device_id_t device_id, services_t protocol, services_t netif, measured_string_ref address ){ |
aid_t message_id; |
ipcarg_t result; |
message_id = async_send_3( arp_phone, NET_ARP_DEVICE, device_id, protocol, netif, NULL ); |
measured_strings_send( arp_phone, address, 1 ); |
async_wait_for( message_id, & result ); |
return result; |
} |
static inline int arp_translate_req( int arp_phone, device_id_t device_id, services_t protocol, measured_string_ref address, measured_string_ref * translation, char ** data ){ |
aid_t message_id; |
ipcarg_t result; |
int string; |
if( !( address && data )) return EBADMEM; |
message_id = async_send_2( arp_phone, NET_ARP_TRANSLATE, device_id, protocol, NULL ); |
measured_strings_send( arp_phone, address, 1 ); |
string = measured_strings_return( arp_phone, translation, data, 1 ); |
async_wait_for( message_id, & result ); |
if(( string == EOK ) && ( result != EOK )){ |
free( * translation ); |
free( * data ); |
} |
return result; |
} |
static inline int arp_clear_device_req( int arp_phone, device_id_t device_id ){ |
return async_req_1_0( arp_phone, NET_ARP_CLEAR_DEVICE, device_id ); |
} |
static inline int arp_clean_cache_req( int arp_phone ){ |
return async_req_0_0( arp_phone, NET_ARP_CLEAN_CACHE ); |
} |
#endif |
#endif |
/** @} |
*/ |
Property changes: |
Added: svn:eol-style |
+native |
\ No newline at end of property |
/branches/network/uspace/srv/net/networking/networking.c |
---|
443,7 → 443,7 |
ERROR_PROPAGATE( add_configuration( & netif->configuration, "IO", "300" )); |
ERROR_PROPAGATE( add_configuration( & netif->configuration, "MTU", "1492" )); |
ERROR_PROPAGATE( add_configuration( & netif->configuration, "IP_CONFIG", "static" )); |
ERROR_PROPAGATE( add_configuration( & netif->configuration, "IP_ADDR", "10.0.2.5" )); |
ERROR_PROPAGATE( add_configuration( & netif->configuration, "IP_ADDR", "10.0.2.15" )); |
ERROR_PROPAGATE( add_configuration( & netif->configuration, "NETMASK", "255.255.255.0" )); |
ERROR_PROPAGATE( add_configuration( & netif->configuration, "BROADCAST", "10.0.2.255" )); |
ERROR_PROPAGATE( add_configuration( & netif->configuration, "GATEWAY", "10.0.2.2" )); |
/branches/network/uspace/srv/net/messages.h |
---|
167,14 → 167,6 |
NET_IP_ECHO = NET_IP_FIRST, |
/* ( packet_id ) */ |
NET_IP_SEND, |
/* ( device_id, nil_service, proto ), measured_strings_send( proto_addr ) */ |
NET_ARP_DEVICE = NET_ARP_FIRST, |
/* ( device_id, protocol ), measured_strings_send( target ), measured_strings_return( translation ) */ |
NET_ARP_TRANSLATE, |
/* ( device_id ) */ |
NET_ARP_CLEAR_DEVICE, |
/* () */ |
NET_ARP_CLEAN_CACHE, |
NET_PACKET_CREATE_1 = NET_PACKET_FIRST, |
NET_PACKET_CREATE_4, |
NET_PACKET_GET, |
184,12 → 176,11 |
static inline int generic_get_addr( int phone, int message, device_id_t device_id, measured_string_ref * address, char ** data ){ |
aid_t message_id; |
// ipc_call_t answer; |
ipcarg_t result; |
int string; |
if( !( address && data )) return EBADMEM; |
message_id = async_send_1( phone, message, device_id, NULL /* & answer */ ); |
message_id = async_send_1( phone, message, device_id, NULL ); |
string = measured_strings_return( phone, address, data, 1 ); |
async_wait_for( message_id, & result ); |
if(( string == EOK ) && ( result != EOK )){ |
/branches/network/uspace/srv/net/il/arp/arp.c |
---|
50,6 → 50,7 |
#include "../../include/byteorder.h" |
#include "../../include/device.h" |
#include "../../include/arp_messages.h" |
#include "../../include/nil_messages.h" |
#include "../../include/protocol_map.h" |
60,13 → 61,9 |
#include "arp.h" |
#include "arp_header.h" |
#include "arp_oc.h" |
//#include "arp_messages.h" |
#include "arp_module.h" |
#include "arp_wrappers.h" |
/** Returns the protocol service message parameter. |
*/ |
#define ARP_GET_PROTO( call ) ( services_t ) IPC_GET_ARG2( * call ) |
/** ARP global data. |
*/ |
arp_globals_t arp_globals; |
120,23 → 117,11 |
*/ |
int arp_receive_message( device_id_t device_id, packet_t packet ); |
/** Clears the device specific data from the cache. |
* @param device_id The device identifier. Input parameter. |
* @returns EOK on success. |
* @returns ENOENT if the device is not found in the cache. |
*/ |
int arp_clear_device_message( device_id_t device_id ); |
/** Clears the device specific data. |
* @param device The device specific data. |
*/ |
void clear_device( arp_device_ref device ); |
/** Clears the whole cache. |
* @returns EOK on success. |
*/ |
int arp_clean_cache_message( void ); |
/** Processes IPC messages from the registered device driver modules in an infinite loop. |
* @param iid The message identifier. Input parameter. |
* @param icall The message parameters. Input/output parameter. |
149,6 → 134,73 |
GENERIC_CHAR_MAP_IMPLEMENT( arp_addr, measured_string_t ) |
int arp_clear_device_wrapper( device_id_t device_id ){ |
arp_device_ref device; |
rwlock_write_lock( & arp_globals.lock ); |
device = arp_cache_find( & arp_globals.cache, device_id ); |
if( ! device ){ |
rwlock_write_unlock( & arp_globals.lock ); |
return ENOENT; |
} |
clear_device( device ); |
printf( "\nDevice %d cleared", device_id ); |
rwlock_write_unlock( & arp_globals.lock ); |
return EOK; |
} |
int arp_clean_cache_wrapper( void ){ |
int count; |
arp_device_ref device; |
rwlock_write_lock( & arp_globals.lock ); |
for( count = arp_cache_count( & arp_globals.cache ) - 1; count >= 0; -- count ){ |
device = arp_cache_get_index( & arp_globals.cache, count ); |
if( device ){ |
clear_device( device ); |
if( device->addr_data ) free( device->addr_data ); |
if( device->broadcast_data ) free( device->broadcast_data ); |
} |
} |
arp_cache_clear( & arp_globals.cache ); |
rwlock_write_unlock( & arp_globals.lock ); |
printf( "\nCache cleaned" ); |
return EOK; |
} |
int arp_device_wrapper( device_id_t device_id, services_t protocol, services_t netif, measured_string_ref address ){ |
ERROR_DECLARE; |
measured_string_ref tmp; |
tmp = measured_string_copy( address ); |
if( ERROR_OCCURRED( arp_device_message( device_id, netif, protocol, tmp ))){ |
free( tmp->value ); |
free( tmp ); |
} |
return ERROR_CODE; |
} |
int arp_translate_wrapper( device_id_t device_id, services_t protocol, measured_string_ref address, measured_string_ref * translation, char ** data ){ |
measured_string_ref tmp; |
rwlock_read_lock( & arp_globals.lock ); |
tmp = arp_translate_message( device_id, protocol, address ); |
if( tmp ){ |
* translation = measured_string_copy( tmp ); |
rwlock_read_unlock( & arp_globals.lock ); |
if( * translation ){ |
* data = ( ** translation ).value; |
return EOK; |
}else{ |
return ENOMEM; |
} |
}else{ |
rwlock_read_unlock( & arp_globals.lock ); |
return ENOENT; |
} |
} |
int arp_initialize( void ){ |
ERROR_DECLARE; |
382,21 → 434,6 |
return EOK; |
} |
int arp_clear_device_message( device_id_t device_id ){ |
arp_device_ref device; |
rwlock_write_lock( & arp_globals.lock ); |
device = arp_cache_find( & arp_globals.cache, device_id ); |
if( ! device ){ |
rwlock_write_unlock( & arp_globals.lock ); |
return ENOENT; |
} |
clear_device( device ); |
printf( "\nDevice %d cleared", device_id ); |
rwlock_write_unlock( & arp_globals.lock ); |
return EOK; |
} |
void clear_device( arp_device_ref device ){ |
int count; |
arp_proto_ref proto; |
412,25 → 449,6 |
arp_protos_clear( & device->protos ); |
} |
int arp_clean_cache_message( void ){ |
int count; |
arp_device_ref device; |
rwlock_write_lock( & arp_globals.lock ); |
for( count = arp_cache_count( & arp_globals.cache ) - 1; count >= 0; -- count ){ |
device = arp_cache_get_index( & arp_globals.cache, count ); |
if( device ){ |
clear_device( device ); |
if( device->addr_data ) free( device->addr_data ); |
if( device->broadcast_data ) free( device->broadcast_data ); |
} |
} |
arp_cache_clear( & arp_globals.cache ); |
rwlock_write_unlock( & arp_globals.lock ); |
printf( "\nCache cleaned" ); |
return EOK; |
} |
int arp_message( ipc_callid_t callid, ipc_call_t * call, ipc_call_t * answer, int * answer_count ){ |
ERROR_DECLARE; |
464,9 → 482,9 |
rwlock_read_unlock( & arp_globals.lock ); |
return ERROR_CODE; |
case NET_ARP_CLEAR_DEVICE: |
return arp_clear_device_message( IPC_GET_DEVICE( call )); |
return arp_clear_device_wrapper( IPC_GET_DEVICE( call )); |
case NET_ARP_CLEAN_CACHE: |
return arp_clean_cache_message(); |
return arp_clean_cache_wrapper(); |
} |
return ENOTSUP; |
} |
/branches/network/uspace/srv/net/il/arp/arp_wrappers.h |
---|
0,0 → 1,63 |
/* |
* Copyright (c) 2009 Lukas Mejdrech |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions |
* are met: |
* |
* - Redistributions of source code must retain the above copyright |
* notice, this list of conditions and the following disclaimer. |
* - Redistributions in binary form must reproduce the above copyright |
* notice, this list of conditions and the following disclaimer in the |
* documentation and/or other materials provided with the distribution. |
* - The name of the author may not be used to endorse or promote products |
* derived from this software without specific prior written permission. |
* |
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
/** @addtogroup arp |
* @{ |
*/ |
/** @file |
*/ |
#ifndef __NET_ARP_WRAPPERS_H__ |
#define __NET_ARP_WRAPPERS_H__ |
#include <ipc/services.h> |
#include "../../structures/measured_strings.h" |
#include "../../include/device.h" |
/** Clears the device specific data from the cache. |
* @param device_id The device identifier. Input parameter. |
* @returns EOK on success. |
* @returns ENOENT if the device is not found in the cache. |
*/ |
int arp_clear_device_wrapper( device_id_t device_id ); |
/** Clears the whole cache. |
* @returns EOK on success. |
*/ |
int arp_clean_cache_wrapper( void ); |
int arp_device_wrapper( device_id_t device_id, services_t protocol, services_t netif, measured_string_ref address ); |
int arp_translate_wrapper( device_id_t device_id, services_t protocol, measured_string_ref address, measured_string_ref * translation, char ** data ); |
#endif |
/** @} |
*/ |
Property changes: |
Added: svn:eol-style |
+native |
\ No newline at end of property |
/branches/network/uspace/srv/net/il/ip/ip.c |
---|
47,6 → 47,7 |
#include "../../include/sockaddr.h" |
#include "../../include/socket.h" |
#include "../../include/device.h" |
#include "../../include/arp_messages.h" |
#include "../../include/nil_messages.h" |
#include "../../structures/measured_strings.h" |
#include "../../structures/module_map.h" |
185,18 → 186,12 |
return ip_netif->phone; |
} |
if( ip_netif->arp ){ |
message = async_send_3( ip_netif->arp->phone, NET_ARP_DEVICE, ip_netif->device_id, SERVICE_IP, service, & answer ); |
configuration[ 0 ].value = ( char * ) & ip_netif->address; |
configuration[ 0 ].length = CONVERT_SIZE( in_addr_t, char, 1 ); |
if( ERROR_OCCURRED( measured_strings_send( ip_netif->arp->phone, & configuration[ 0 ], 1 ))){ |
if( ERROR_OCCURRED( arp_device_req( ip_netif->arp->phone, ip_netif->device_id, SERVICE_IP, service, & configuration[ 0 ] ))){ |
free( ip_netif ); |
return ERROR_CODE; |
} |
async_wait_for( message, & result ); |
if( ERROR_OCCURRED( result )){ |
free( ip_netif ); |
return ERROR_CODE; |
} |
} |
index = ip_netifs_add( & ip_globals.netifs, ip_netif->device_id, ip_netif ); |
if( index < 0 ){ |
277,12 → 272,9 |
ip_netif_ref netif; |
aid_t message; |
ipc_call_t answer; |
measured_string_t address; |
measured_string_ref translation; |
char * data; |
ipcarg_t result; |
netif = ip_netifs_find( & ip_globals.netifs, device_id ); |
if( ! netif ) return ENOENT; |
289,21 → 281,12 |
// TODO state |
printf( "\nip - device %d changed state to %d\n", device_id, state ); |
if( netif->arp ){ |
message = async_send_2( netif->arp->phone, NET_ARP_TRANSLATE, netif->device_id, SERVICE_IP, & answer ); |
address.value = ( char * ) & netif->gateway; |
address.length = CONVERT_SIZE( in_addr_t, char, 1 ); |
if( ERROR_OCCURRED( measured_strings_send( netif->arp->phone, & address, 1 )) |
|| ERROR_OCCURRED( measured_strings_return( netif->arp->phone, & translation, & data, 1 ))){ |
async_wait_for( message, & result ); |
return result; |
} |
async_wait_for( message, & result ); |
if( ! ERROR_OCCURRED( result )){ |
printf( "\n\tgateway translated to\t= %X:%X:%X:%X:%X:%X", data[ 0 ], data[ 1 ], data[ 2 ], data[ 3 ], data[ 4 ], data[ 5 ] ); |
} |
ERROR_PROPAGATE( arp_translate_req( netif->arp->phone, netif->device_id, SERVICE_IP, & address, & translation, & data )); |
printf( "\n\tgateway translated to\t= %X:%X:%X:%X:%X:%X", data[ 0 ], data[ 1 ], data[ 2 ], data[ 3 ], data[ 4 ], data[ 5 ] ); |
free( translation ); |
free( data ); |
return result; |
} |
return EOK; |
} |
/branches/network/uspace/srv/net/netif/netif.c |
---|
145,20 → 145,8 |
if( !( address && data )) return EBADMEM; |
rwlock_read_lock( & netif_globals.lock ); |
if( ! ERROR_OCCURRED( netif_get_addr_message( device_id, & translation ))){ |
// * address = measured_string_create_bulk( translation.value, translation.length ); |
* address = ( measured_string_ref ) malloc( sizeof( measured_string_t )); |
if( * address ){ |
* data = ( char * ) malloc( translation.length + 1 ); |
if( * data ){ |
memcpy( * data, translation.value, translation.length + 1 ); |
( ** address ).value = * data; |
( ** address ).length = translation.length; |
rwlock_read_unlock( & netif_globals.lock ); |
return EOK; |
} |
free( * address ); |
} |
ERROR_CODE = ENOMEM; |
* address = measured_string_copy( & translation ); |
ERROR_CODE = ( * address ) ? EOK : ENOMEM; |
} |
rwlock_read_unlock( & netif_globals.lock ); |
return ERROR_CODE; |
/branches/network/uspace/srv/net/netif/dp8390/dp8390_module.c |
---|
239,7 → 239,7 |
uint8_t * data; |
data = packet_get_data( packet ); |
printf( "\nSending packet:\n\tid\t= %d\n\tlength\t= %d\n\tdata\t= %.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX\n\t\t%.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX", packet_get_id( packet ), packet_get_data_length( packet ), data[ 0 ], data[ 1 ], data[ 2 ], data[ 3 ], data[ 4 ], data[ 5 ], data[ 6 ], data[ 7 ], data[ 8 ], data[ 9 ], data[ 10 ], data[ 11 ], data[ 12 ], data[ 13 ], data[ 14 ], data[ 15 ], data[ 16 ], data[ 17 ], data[ 18 ], data[ 19 ], data[ 20 ], data[ 21 ], data[ 22 ], data[ 23 ], data[ 24 ], data[ 25 ], data[ 26 ], data[ 27 ], data[ 28 ], data[ 29 ], data[ 30 ], data[ 31 ], data[ 32 ], data[ 33 ], data[ 34 ], data[ 35 ], data[ 36 ], data[ 37 ], data[ 38 ], data[ 39 ], data[ 40 ], data[ 41 ], data[ 42 ], data[ 43 ], data[ 44 ], data[ 45 ], data[ 46 ], data[ 47 ], data[ 48 ], data[ 49 ], data[ 50 ], data[ 51 ], data[ 52 ], data[ 53 ], data[ 54 ], data[ 55 ], data[ 56 ], data[ 57 ], data[ 58 ], data[ 59 ] ); |
printf( "\nSending packet:\n\tid\t= %d\n\tlength\t= %d\n\tdata\t= %.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX\n\t\t%.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX\n", packet_get_id( packet ), packet_get_data_length( packet ), data[ 0 ], data[ 1 ], data[ 2 ], data[ 3 ], data[ 4 ], data[ 5 ], data[ 6 ], data[ 7 ], data[ 8 ], data[ 9 ], data[ 10 ], data[ 11 ], data[ 12 ], data[ 13 ], data[ 14 ], data[ 15 ], data[ 16 ], data[ 17 ], data[ 18 ], data[ 19 ], data[ 20 ], data[ 21 ], data[ 22 ], data[ 23 ], data[ 24 ], data[ 25 ], data[ 26 ], data[ 27 ], data[ 28 ], data[ 29 ], data[ 30 ], data[ 31 ], data[ 32 ], data[ 33 ], data[ 34 ], data[ 35 ], data[ 36 ], data[ 37 ], data[ 38 ], data[ 39 ], data[ 40 ], data[ 41 ], data[ 42 ], data[ 43 ], data[ 44 ], data[ 45 ], data[ 46 ], data[ 47 ], data[ 48 ], data[ 49 ], data[ 50 ], data[ 51 ], data[ 52 ], data[ 53 ], data[ 54 ], data[ 55 ], data[ 56 ], data[ 57 ], data[ 58 ], data[ 59 ] ); |
ERROR_PROPAGATE( find_device( device_id, & device )); |
dep = ( dpeth_t * ) device->specific; |
/branches/network/uspace/srv/net/netif/netif_wrappers.h |
---|
33,7 → 33,7 |
#ifndef __NET_NETIF_WRAPPERS_H__ |
#define __NET_NETIF_WRAPPERS_H__ |
#include <ipc/ipc.h> |
#include <ipc/services.h> |
#include "../structures/measured_strings.h" |
#include "../structures/packet/packet.h" |