alc_tx.h File Reference

ALC level sending. More...

#include "defines.h"

Include dependency graph for alc_tx.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


int alc_send (int s_id, int tx_mode, char *buf, int buf_len, unsigned long long toi, unsigned long long transfer_len, unsigned short es_len, unsigned int max_sb_len, unsigned int sbn, unsigned char fec_enc_id, unsigned short fec_inst_id)
int send_session_close_packet (int s_id)
void * tx_thread (void *s)

Detailed Description

ALC level sending.

2007/02/26 13:48:19

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: and

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 alc_tx.h.

Function Documentation

int alc_send ( int  s_id,
int  tx_mode,
char *  buf,
int  buf_len,
unsigned long long  toi,
unsigned long long  transfer_len,
unsigned short  es_len,
unsigned int  max_sb_len,
unsigned int  sbn,
unsigned char  fec_enc_id,
unsigned short  fec_inst_id 

This function sends source block from object to the channel or transmission queue.

s_id session identifier
tx_mode transmission mode (NO_TX_THREAD or TX_THREAD)
buf pointer to data to be sent
buf_len lenght of data to be sent
toi transport object identifier
transfer_len length of transport object
es_len encoding symbol length
max_sb_len maximum source block length
sbn source block number
fec_enc_id,: FEC encoding id
fec_inst_id,: FEC instance id
Return: int: number of sent bytes after succesfull sending, -1 -2 otherwise

Definition at line 598 of file alc_tx.c.

References alc_session::addr_family, alc_session::ch_list, COM_FEC_ENC_ID, COM_NO_C_FEC_ENC_ID, alc_session::def_fec_ratio, FDT_TOI, get_alc_session(), trans_block::n, null_fec_encode_src_block(), REED_SOL_FEC_INST_ID, RS_FEC_ENC_ID, rs_fec_encode_src_block(), SActive, SB_LB_E_FEC_ENC_ID, SB_SYS_FEC_ENC_ID, SExiting, SIMPLE_XOR_FEC_ENC_ID, SPaused, alc_session::state, TX_THREAD, trans_block::unit_list, alc_session::use_fec_oti_ext_hdr, and xor_fec_encode_src_block().

Referenced by send_fdt_instance(), send_file(), and send_repair_data().

Here is the call graph for this function:

Here is the caller graph for this function:

int send_session_close_packet ( int  s_id  ) 

This function sends A flag packet to channel.

s_id session identifier
0 in success, -1 otherwise

Definition at line 940 of file alc_tx.c.

References add_session_sent_bytes(), alc_session::addr_family, alc_channel::addrinfo, ALC_VERSION, alc_session::cc_id, def_lct_hdr::cci, alc_channel::ch_id, alc_session::ch_list, def_lct_hdr::codepoint, alc_session::def_fec_enc_id, def_lct_hdr::flag_a, def_lct_hdr::flag_b, def_lct_hdr::flag_c, def_lct_hdr::flag_h, def_lct_hdr::flag_o, def_lct_hdr::flag_r, def_lct_hdr::flag_s, def_lct_hdr::flag_t, get_alc_session(), def_lct_hdr::hdr_len, mad_rlc_fill_header(), MAX_PACKET_LENGTH, def_lct_hdr::reserved, RLC, alc_channel::s, alc_session::tsi, alc_channel::tx_sock, and def_lct_hdr::version.

Referenced by flute_sender().

Here is the call graph for this function:

Here is the caller graph for this function:

void* tx_thread ( void *  s  ) 

This function sends packets to the all channels in the session when TX_THREAD mode is used.

s pointer to the session

Definition at line 1032 of file alc_tx.c.

References calculate_packet_length(), alc_session::calculate_session_size, alc_session::cc_id, alc_session::ch_list, alc_session::def_tx_rate, FALSE, alc_session::nb_channel, alc_session::optimize_tx_rate, RLC, SActive, sec(), alc_channel::start_sending, alc_session::state, alc_session::tx_queue_begin, and alc_channel::wait_after_sp.

Referenced by open_alc_session().

Here is the call graph for this function:

Here is the caller graph for this function:

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