stub_libip.cc
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3  *
4  * Squid software is distributed under GPLv2+ license and includes
5  * contributions from numerous individuals and organizations.
6  * Please see the COPYING and CONTRIBUTORS files for details.
7  */
8 
9 #include "squid.h"
10 #include "Store.h"
11 
12 #define STUB_API "ip/libip.la"
13 #include "tests/STUB.h"
14 
15 #include "ip/Address.h"
16 std::optional<Ip::Address> Ip::Address::Parse(const char *) STUB_RETVAL(std::nullopt)
17 Ip::Address::Address(const struct in_addr &) STUB
18 Ip::Address::Address(const struct sockaddr_in &) STUB
19 Ip::Address::Address(const struct in6_addr &) STUB
20 Ip::Address::Address(const struct sockaddr_in6 &) STUB
21 Ip::Address::Address(const struct hostent &) STUB
22 Ip::Address::Address(const struct addrinfo &) STUB
23 Ip::Address::Address(const char*) STUB
24 Ip::Address& Ip::Address::operator =(struct sockaddr_in const &) STUB_RETVAL(*this)
25 Ip::Address& Ip::Address::operator =(struct sockaddr_storage const &) STUB_RETVAL(*this)
26 Ip::Address& Ip::Address::operator =(struct in_addr const &) STUB_RETVAL(*this)
27 Ip::Address& Ip::Address::operator =(struct in6_addr const &) STUB_RETVAL(*this)
28 Ip::Address& Ip::Address::operator =(struct sockaddr_in6 const &) STUB_RETVAL(*this)
29 bool Ip::Address::operator =(const struct hostent &) STUB_RETVAL(false)
30 bool Ip::Address::operator =(const struct addrinfo &) STUB_RETVAL(false)
31 bool Ip::Address::operator =(const char *) STUB_RETVAL(false)
32 bool Ip::Address::operator ==(Ip::Address const &) const STUB_RETVAL(false)
33 bool Ip::Address::operator !=(Ip::Address const &) const STUB_RETVAL(false)
34 bool Ip::Address::operator >=(Ip::Address const &) const STUB_RETVAL(false)
35 bool Ip::Address::operator <=(Ip::Address const &) const STUB_RETVAL(false)
36 bool Ip::Address::operator >(Ip::Address const &) const STUB_RETVAL(false)
37 bool Ip::Address::operator <(Ip::Address const &) const STUB_RETVAL(false)
38 bool Ip::Address::isIPv4() const STUB_RETVAL(false)
39 bool Ip::Address::isIPv6() const STUB_RETVAL(false)
40 bool Ip::Address::isSockAddr() const STUB_RETVAL(false)
41 bool Ip::Address::isAnyAddr() const STUB_RETVAL(false)
42 bool Ip::Address::isNoAddr() const STUB_RETVAL(false)
43 bool Ip::Address::isLocalhost() const STUB_RETVAL(false)
44 bool Ip::Address::isSiteLocal6() const STUB_RETVAL(false)
45 bool Ip::Address::isSiteLocalAuto() const STUB_RETVAL(false)
46 unsigned short Ip::Address::port() const STUB
47 unsigned short Ip::Address::port(unsigned short) STUB
48 void Ip::Address::setAnyAddr() STUB
49 void Ip::Address::setNoAddr() STUB
50 void Ip::Address::setLocalhost() STUB
51 void Ip::Address::setEmpty() STUB_NOP // NOP for default constructor
52 bool Ip::Address::setIPv4() STUB_RETVAL(false)
53 int Ip::Address::cidr() const STUB_RETVAL(0)
54 int Ip::Address::applyMask(const Ip::Address &) STUB_RETVAL(0)
55 bool Ip::Address::applyMask(const unsigned int, int) STUB_RETVAL(false)
56 void Ip::Address::applyClientMask(const Ip::Address &) STUB
57 char* Ip::Address::toStr(char *, const unsigned int, int) const STUB_RETVAL(nullptr)
58 char* Ip::Address::toUrl(char *, unsigned int) const STUB_RETVAL(nullptr)
59 unsigned int Ip::Address::toHostStr(char *, const unsigned int) const STUB_RETVAL(0)
60 bool Ip::Address::fromHost(const char *) STUB_RETVAL(false)
61 bool Ip::Address::getReverseString(char [MAX_IPSTRLEN], int) const STUB_RETVAL(false)
62 int Ip::Address::matchIPAddr(const Ip::Address &) const STUB_RETVAL(0)
63 int Ip::Address::compareWhole(const Ip::Address &) const STUB_RETVAL(0)
64 void Ip::Address::getAddrInfo(struct addrinfo *&, int) const STUB
65 void Ip::Address::FreeAddr(struct addrinfo *&) STUB
66 void Ip::Address::InitAddr(struct addrinfo *&) STUB
67 bool Ip::Address::GetHostByName(const char *) STUB_RETVAL(false)
68 void Ip::Address::getSockAddr(struct sockaddr_storage &, const int) const STUB
69 void Ip::Address::getSockAddr(struct sockaddr_in &) const STUB
70 bool Ip::Address::getInAddr(struct in_addr &) const STUB_RETVAL(false)
71 void Ip::Address::getSockAddr(struct sockaddr_in6 &) const STUB
72 void Ip::Address::getInAddr(struct in6_addr &) const STUB
73 void parse_IpAddress_list_token(Ip::Address_list **, char *) STUB
74 
75 //#include "ip/forward.h"
76 
77 #include "ip/QosConfig.h"
82 void Ip::Qos::getTosFromServer(const Comm::ConnectionPointer &, fde *) STUB
84 bool Ip::Qos::setNfConnmark(Comm::ConnectionPointer &, const ConnectionDirection, const Ip::NfMarkConfig &) STUB_RETVAL(false)
85 int Ip::Qos::doTosLocalMiss(const Comm::ConnectionPointer &, const hier_code) STUB_RETVAL(-1)
86 int Ip::Qos::doNfmarkLocalMiss(const Comm::ConnectionPointer &, const hier_code) STUB_RETVAL(-1)
87 int Ip::Qos::doTosLocalHit(const Comm::ConnectionPointer &) STUB_RETVAL(-1)
89 int Ip::Qos::setSockTos(const Comm::ConnectionPointer &, tos_t) STUB_RETVAL(-1)
90 int Ip::Qos::setSockTos(const int, tos_t, int) STUB_RETVAL(-1)
92 int Ip::Qos::setSockNfmark(const int, nfmark_t) STUB_RETVAL(-1)
93 Ip::Qos::Config::Config() STUB_NOP
94 void Ip::Qos::Config::parseConfigLine() STUB
95 void Ip::Qos::Config::dumpConfigLine(std::ostream &, const char *) const STUB
96 bool Ip::Qos::Config::isAclNfmarkActive() const STUB_RETVAL(false)
97 bool Ip::Qos::Config::isAclTosActive() const STUB_RETVAL(false)
98 Ip::Qos::Config Ip::Qos::TheConfig;
99 
100 #include "ip/Intercept.h"
102 bool Ip::Intercept::ProbeForTproxy(Ip::Address &) STUB_RETVAL(false)
103 void Ip::Intercept::StartTransparency() STUB
104 void Ip::Intercept::StopTransparency(const char *) STUB
105 void Ip::Intercept::StartInterception() STUB
106 Ip::Intercept Ip::Interceptor;
107 
108 #include "ip/NfMarkConfig.h"
111 std::ostream &Ip::operator <<(std::ostream &os, Ip::NfMarkConfig) STUB_RETVAL(os)
112 
113 #include "ip/tools.h"
115 int Ip::EnableIpv6 = 0;
116 
int setSockNfmark(const Comm::ConnectionPointer &conn, nfmark_t mark)
Definition: QosConfig.cc:589
#define STUB_RETVAL(x)
Definition: STUB.h:42
int doTosLocalMiss(const Comm::ConnectionPointer &conn, const hier_code hierCode)
Definition: QosConfig.cc:230
void getTosFromServer(const Comm::ConnectionPointer &server, fde *clientFde)
Definition: QosConfig.cc:47
Definition: SBuf.h:93
Abstraction layer for TCP, UDP, TLS, UDS and filedescriptor sockets.
Definition: AcceptLimiter.h:16
unsigned char tos_t
Definition: forward.h:27
static std::optional< Address > Parse(const char *)
Definition: Address.cc:44
static int port
Definition: ldap_backend.cc:70
static NfMarkConfig Parse(const SBuf &token)
parses a token and returns an object, expects a "mark[/mask]" format
Definition: NfMarkConfig.cc:32
Definition: fde.h:51
#define MAX_IPSTRLEN
Length of buffer that needs to be allocated to old a null-terminated IP-string.
Definition: forward.h:25
#define STUB_RETSTATREF(x)
Definition: STUB.h:55
int doNfmarkLocalHit(const Comm::ConnectionPointer &conn)
Definition: QosConfig.cc:279
Config TheConfig
Definition: Config.cc:16
void parse_IpAddress_list_token(Ip::Address_list **, char *)
uint32_t nfmark_t
Definition: forward.h:26
#define STUB
macro to stub a void function.
Definition: STUB.h:34
#define CBDATA_CLASS_INIT(type)
Definition: cbdata.h:325
Address & operator=(struct sockaddr_in const &s)
Definition: Address.cc:450
Definition: Xaction.cc:137
RefCount< Comm::Connection > ConnectionPointer
Definition: forward.h:26
ConnectionDirection
Possible Squid roles in connection handling.
Definition: QosConfig.h:70
bool setNfConnmark(Comm::ConnectionPointer &conn, const ConnectionDirection connDir, const NfMarkConfig &cm)
nfmark_t getNfConnmark(const Comm::ConnectionPointer &conn, const ConnectionDirection connDir)
Definition: QosConfig.cc:150
int doNfmarkLocalMiss(const Comm::ConnectionPointer &conn, const hier_code hierCode)
Definition: QosConfig.cc:251
a netfilter mark/mask pair
Definition: NfMarkConfig.h:22
#define STUB_NOP
Definition: STUB.h:38
bool LookupNat(const Comm::Connection &)
Definition: Intercept.cc:390
hier_code
Definition: hier_code.h:12
int setSockTos(const Comm::ConnectionPointer &conn, tos_t tos)
Definition: QosConfig.cc:557
int doTosLocalHit(const Comm::ConnectionPointer &conn)
Definition: QosConfig.cc:272
void ProbeTransport(void)
Probe to discover IPv6 capabilities.
nfmark_t applyToMark(nfmark_t m) const
Definition: NfMarkConfig.cc:46
~acl_tos()
Definition: QosConfig.cc:32
class SquidConfig Config
Definition: SquidConfig.cc:12

 

Introduction

Documentation

Support

Miscellaneous