main.c File Reference

FLUTE multisession demo with two simultaneous session. More...

#include <stdlib.h>
#include <sys/stat.h>
#include <signal.h>
#include <stdio.h>
#include <time.h>
#include <windows.h>
#include <io.h>
#include <crtdbg.h>
#include <process.h>
#include "../flutelib/flute.h"

Include dependency graph for main.c:

Go to the source code of this file.

Data Structures

struct  thread_params

Defines

#define _DEBUG_MEMORY   0

Typedefs

typedef thread_params thread_params_t

Functions

void signal_handler (int sig)
void usage (void)
void * start_flute_process (void *t_par)
int main (int argc, char **argv)


Detailed Description

FLUTE multisession demo with two simultaneous session.

Author
peltotal
Date
2007/02/28 08:58:01
Revision
1.14

MAD-FLUTE: FLUTE application. 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 main.c.


Define Documentation

#define _DEBUG_MEMORY   0

Run time memory debug (0 = no, 1 = yes)

Definition at line 57 of file main.c.


Typedef Documentation

typedef struct thread_params thread_params_t


Function Documentation

int main ( int  argc,
char **  argv 
)

This function is programs main function.

Parameters:
argc number of command line arguments
argv pointer to command line arguments
Returns:
different values (0, -1, -2, -3) depending on how program ends

Definition at line 334 of file main.c.

References thread_params::a, alc_arguments::addr, alc_arguments::addr_family, arguments::alc_a, increase_ipv6_address(), MAX_PORT_LENGTH, parse_args(), alc_arguments::port, signal_handler(), start_up_flute(), alc_arguments::tsi, and usage().

Here is the call graph for this function:

void signal_handler ( int  sig  ) 

This is a private function which receives and handles signals.

Parameters:
sig must be, not used for anything

Definition at line 78 of file main.c.

References set_all_flute_sessions_state(), and SExiting.

Here is the call graph for this function:

void* start_flute_process ( void *  t_par  ) 

This function start FLUTE receiver or sender in thread.

Parameters:
t_par thread parameter structure

Definition at line 293 of file main.c.

References thread_params::a, arguments::alc_a, flute_receiver(), flute_sender(), alc_arguments::mode, RECEIVER, thread_params::s_id, SENDER, thread_params::session_size, and alc_arguments::verbosity.

Here is the call graph for this function:

void usage ( void   ) 

This function prints programs usage information.

Definition at line 91 of file main.c.

References DEF_APD_CONF_FILE, DEF_BASE_DIR, DEF_CC, DEF_FDT, DEF_FEC, 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_SESSION_DURATION, DEF_SYMB_LENGTH, DEF_TSI, DEF_TTL, DEF_TX_NB, DEF_TX_RATE, MAD_FCL_RELEASE_DATE, MAD_FCL_RELEASE_VERSION, P_LOSS_WHEN_LOSS, and P_LOSS_WHEN_OK.


Generated on Fri Mar 9 20:01:51 2007 for MAD-FCL by  doxygen 1.5.0