1 /* $OpenBSD: npppd_defs.h,v 1.8 2012/09/18 13:14:08 yasuoka Exp $ */ 2 3 /*- 4 * Copyright (c) 2009 Internet Initiative Japan Inc. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 1. Redistributions of source code must retain the above copyright 11 * notice, this list of conditions and the following disclaimer. 12 * 2. Redistributions in binary form must reproduce the above copyright 13 * notice, this list of conditions and the following disclaimer in the 14 * documentation and/or other materials provided with the distribution. 15 * 16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 */ 28 #ifndef NPPPD_DEFS_H 29 #define NPPPD_DEFS_H 1 30 31 #define NPPPD_MAX_POOLED_ADDRS 8192 32 #define NPPPD_USER_HASH_SIZ 1777 33 #define NPPPD_GENERIC_NAME_LEN 32 34 #ifndef LOG_NPPPD 35 #define LOG_NPPPD LOG_LOCAL1 36 #endif 37 38 #ifndef NPPPD_MAX_SERVERS 39 /** numbers of RADIUS servers */ 40 #define NPPPD_MAX_SERVERS 8 41 #endif 42 43 #ifndef NPPPD_TIMER_TICK_IVAL 44 #define NPPPD_TIMER_TICK_IVAL 4 45 #endif 46 47 /** interval time in seconds of authentication realm finalizer */ 48 #define NPPPD_AUTH_REALM_FINALIZER_INTERVAL 300 49 50 #ifndef NPPPD_MAX_IPCP_CONFIG 51 /** numbers of IPCP configurations */ 52 #define NPPPD_MAX_IPCP_CONFIG 1 53 #endif 54 55 #ifndef NPPPD_MAX_IFACE 56 /** numbers of PPP concentration interfaces */ 57 #define NPPPD_MAX_IFACE 1 58 #endif 59 60 #ifndef NPPPD_MAX_POOL 61 /** numbers of pool */ 62 #define NPPPD_MAX_POOL 1 63 #endif 64 65 #ifndef NPPPD_MAX_PPTP 66 /** numbers of local authentication realms */ 67 #define NPPPD_MAX_PPTP 2 68 #endif 69 70 #ifndef NPPPD_DEFAULT_AUTH_LOCAL_RELOADABLE 71 #define NPPPD_DEFAULT_AUTH_LOCAL_RELOADABLE 0 72 #endif 73 74 /** default value of maximum PPP sessions per user */ 75 #define NPPPD_DEFAULT_USER_MAX_PPP 3 76 77 #ifndef NPPPD_DEFAULT_MAX_PPP 78 /** default value of maximum PPP sessions in system */ 79 #define NPPPD_DEFAULT_MAX_PPP 8192 80 #endif 81 82 #ifndef LOOPBACK_IFNAME 83 #define LOOPBACK_IFNAME "lo0" 84 #endif 85 86 #ifndef countof 87 #define countof(x) (sizeof(x) / sizeof((x)[0])) 88 #endif 89 90 #endif 91