packet_client.c File Reference

Packet client implementation. More...

#include <errno.h>
#include <mem.h>
#include <unistd.h>
#include <sys/mman.h>
#include <packet_client.h>
#include <packet_remote.h>
#include <net/packet.h>
#include <net/packet_header.h>

Go to the source code of this file.

Packet client interface

int packet_copy_data (packet_t *packet, const void *data, size_t length)
 Copies the specified data to the beginning of the actual packet content.
int packet_get_addr (const packet_t *packet, uint8_t **src, uint8_t **dest)
 Returns the stored packet addresses and their length.
packet_tpacket_get_copy (int phone, packet_t *packet)
 Returns the packet copy.
void * packet_get_data (const packet_t *packet)
 Returns the pointer to the beginning of the packet content.
size_t packet_get_data_length (const packet_t *packet)
 Returns the packet content length.
packet_id_t packet_get_id (const packet_t *packet)
 Returns the packet identifier.
void * packet_prefix (packet_t *packet, size_t length)
 Allocates the specified space right before the actual packet content and returns its pointer.
int packet_set_addr (packet_t *packet, const uint8_t *src, const uint8_t *dest, size_t addr_len)
 Sets the packet addresses.
void * packet_suffix (packet_t *packet, size_t length)
 Allocates the specified space right after the actual packet content and returns its pointer.
int packet_trim (packet_t *packet, size_t prefix, size_t suffix)
 Trims the actual packet content by the specified prefix and suffix lengths.


Detailed Description

Packet client implementation.

Definition in file packet_client.c.


Generated on Thu Jun 2 07:45:53 2011 for HelenOS/USB by  doxygen 1.4.7