~ps10gel/ubuntu/xenial/trafficserver/6.2.0

« back to all changes in this revision

Viewing changes to proxy/Main.h

  • Committer: Bazaar Package Importer
  • Author(s): Arno Toell
  • Date: 2011-01-13 11:49:18 UTC
  • Revision ID: james.westby@ubuntu.com-20110113114918-vu422h8dknrgkj15
Tags: upstream-2.1.5-unstable
ImportĀ upstreamĀ versionĀ 2.1.5-unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/** @file
 
2
 
 
3
  A brief file description
 
4
 
 
5
  @section license License
 
6
 
 
7
  Licensed to the Apache Software Foundation (ASF) under one
 
8
  or more contributor license agreements.  See the NOTICE file
 
9
  distributed with this work for additional information
 
10
  regarding copyright ownership.  The ASF licenses this file
 
11
  to you under the Apache License, Version 2.0 (the
 
12
  "License"); you may not use this file except in compliance
 
13
  with the License.  You may obtain a copy of the License at
 
14
 
 
15
      http://www.apache.org/licenses/LICENSE-2.0
 
16
 
 
17
  Unless required by applicable law or agreed to in writing, software
 
18
  distributed under the License is distributed on an "AS IS" BASIS,
 
19
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
20
  See the License for the specific language governing permissions and
 
21
  limitations under the License.
 
22
 */
 
23
 
 
24
/****************************************************************************
 
25
 
 
26
  Main.h
 
27
 
 
28
  This is the primary include file for the proxy cache system.
 
29
 
 
30
 
 
31
 ****************************************************************************/
 
32
 
 
33
#ifndef _Main_h_
 
34
#define _Main_h_
 
35
 
 
36
#include "libts.h"
 
37
#include "Regression.h"
 
38
#include "I_Version.h"
 
39
 
 
40
 
 
41
//
 
42
// Constants
 
43
//
 
44
#define DOMAIN_NAME_MAX       255
 
45
#define PATH_NAME_MAX         511
 
46
 
 
47
#define ET_CACHE ET_CALL
 
48
 
 
49
// TODO: consolidate location of these defaults
 
50
#define DEFAULT_ROOT_DIRECTORY            PREFIX
 
51
#define DEFAULT_LOCAL_STATE_DIRECTORY     "var/trafficserver"
 
52
#define DEFAULT_SYSTEM_CONFIG_DIRECTORY   "etc/trafficserver"
 
53
#define DEFAULT_LOG_DIRECTORY             "var/log/trafficserver"
 
54
 
 
55
//
 
56
// Global Data
 
57
//
 
58
// Global Configuration
 
59
extern int accept_till_done;
 
60
//extern int ssl_accept_port_number;
 
61
//extern int ssl_enabled;
 
62
extern int http_accept_port_number;
 
63
extern int http_accept_file_descriptor;
 
64
extern int command_flag;
 
65
extern int auto_clear_hostdb_flag;
 
66
extern int auto_clear_cache_flag;
 
67
extern int lock_process;
 
68
extern int fds_limit;
 
69
extern int debug_level;
 
70
extern char cluster_host[DOMAIN_NAME_MAX + 1];
 
71
extern int cluster_port_number;
 
72
extern char proxy_name[DOMAIN_NAME_MAX + 1];
 
73
 
 
74
extern int remote_management_flag;
 
75
extern char management_directory[PATH_NAME_MAX + 1];
 
76
 
 
77
inkcoreapi extern int qt_accept_file_descriptor;
 
78
inkcoreapi extern int CacheClusteringEnabled;
 
79
 
 
80
extern int use_mp;
 
81
 
 
82
// Debugging Configuration
 
83
extern char debug_host[DOMAIN_NAME_MAX + 1];
 
84
extern int debug_port;
 
85
 
 
86
// Default socket buffer limits
 
87
extern int default_sndbuf_size;
 
88
extern int default_rcvbuf_size;
 
89
 
 
90
//
 
91
// Functions
 
92
//
 
93
void init_system();
 
94
void shutdown_system();
 
95
inline bool
 
96
maintainance_mode()
 
97
{
 
98
  return (command_flag ? true : false);
 
99
}
 
100
 
 
101
void syslog_thr_init();
 
102
 
 
103
enum HttpPortTypes
 
104
{
 
105
  SERVER_PORT_DEFAULT = 0,
 
106
  SERVER_PORT_COMPRESSED,
 
107
  SERVER_PORT_BLIND_TUNNEL,
 
108
  SERVER_PORT_SSL
 
109
};
 
110
 
 
111
struct HttpPortEntry
 
112
{
 
113
  int fd;
 
114
  HttpPortTypes type;
 
115
};
 
116
 
 
117
extern HttpPortEntry *http_port_attr_array;
 
118
 
 
119
extern Version version;
 
120
extern AppVersionInfo appVersionInfo;
 
121
 
 
122
struct HttpOtherPortEntry
 
123
{
 
124
  int port;
 
125
  int domain;
 
126
  HttpPortTypes type;
 
127
  /// Set if outbound connections (to origin servers) are transparent.
 
128
  bool f_outbound_transparent;
 
129
  /// Set if inbound connects (from client) are/were transparent.
 
130
  bool f_inbound_transparent;
 
131
};
 
132
extern HttpOtherPortEntry *http_other_port_array;
 
133
 
 
134
 
 
135
#define TS_ReadConfigInteger            REC_ReadConfigInteger
 
136
#define TS_ReadConfigFloat              REC_ReadConfigFloat
 
137
#define TS_ReadConfigString             REC_ReadConfigString
 
138
#define TS_EstablishStaticConfigInteger REC_EstablishStaticConfigInteger
 
139
#define TS_RegisterConfigUpdateFunc     REC_RegisterConfigUpdateFunc
 
140
#define TS_ReadConfigStringAlloc        REC_ReadConfigStringAlloc
 
141
#define TS_ConfigReadInteger            REC_ConfigReadInteger
 
142
#define TS_ConfigReadString             REC_ConfigReadString
 
143
 
 
144
 
 
145
#endif /* _Main_h_ */