/* * Active Router Transport Protocol (ARTP) implementation * Copyright (c) 2004, Tomas Rebok * All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the "BSD License" which is * distributed with the software in the file LICENSE. * * 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 BSD * License for more details. */ /** @file * @c ARTP library for reading and setting @c ARTP settings. * @author Tomas Rebok * @date 2004 */ #ifndef ARTP_SETTING_H #define ARTP_SETTING_H 1 #include #include "types.h" /** Type of a structure for saving global ARTP settings */ struct Tsetting { /** maximum segment size */ unsigned int initial_mss; /** expiration time */ TS_TYPE initial_exp_time; /** retransmit timeout */ double initial_rto_time; /** retries (for retransmissions) timeout */ unsigned int default_retries_timeout; /** maximal sending buffer size */ unsigned long int initial_sbuffers_max_size; /** maximal receiving buffer size */ unsigned long int initial_rbuffers_max_size; /** the random early detection (R.E.D.) limit */ unsigned long int initial_rbuffers_red_limit; /** R.E.D. dropping probability */ int default_red_drop_probability; /** maximal sequence numbers count in one acknowledgement packet */ unsigned int default_max_acks_count; }; /** Structure for saving global ARTP settings */ struct Tsetting global_setting; /** Set default setting. * This functions sets the default setting to the relevant structure * (global_setting). * * @return zero * success. * * @return nonzero * related error code if something failed (for further information see * documentation of file @c errors.h). */ extern int setting_set_defaults(void); /** Read setting from a file. * This function reads setting from given file. * * @param filename * the file name to be read (or NULL if no config file is required) * * @return zero * success. * * @return nonzero * related error code if something failed (for further information see * documentation of file @c errors.h). */ extern int setting_read_file(char *filename); #endif /* vim: set ts=4 : */