Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4191 → Rev 4192

/branches/network/uspace/srv/net/structures/packet/packet_server.c
51,6 → 51,18
#include "packet_header.h"
#include "packet_server.h"
 
/** The default address length reserved for new packets.
*/
#define DEFAULT_ADDR_LEN 32
 
/** The default prefix reserved for new packets.
*/
#define DEFAULT_PREFIX 0
 
/** The default suffix reserved for new packets.
*/
#define DEFAULT_SUFFIX 0
 
/** Returns the packet identifier message parameter.
*/
#define IPC_GET_ID( call ) ( packet_id_t ) IPC_GET_ARG1( * call )
69,7 → 81,7
 
/** Returns the maximal suffix length message parameter.
*/
#define IPC_GET_SUFIX( call ) ( size_t ) IPC_GET_ARG4( * call )
#define IPC_GET_SUFFIX( call ) ( size_t ) IPC_GET_ARG4( * call )
 
#define FREE_QUEUES_COUNT 7
 
155,7 → 167,7
case IPC_M_PHONE_HUNGUP:
return EOK;
case NET_PACKET_CREATE_1:
packet = packet_get( 0, 0, IPC_GET_CONTENT( call ), 0 );
packet = packet_get( DEFAULT_ADDR_LEN, DEFAULT_PREFIX, IPC_GET_CONTENT( call ), DEFAULT_SUFFIX );
if( ! packet ) return ENOMEM;
* answer_count = 2;
IPC_SET_ARG1( * answer, packet->packet_id );
162,7 → 174,7
IPC_SET_ARG2( * answer, packet->length );
return EOK;
case NET_PACKET_CREATE_4:
packet = packet_get( IPC_GET_ADDR_LEN( call ), IPC_GET_PREFIX( call ), IPC_GET_CONTENT( call ), IPC_GET_SUFIX( call ));
packet = packet_get( IPC_GET_ADDR_LEN( call ), IPC_GET_PREFIX( call ), IPC_GET_CONTENT( call ), IPC_GET_SUFFIX( call ));
if( ! packet ) return ENOMEM;
* answer_count = 2;
IPC_SET_ARG1( * answer, packet->packet_id );