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 // This is total BS, because our libraries are riddled with cross dependencies.
25 // TODO: Clean up the dependency mess, and get rid of this.
26
27 #include "tscore/ink_platform.h"
28 #include "LogObject.h"
29
30 #if defined(solaris)
31 #include <sys/types.h>
32 #include <unistd.h>
33 #endif
34
35 #include "P_Net.h"
36
37 int fds_limit = 8000;
38
39 class FakeUDPNetProcessor : public UDPNetProcessor
40 {
41 int
start(int,size_t)42 start(int, size_t) override
43 {
44 ink_release_assert(false);
45 return 0;
46 };
47 } fakeUDPNet;
48
49 UDPNetProcessor &udpNet = fakeUDPNet;
50
51 ClassAllocator<UDPPacketInternal> udpPacketAllocator("udpPacketAllocator");
52
53 void
Release()54 UDPConnection::Release()
55 {
56 ink_release_assert(false);
57 }
58
59 #include "InkAPIInternal.h"
60 ConfigUpdateCbTable *global_config_cbs = nullptr;
61
62 void
invoke(const char *)63 ConfigUpdateCbTable::invoke(const char * /* name ATS_UNUSED */)
64 {
65 ink_release_assert(false);
66 }
67
68 struct Machine {
69 static Machine *instance();
70 };
71 Machine *
instance()72 Machine::instance()
73 {
74 ink_release_assert(false);
75 return nullptr;
76 }
77
78 NetAccept *
createNetAccept(const NetProcessor::AcceptOptions & opt)79 UnixNetProcessor::createNetAccept(const NetProcessor::AcceptOptions &opt)
80 {
81 ink_release_assert(false);
82 return nullptr;
83 }
84
85 void
init()86 UnixNetProcessor::init()
87 {
88 ink_release_assert(false);
89 }
90
91 void
init_socks()92 UnixNetProcessor::init_socks()
93 {
94 ink_release_assert(false);
95 }
96
97 // TODO: The following was necessary only for Solaris, should examine more.
98 NetVCOptions const Connection::DEFAULT_OPTIONS;
99 NetProcessor::AcceptOptions const NetProcessor::DEFAULT_ACCEPT_OPTIONS;
100 DNSConnection::Options const DNSConnection::DEFAULT_OPTIONS;
101
102 // TODO: This is even uglier, this actually gets called here when "defined".
103 NetProcessor::AcceptOptions &
reset()104 NetProcessor::AcceptOptions::reset()
105 {
106 local_port = 0;
107 accept_threads = 0;
108 ip_family = AF_INET;
109 etype = ET_NET;
110 recv_bufsize = 0;
111 send_bufsize = 0;
112 sockopt_flags = 0;
113 packet_mark = 0;
114 packet_tos = 0;
115 f_inbound_transparent = false;
116 return *this;
117 }
118
119 // These are for clang / llvm
120 int
handleWrite(int,Event *)121 CacheVC::handleWrite(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
122 {
123 return 0;
124 ink_release_assert(false);
125 }
126
127 UnixNetProcessor unix_netProcessor;
128 NetProcessor &netProcessor = unix_netProcessor;
129
130 Action *
accept(Continuation *,AcceptOptions const &)131 NetProcessor::accept(Continuation * /* cont ATS_UNUSED */, AcceptOptions const & /* opt ATS_UNUSED */)
132 {
133 ink_release_assert(false);
134 return nullptr;
135 }
136
137 Action *
main_accept(Continuation *,SOCKET,AcceptOptions const &)138 NetProcessor::main_accept(Continuation * /* cont ATS_UNUSED */, SOCKET /* fd ATS_UNUSED */,
139 AcceptOptions const & /* opt ATS_UNUSED */)
140 {
141 ink_release_assert(false);
142 return nullptr;
143 }
144
145 void
stop_accept()146 NetProcessor::stop_accept()
147 {
148 ink_release_assert(false);
149 }
150
151 Action *
accept_internal(Continuation *,int,AcceptOptions const &)152 UnixNetProcessor::accept_internal(Continuation * /* cont ATS_UNUSED */, int /* fd ATS_UNUSED */,
153 AcceptOptions const & /* opt ATS_UNUSED */)
154 {
155 ink_release_assert(false);
156 return nullptr;
157 }
158
159 NetVConnection *
allocate_vc(EThread *)160 UnixNetProcessor::allocate_vc(EThread *)
161 {
162 ink_release_assert(false);
163 return nullptr;
164 }
165
166 // For Intel ICC
167 int cache_config_mutex_retry_delay = 2;
168
169 #include "I_SplitDNSProcessor.h"
170 void
reconfigure()171 SplitDNSConfig::reconfigure()
172 {
173 }
174
175 ClassAllocator<CacheRemoveCont> cacheRemoveContAllocator("cacheRemoveCont");
176
CacheHostTable(Cache *,CacheType)177 CacheHostTable::CacheHostTable(Cache * /* c ATS_UNUSED */, CacheType /* typ ATS_UNUSED */) {}
178
~CacheHostTable()179 CacheHostTable::~CacheHostTable() {}
180