packet.c File Reference

DROPS Stream Interface. More...

Go to the source code of this file.

Defines

#define DO_PACKET_NUMBERING   0
#define set_socket_flag(s, f)
#define reset_socket_flag(s, f)

Functions

static int __is_valid_packet (dsi_socket_t *socket, dsi_packet_t *packet)
 Check if packet points to a valid packet descriptor of socket.
static int __get_packet_index (dsi_socket_t *socket, dsi_packet_t *packet)
 Calculate packet index.
static int __send_release_notification (dsi_socket_t *socket, dsi_packet_t *packet)
 Send release packet notification to send component.
static int __get_sg_elem (dsi_socket_t *socket, int *sg_elem)
 Find unused scatter gather list element.
static int __get_send_packet (dsi_socket_t *socket, int *packet)
 Try to lock next send packet in packet ring list.
static void __map_receive_data (dsi_socket_t *socket, int packet_idx)
 Map packet data.
static void __copy_receive_data (dsi_socket_t *socket, int packet_idx)
 Copy packet data.
static int __get_receive_packet (dsi_socket_t *socket, int *packet)
 Try to lock next receive packet in packet ring list.
static int __commit_send_packet (dsi_socket_t *socket, dsi_packet_t *packet)
 Commit send packet.
static int __commit_receive_packet (dsi_socket_t *socket, dsi_packet_t *packet)
 Commit (release) received packet.
int dsi_packet_get (dsi_socket_t *socket, dsi_packet_t **packet)
 Request next send/receive packet.
int dsi_packet_get_abort (dsi_socket_t *socket)
 Abort an ongoing packet_get() in the work-thread.
int dsi_packet_get_nr (dsi_socket_t *socket, unsigned nr, dsi_packet_t **packet)
 Wait for specific packet.
int dsi_packet_commit (dsi_socket_t *socket, dsi_packet_t *packet)
 Commit send / release receive packet.
int dsi_packet_add_data (dsi_socket_t *socket, dsi_packet_t *packet, void *addr, l4_size_t size, l4_uint32_t flags)
 Add data area to packet's scatter gather list.
int dsi_packet_get_data (dsi_socket_t *socket, dsi_packet_t *packet, void **addr, l4_size_t *size)
 Get next data area from packet.
int dsi_packet_set_no (dsi_socket_t *socket, dsi_packet_t *packet, l4_uint32_t no)
 Set packet number.
int dsi_packet_get_no (dsi_socket_t *socket, dsi_packet_t *packet, l4_uint32_t *no)
 Get packet number.


Detailed Description

DROPS Stream Interface.

DSI packet handling.

Date:
07/01/2000
Author:
Lars Reuther <reuther@os.inf.tu-dresden.de>
Note:
To avoid the automatic packet numbering, set DO_PACKET_NUMBERING to 0. The packet number can be set using the dsi_packet_set_no function.

Definition in file packet.c.


Define Documentation

#define reset_socket_flag ( s,
 ) 

Value:

__asm__ __volatile__ (          \
        "andl   %1,%0   \n\t"           \
        :                               \
        :"m" ((s)->flags), "g" (~f)     \
        :"memory"                       \
        )

Definition at line 68 of file packet.c.

#define set_socket_flag ( s,
 ) 

Value:

__asm__ __volatile__ (          \
        "orl    %1,%0   \n\t"           \
        :                               \
        :"m" ((s)->flags), "g" (f)      \
        :"memory"                       \
        )

Definition at line 60 of file packet.c.


Function Documentation

static void __copy_receive_data ( dsi_socket_t socket,
int  packet_idx 
) [inline, static]

Copy packet data.

Parameters:
socket Socket descriptor
packet_idx Packet index
Call send component to copy packet data.

Definition at line 350 of file packet.c.

References dsi_socket::data_area, dsi_socket::data_size, dsi_socket::remote_socket, and dsi_socket_ref::sync_th.

Referenced by __get_receive_packet().

static void __map_receive_data ( dsi_socket_t socket,
int  packet_idx 
) [inline, static]

Map packet data.

Parameters:
socket Socket descriptor
packet_idx Packet index
Call send component to map packet data.

Definition at line 321 of file packet.c.

References dsi_socket::data_area, dsi_socket::data_map_size, dsi_socket::remote_socket, and dsi_socket_ref::sync_th.

Referenced by __get_receive_packet().


Generated on Wed Apr 11 06:40:14 2012 for DSI - Drops Streaming Interface by  doxygen 1.5.6