transport.c File Reference

Transport structures and functions. More...

#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <assert.h>
#include <string.h>
#include <io.h>
#include "transport.h"

Include dependency graph for transport.c:

Go to the source code of this file.

Functions

trans_obj_tcreate_object (void)
trans_block_tcreate_block (void)
trans_unit_tcreate_units (unsigned int number)
void free_units (trans_block_t *tb)
trans_unit_tretrieve_unit (alc_session_t *s, unsigned short es_len)
void free_units2 (trans_block_t *tb)
void insert_object (trans_obj_t *to, alc_session_t *s, int type)
int insert_unit (trans_unit_t *tu, trans_block_t *tb, trans_obj_t *to)
void free_object (trans_obj_t *to, alc_session_t *s, int type)


Detailed Description

Transport structures and functions.

Author
peltotal
Date
2007/02/28 08:58:00
Revision
1.43

MAD-ALCLIB: Implementation of ALC/LCT protocols, Compact No-Code FEC, Simple XOR FEC, Reed-Solomon FEC, and RLC Congestion Control protocol. Copyright (c) 2003-2007 TUT - Tampere University of Technology main authors/contacts: jani.peltotalo@tut.fi and sami.peltotalo@tut.fi

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

In addition, as a special exception, TUT - Tampere University of Technology gives permission to link the code of this program with the OpenSSL library (or with modified versions of OpenSSL that use the same license as OpenSSL), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than OpenSSL. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.

Definition in file transport.c.


Function Documentation

trans_block_t* create_block ( void   ) 

This function creates new transport block structure.

Returns:
pointer to created transport block in success, NULL otherwise

Definition at line 58 of file transport.c.

Referenced by null_fec_encode_src_block(), rs_fec_encode_src_block(), and xor_fec_encode_src_block().

Here is the caller graph for this function:

trans_obj_t* create_object ( void   ) 

This function creates new transport object structure.

Returns:
pointer to created transport object in success, NULL otherwise

Definition at line 46 of file transport.c.

Referenced by analyze_packet(), and http_file_repair().

Here is the caller graph for this function:

trans_unit_t* create_units ( unsigned int  number  ) 

This function creates new transport unit structures.

Parameters:
number number of units to be created
Returns:
pointer to created transport unit/tranport unit list in success, NULL otherwise

Definition at line 70 of file transport.c.

Referenced by analyze_packet(), null_fec_encode_src_block(), parse_data(), rs_fec_encode_src_block(), xor_fec_decode_src_block(), and xor_fec_encode_src_block().

Here is the caller graph for this function:

void free_object ( trans_obj_t to,
alc_session_t s,
int  type 
)

This function frees transport object structure.

Parameters:
to pointer to transport object to be freed
s pointer to the session
type type of the object to be freed (0 = FDT Instance, 1 = normal object)

Definition at line 501 of file transport.c.

References trans_obj::block_list, trans_obj::bs, trans_unit::data, blocking_struct::N, trans_unit::next, and trans_block::unit_list.

Referenced by alc_recv(), alc_recv2(), alc_recv3(), fdt_recv(), and name_incomplete_objects().

Here is the caller graph for this function:

void free_units ( trans_block_t tb  ) 

This function frees transport units from transport block.

Parameters:
tb pointer to transport block

Definition at line 81 of file transport.c.

References trans_unit::data, trans_unit::next, and trans_block::unit_list.

Referenced by analyze_packet().

Here is the caller graph for this function:

void free_units2 ( trans_block_t tb  ) 

This function frees transport units from transport block. This version just marks the transport units available.

Parameters:
tb pointer to the transport block

Definition at line 168 of file transport.c.

References trans_unit::data, trans_unit::len, trans_unit::next, and trans_block::unit_list.

Referenced by analyze_packet().

Here is the caller graph for this function:

void insert_object ( trans_obj_t to,
alc_session_t s,
int  type 
)

This function inserts transport object to the session.

Parameters:
to pointer to transport object to be inserted
s pointer to the session
type type of object to be inserted (0 = FDT Instance, 1 = normal object)

Definition at line 264 of file transport.c.

References alc_session::fdt_list, trans_obj::next, alc_session::obj_list, trans_obj::prev, and trans_obj::toi.

Referenced by analyze_packet(), and http_file_repair().

Here is the caller graph for this function:

int insert_unit ( trans_unit_t tu,
trans_block_t tb,
trans_obj_t to 
)

This function inserts transport unit to transport block.

Parameters:
tu pointer to transport unit to be inserted
tb pointer to transport block
to pointer to transport object
Returns:
0 when transport unit is inserted, 1 when duplicated transport unit

Definition at line 420 of file transport.c.

References trans_unit::esi, trans_unit::len, trans_obj::len, trans_block::nb_of_rx_units, trans_unit::next, trans_unit::prev, trans_obj::rx_bytes, and trans_block::unit_list.

Referenced by analyze_packet(), and parse_data().

Here is the caller graph for this function:

trans_unit_t* retrieve_unit ( alc_session_t s,
unsigned short  es_len 
)

This function looks for a transport unit structure in the transport block pool.

Parameters:
s pointer to the current session from where extract to transport units
es_len wanted encoding symbol length
Returns:
pointer to available (or created) unit in success, NULL otherwise.

Definition at line 105 of file transport.c.

References trans_unit::data, alc_session::last_given, trans_unit::len, trans_unit_container::next, trans_unit_container::u, alc_session::unit_pool, and trans_unit::used.

Referenced by analyze_packet(), and parse_data().

Here is the caller graph for this function:


Generated on Fri Mar 9 20:08:55 2007 for MAD-FCL by  doxygen 1.5.0