157e22627SCy Schubert /* 257e22627SCy Schubert * Copyright (c) 2002 - 2003 357e22627SCy Schubert * NetGroup, Politecnico di Torino (Italy) 457e22627SCy Schubert * All rights reserved. 557e22627SCy Schubert * 657e22627SCy Schubert * Redistribution and use in source and binary forms, with or without 757e22627SCy Schubert * modification, are permitted provided that the following conditions 857e22627SCy Schubert * are met: 957e22627SCy Schubert * 1057e22627SCy Schubert * 1. Redistributions of source code must retain the above copyright 1157e22627SCy Schubert * notice, this list of conditions and the following disclaimer. 1257e22627SCy Schubert * 2. Redistributions in binary form must reproduce the above copyright 1357e22627SCy Schubert * notice, this list of conditions and the following disclaimer in the 1457e22627SCy Schubert * documentation and/or other materials provided with the distribution. 1557e22627SCy Schubert * 3. Neither the name of the Politecnico di Torino nor the names of its 1657e22627SCy Schubert * contributors may be used to endorse or promote products derived from 1757e22627SCy Schubert * this software without specific prior written permission. 1857e22627SCy Schubert * 1957e22627SCy Schubert * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 2057e22627SCy Schubert * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 2157e22627SCy Schubert * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 2257e22627SCy Schubert * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 2357e22627SCy Schubert * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2457e22627SCy Schubert * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2557e22627SCy Schubert * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2657e22627SCy Schubert * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2757e22627SCy Schubert * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2857e22627SCy Schubert * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 2957e22627SCy Schubert * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3057e22627SCy Schubert * 3157e22627SCy Schubert */ 3257e22627SCy Schubert 3357e22627SCy Schubert #ifndef __CONFIG_PARAMS_H__ 3457e22627SCy Schubert #define __CONFIG_PARAMS_H__ 3557e22627SCy Schubert 3657e22627SCy Schubert // 3757e22627SCy Schubert // Parameters set from the configuration file. 3857e22627SCy Schubert // 3957e22627SCy Schubert 4057e22627SCy Schubert #define MAX_LINE 2048 /* Maximum chars allowed for the host list (in passive mode) */ 4157e22627SCy Schubert #define MAX_HOST_LIST 64000 4257e22627SCy Schubert #define MAX_ACTIVE_LIST 10 4357e22627SCy Schubert 4457e22627SCy Schubert struct active_pars 4557e22627SCy Schubert { 4657e22627SCy Schubert char address[MAX_LINE + 1]; // keeps the network address (either numeric or literal) to of the active client 4757e22627SCy Schubert char port[MAX_LINE + 1]; // keeps the network port to bind to 48*afdbf109SJoseph Mingrone int ai_family; // address family to use 4957e22627SCy Schubert }; 5057e22627SCy Schubert 5157e22627SCy Schubert extern char hostlist[MAX_HOST_LIST + 1]; //!< Keeps the list of the hosts that are allowed to connect to this server 5257e22627SCy Schubert extern struct active_pars activelist[MAX_ACTIVE_LIST]; //!< Keeps the list of the hosts (host, port) on which I want to connect to (active mode) 5357e22627SCy Schubert extern int nullAuthAllowed; //!< '1' if we permit NULL authentication, '0' otherwise 5457e22627SCy Schubert extern char loadfile[MAX_LINE + 1]; //!< Name of the file from which we have to load the configuration 5557e22627SCy Schubert 5657e22627SCy Schubert #endif 57