parse_args.c File Reference

Parse command line argumets. More...

#include <stdlib.h>
#include <fcntl.h>
#include <errno.h>
#include <assert.h>
#include <time.h>
#include <string.h>
#include <stdio.h>
#include <io.h>
#include "parse_args.h"

Include dependency graph for parse_args.c:

Go to the source code of this file.


int parse_args (int argc, char **argv, arguments_t *a)
int parse_sdp_file (arguments_t *a, char addrs[MAX_CHANNELS_IN_SESSION][INET6_ADDRSTRLEN], char ports[MAX_CHANNELS_IN_SESSION][MAX_PORT_LENGTH], char *sdp_buf)
void free_args (arguments_t *a)

Detailed Description

Parse command line argumets.

2007/02/28 08:58:01

MAD-FLUTELIB: Implementation of FLUTE 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 parse_args.c.

Function Documentation

void free_args ( arguments_t a  ) 

This function free arguments structure.

a arguments structure where command line arguments are parsed

Definition at line 1261 of file parse_args.c.

References arguments::log_fd, arguments::sdp, arguments::sdp_file, sdp_message_free(), sf_free(), and arguments::src_filt.

Here is the call graph for this function:

int parse_args ( int  argc,
char **  argv,
arguments_t a 

This function validates and parses command line arguments.

argc number of command line arguments
argv pointer to command line arguments
a arguments structure where command line arguments are parsed
0 in success, -1 otherwise

Definition at line 49 of file parse_args.c.

References alc_arguments::accept_expired_fdt_inst, alc_arguments::addr, alc_arguments::addr_family, alc_arguments::addr_type, arguments::alc_a, alc_arguments::base_dir, alc_arguments::calculate_session_size, alc_arguments::cc_id, COM_FEC_ENC_ID, COM_NO_C_FEC_ENC_ID, arguments::complete_fdt, arguments::cont, DEF_ADDR_FAMILY, DEF_APD_CONF_FILE, DEF_BASE_DIR, DEF_CC, DEF_FDT, DEF_FEC, DEF_FEC_ENC_ID, DEF_FEC_INST_ID, DEF_FEC_RATIO, DEF_FLUTE_CONF_FILE, DEF_MAX_SB_LEN, DEF_MCAST_IPv4_ADDR, DEF_MCAST_IPv6_ADDR, DEF_MCAST_PORT, DEF_NB_CHANNEL, DEF_RECEIVER_TIMEOUT, DEF_REPAIR_SENDER_CONF_FILE, DEF_SESSION_DURATION, DEF_SYMB_LENGTH, DEF_TSI, DEF_TTL, DEF_TX_NB, DEF_TX_RATE, alc_arguments::encode_content, alc_arguments::es_len, FALSE, arguments::fdt_file, FDT_TOI, alc_arguments::fec_enc_id, alc_arguments::fec_inst_id, alc_arguments::fec_ratio, arguments::file_path, arguments::file_table_output, alc_arguments::half_word, alc_arguments::intface, alc_arguments::intface_name, arguments::log_fd, alc_arguments::loss_ratio1, alc_arguments::loss_ratio2, MAX_CHANNELS_IN_SESSION, MAX_N_REED_SOLOMON, MAX_PATH_LENGTH, alc_arguments::max_sb_len, MAX_SB_LEN_NULL_FEC, MAX_SB_LEN_SIMPLE_XOR_FEC, MAX_SYMB_LENGTH_IPv4_FEC_ID_0_3_130, MAX_SYMB_LENGTH_IPv4_FEC_ID_2_128_129, MAX_SYMB_LENGTH_IPv6_FEC_ID_0_3_130, MAX_SYMB_LENGTH_IPv6_FEC_ID_2_128_129, alc_arguments::mode, arguments::name_incomplete_objects, alc_arguments::nb_channel, alc_arguments::nb_tx, arguments::open_file, alc_arguments::optimize_tx_rate, P_LOSS_WHEN_LOSS, P_LOSS_WHEN_OK, alc_arguments::port, RECEIVER, REED_SOL_FEC_INST_ID, arguments::repair, RS_FEC_ENC_ID, arguments::rx_automatic, alc_arguments::rx_memory_mode, arguments::rx_object, SB_LB_E_FEC_ENC_ID, SB_SYS_FEC_ENC_ID, arguments::sdp_file, arguments::send_session_close_packets, SENDER, SIMPLE_XOR_FEC_ENC_ID, alc_arguments::simul_losses, alc_arguments::src_addr, alc_arguments::start_time, alc_arguments::stop_time, arguments::toi, TRUE, alc_arguments::tsi, alc_arguments::ttl, alc_arguments::tx_rate, alc_arguments::use_fec_oti_ext_hdr, alc_arguments::use_ssm, and alc_arguments::verbosity.

Referenced by main().

Here is the caller graph for this function:

int parse_sdp_file ( arguments_t a,
char *  sdp_buf 

This function parses session information from the SDP file.

a arguments structure where command line arguments are parsed
addrs multiccast addresses
ports local port numbers
sdp_buf buffer containing session description to be parsed
0 in success, -1 otherwise

Definition at line 902 of file parse_args.c.

References alc_arguments::addr, alc_arguments::addr_family, arguments::alc_a, COM_NO_C_FEC_ENC_ID, arguments::cont, FALSE, fec_dec_char2struct(), fec_dec_free(), fec_dec::fec_enc_id, alc_arguments::fec_enc_id, alc_arguments::fec_inst_id, fec_dec::fec_inst_id, increase_ipv6_address(), fec_dec::index, alc_arguments::nb_channel, fec_dec::next, REED_SOL_FEC_INST_ID, RS_FEC_ENC_ID, SB_SYS_FEC_ENC_ID, arguments::sdp, sdp_attr_get(), sdp_fec_dec_get(), sdp_message_a_att_field_get(), sdp_message_a_att_value_get(), sdp_message_c_addr_get(), sdp_message_c_addr_multicast_int_get(), sdp_message_c_addrtype_get(), sdp_message_endof_media(), sdp_message_init(), sdp_message_m_number_of_port_get(), sdp_message_m_payload_get(), sdp_message_m_port_get(), sdp_message_m_proto_get(), sdp_message_parse(), sdp_message_t_start_time_get(), sdp_message_t_stop_time_get(), sf_char2struct(), SIMPLE_XOR_FEC_ENC_ID, alc_arguments::src_addr, sf::src_addr, arguments::src_filt, start_time, alc_arguments::start_time, alc_arguments::stop_time, TRUE, and alc_arguments::tsi.

Referenced by flute_file_repair(), flute_receiver_report(), flute_sender(), and repair_sender().

Here is the call graph for this function:

Here is the caller graph for this function:

Generated on Fri Mar 9 20:03:06 2007 for MAD-FCL by  doxygen 1.5.0