Annotation of embedaddon/coova-chilli/src/limits.h, revision 1.1.1.1
1.1 misho 1: /*
2: * Copyright (C) 2003-2005 Mondru AB.
3: * Copyright (c) 2006-2007 David Bird <david@coova.com>
4: *
5: * The contents of this file may be used under the terms of the GNU
6: * General Public License Version 2, provided that the above copyright
7: * notice and this permission notice is included in all copies or
8: * substantial portions of the software.
9: *
10: */
11: #ifndef _LIMITS_H
12: #define _LIMITS_H
13:
14: /*
15: * extracted from various .h files, needs some cleanup.
16: */
17:
18: /* chilli */
19: #define LEAKY_BUCKET 1
20: /* If the constants below are defined packets which have been dropped
21: by the traffic shaper will be counted towards accounting and
22: volume limitation */
23: /* #define COUNT_DOWNLINK_DROP 1 */
24: /* #define COUNT_UPLINK_DROP 1 */
25:
26: /*#define BUCKET_SIZE 300000 -* Size of leaky bucket (~200 packets) */
27: /* Time length of leaky bucket in milliseconds */
28: /* Bucket size = BUCKET_TIME * Bandwidth-Max radius attribute */
29: /* Not used if BUCKET_SIZE is defined */
30: #define BUCKET_TIME 5000 /* 5 seconds */
31: #define BUCKET_SIZE_MIN 15000 /* Minimum size of leaky bucket (~10 packets) */
32: #define CHECK_INTERVAL 3 /* Time between checking connections */
33:
34: /* options */
35: #define OPT_IPADDRLEN 256
36: #define OPT_IDLETIME 10 /* Options idletime between each select */
37: #define MAX_PASS_THROUGHS 128 /* Max number of allowed UAM pass-throughs */
38: #define UAMSERVER_MAX 8
39: #define MACOK_MAX 16
40:
41: /* redir */
42: #define REDIR_MAXLISTEN 32
43: #define REDIR_MAXTIME 100 /* Seconds */
44: #define REDIR_HTTP_MAX_TIME 10 /* Seconds */
45: #define REDIR_HTTP_SELECT_TIME 500000 /* microseconds = 0.5 seconds */
46: #define REDIR_RADIUS_MAX_TIME 60 /* Seconds */
47: #define REDIR_RADIUS_SELECT_TIME 500000 /* microseconds = 0.5 seconds */
48: #define REDIR_CHALLEN 16
49: #define REDIR_MD5LEN 16
50: #define REDIR_MACSTRLEN 17
51: #define REDIR_MAXCHAR 64 /* 1024 */
52: #define REDIR_MAXBUFFER 5125
53:
54: #define REDIR_USERNAMESIZE 256 /* Max length of username */
55: #define REDIR_MAXQUERYSTRING 2048
56: #define REDIR_USERURLSIZE 2048 /* Max length of URL requested by user */
57: #define REDIR_USERAGENTSIZE 256
58: #define REDIR_LANGSIZE 16
59: #define REDIR_IDENTSIZE 16
60:
61: #define REDIR_MAXCONN 16
62:
63: #define REDIR_CHALLENGETIMEOUT1 300 /* Seconds */
64: #define REDIR_CHALLENGETIMEOUT2 600 /* Seconds */
65:
66: #define REDIR_URL_LEN 2048
67: #define REDIR_SESSIONID_LEN 17
68:
69: /* chilli */
70: #define APP_NUM_CONN 1024
71: #define EAP_LEN 2048 /* TODO: Rather large */
72: #define MACSTRLEN 17
73: #define MS2SUCCSIZE 40 /* MS-CHAPv2 authenticator response as ASCII */
74: #define DATA_LEN 1500 /* Max we allow */
75: #define USERNAMESIZE 256 /* Max length of username */
76: #define CHALLENGESIZE 24 /* From chap.h MAX_CHALLENGE_LENGTH */
77: #define USERURLSIZE 256 /* Max length of URL requested by user */
78:
79: /* dhcp */
80: #define DHCP_DEBUG 0 /* Print debug information */
81: #define DHCP_MTU 1492 /* Maximum MTU size */
82:
83: /* radius */
84: #define RADIUS_SECRETSIZE 128 /* No secrets that long */
85: #define RADIUS_MD5LEN 16 /* Length of MD5 hash */
86: #define RADIUS_AUTHLEN 16 /* RFC 2865: Length of authenticator */
87: #define RADIUS_PWSIZE 128 /* RFC 2865: Max 128 octets in password */
88: #define RADIUS_QUEUESIZE 256 /* Same size as id address space */
89: #define RADIUS_ATTR_VLEN 253
90: #define RADIUS_PACKSIZE 4096
91: #define RADIUS_HDRSIZE 20
92: #define RADIUS_PASSWORD_LEN 16
93: #define RADIUS_MPPEKEYSSIZE 32 /* Length of MS_CHAP_MPPE_KEYS attribute */
94:
95: #endif
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>