Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

setting.c File Reference

#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
#include "setting.h"
#include "options.h"
#include "errors.h"
#include "config.h"

Defines

#define INITIAL_MSS   2048
#define INITIAL_EXP_TIME   10000000
#define INITIAL_RTO_TIME   3
#define INITIAL_SBUFFERS_MAX_SIZE   0
#define INITIAL_RBUFFERS_MAX_SIZE   0
#define INITIAL_RBUFFERS_RED_LIMIT   0
#define DEFAULT_RED_DROP_PROBABILITY   20
#define DEFAULT_RETRIES_TIMEOUT   15
#define DEFAULT_MAX_ACKS_COUNT   50

Functions

int setting_set_defaults (void)
int setting_read_file (char *filename)

Detailed Description

ARTP library for reading and setting ARTP main settings.
Author:
Tomas Rebok
Date:
2004

Define Documentation

#define DEFAULT_MAX_ACKS_COUNT   50
 

initial maximal sequence numbers count in one acknowledgement packet

#define DEFAULT_RED_DROP_PROBABILITY   20
 

initial R.E.D. dropping probability (in percent)

#define DEFAULT_RETRIES_TIMEOUT   15
 

default timeout for retransmissions (maximal time for tries) (in seconds)

#define INITIAL_EXP_TIME   10000000
 

Initial expiration time (in microseconds)

#define INITIAL_MSS   2048
 

Initial maximum segment size

#define INITIAL_RBUFFERS_MAX_SIZE   0
 

initial maximal receive buffers size. When set to 0, buffer size will be unlimited. (in bytes)

#define INITIAL_RBUFFERS_RED_LIMIT   0
 

initial random early detection (R.E.D.) limit. This limit says when we want to applicate random packet dropping. It has no sense when maximal count is unlimited. When it's set to 0 or it's greater than maximal receive buffer size, it's not applied (buffer works as usual tail drop buffer).

#define INITIAL_RTO_TIME   3
 

initial retransmit timeout (in seconds)

#define INITIAL_SBUFFERS_MAX_SIZE   0
 

initial maximal send buffers size. When set to 0, buffer size will be unlimited. (in bytes)


Function Documentation

int setting_read_file char *    filename
 

Read setting from a file. This function reads setting from given file.

Parameters:
filename  the file name to be read (or NULL if no config file is required)
Returns:
zero success.
Returns:
nonzero related error code if something failed (for further information see documentation of file errors.h).

int setting_set_defaults void   
 

Set default setting. This functions sets the default setting to the relevant structure (global_setting).

Returns:
zero success.
Returns:
nonzero related error code if something failed (for further information see documentation of file errors.h).


Generated on Fri May 21 07:50:25 2004 for Active Router Transport Protocol (ARTP) by doxygen1.2.15