Squid Web Cache master
Loading...
Searching...
No Matches
stub_libip.cc
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2025 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"
16std::optional<Ip::Address> Ip::Address::Parse(const char *) STUB_RETVAL(std::nullopt)
17Ip::Address::Address(const struct in_addr &) STUB
18Ip::Address::Address(const struct sockaddr_in &) STUB
19Ip::Address::Address(const struct in6_addr &) STUB
20Ip::Address::Address(const struct sockaddr_in6 &) STUB
21Ip::Address::Address(const struct hostent &) STUB
22Ip::Address::Address(const struct addrinfo &) STUB
23Ip::Address::Address(const char*) STUB
24Ip::Address& Ip::Address::operator =(struct sockaddr_in const &) STUB_RETVAL(*this)
25Ip::Address& Ip::Address::operator =(struct sockaddr_storage const &) STUB_RETVAL(*this)
26Ip::Address& Ip::Address::operator =(struct in_addr const &) STUB_RETVAL(*this)
27Ip::Address& Ip::Address::operator =(struct in6_addr const &) STUB_RETVAL(*this)
28Ip::Address& Ip::Address::operator =(struct sockaddr_in6 const &) STUB_RETVAL(*this)
29bool Ip::Address::operator =(const struct hostent &) STUB_RETVAL(false)
30bool Ip::Address::operator =(const struct addrinfo &) STUB_RETVAL(false)
31bool Ip::Address::operator =(const char *) STUB_RETVAL(false)
32bool Ip::Address::operator ==(Ip::Address const &) const STUB_RETVAL(false)
33bool Ip::Address::operator !=(Ip::Address const &) const STUB_RETVAL(false)
34bool Ip::Address::operator >=(Ip::Address const &) const STUB_RETVAL(false)
35bool Ip::Address::operator <=(Ip::Address const &) const STUB_RETVAL(false)
36bool Ip::Address::operator >(Ip::Address const &) const STUB_RETVAL(false)
37bool Ip::Address::operator <(Ip::Address const &) const STUB_RETVAL(false)
38bool Ip::Address::isIPv4() const STUB_RETVAL(false)
39bool Ip::Address::isIPv6() const STUB_RETVAL(false)
40bool Ip::Address::isSockAddr() const STUB_RETVAL(false)
41bool Ip::Address::isAnyAddr() const STUB_RETVAL(false)
42bool Ip::Address::isNoAddr() const STUB_RETVAL(false)
43bool Ip::Address::isLocalhost() const STUB_RETVAL(false)
44bool Ip::Address::isSiteLocal6() const STUB_RETVAL(false)
45bool Ip::Address::isSiteLocalAuto() const STUB_RETVAL(false)
46unsigned short Ip::Address::port() const STUB
47unsigned short Ip::Address::port(unsigned short) STUB
48void Ip::Address::setAnyAddr() STUB
49void Ip::Address::setNoAddr() STUB
50void Ip::Address::setLocalhost() STUB
51void Ip::Address::setEmpty() STUB_NOP // NOP for default constructor
52bool Ip::Address::setIPv4() STUB_RETVAL(false)
53int Ip::Address::cidr() const STUB_RETVAL(0)
54int Ip::Address::applyMask(const Ip::Address &) STUB_RETVAL(0)
55bool Ip::Address::applyMask(const unsigned int, int) STUB_RETVAL(false)
56void Ip::Address::applyClientMask(const Ip::Address &) STUB
57char* Ip::Address::toStr(char *, const unsigned int, int) const STUB_RETVAL(nullptr)
58char* Ip::Address::toUrl(char *, unsigned int) const STUB_RETVAL(nullptr)
59unsigned int Ip::Address::toHostStr(char *, const unsigned int) const STUB_RETVAL(0)
60bool Ip::Address::fromHost(const char *) STUB_RETVAL(false)
61bool Ip::Address::getReverseString(char [MAX_IPSTRLEN], int) const STUB_RETVAL(false)
62int Ip::Address::matchIPAddr(const Ip::Address &) const STUB_RETVAL(0)
63int Ip::Address::compareWhole(const Ip::Address &) const STUB_RETVAL(0)
64void Ip::Address::getAddrInfo(struct addrinfo *&, int) const STUB
65void Ip::Address::FreeAddr(struct addrinfo *&) STUB
66void Ip::Address::InitAddr(struct addrinfo *&) STUB
67bool Ip::Address::GetHostByName(const char *) STUB_RETVAL(false)
68void Ip::Address::getSockAddr(struct sockaddr_storage &, const int) const STUB
69void Ip::Address::getSockAddr(struct sockaddr_in &) const STUB
70bool Ip::Address::getInAddr(struct in_addr &) const STUB_RETVAL(false)
71void Ip::Address::getSockAddr(struct sockaddr_in6 &) const STUB
72void Ip::Address::getInAddr(struct in6_addr &) const STUB
73void parse_IpAddress_list_token(Ip::Address_list **, char *) STUB
74
75//#include "ip/forward.h"
76
77#include "ip/QosConfig.h"
82void Ip::Qos::getTosFromServer(const Comm::ConnectionPointer &, fde *) STUB
83nfmark_t Ip::Qos::getNfConnmark(const Comm::ConnectionPointer &, const ConnectionDirection) STUB_RETVAL(-1)
84bool Ip::Qos::setNfConnmark(Comm::ConnectionPointer &, const ConnectionDirection, const Ip::NfMarkConfig &) STUB_RETVAL(false)
85int Ip::Qos::doTosLocalMiss(const Comm::ConnectionPointer &, const hier_code) STUB_RETVAL(-1)
86int Ip::Qos::doNfmarkLocalMiss(const Comm::ConnectionPointer &, const hier_code) STUB_RETVAL(-1)
87int Ip::Qos::doTosLocalHit(const Comm::ConnectionPointer &) STUB_RETVAL(-1)
88int Ip::Qos::doNfmarkLocalHit(const Comm::ConnectionPointer &) STUB_RETVAL(-1)
89int Ip::Qos::setSockTos(const Comm::ConnectionPointer &, tos_t) STUB_RETVAL(-1)
90int Ip::Qos::setSockTos(const int, tos_t, int) STUB_RETVAL(-1)
91int Ip::Qos::setSockNfmark(const Comm::ConnectionPointer &, nfmark_t) STUB_RETVAL(-1)
92int Ip::Qos::setSockNfmark(const int, nfmark_t) STUB_RETVAL(-1)
93Ip::Qos::Config::Config() STUB_NOP
94void Ip::Qos::Config::parseConfigLine() STUB
95void Ip::Qos::Config::dumpConfigLine(std::ostream &, const char *) const STUB
96bool Ip::Qos::Config::isAclNfmarkActive() const STUB_RETVAL(false)
97bool Ip::Qos::Config::isAclTosActive() const STUB_RETVAL(false)
98Ip::Qos::Config Ip::Qos::TheConfig;
99
100#include "ip/Intercept.h"
102bool Ip::Intercept::ProbeForTproxy(Ip::Address &) STUB_RETVAL(false)
103void Ip::Intercept::StartTransparency() STUB
104void Ip::Intercept::StopTransparency(const char *) STUB
105void Ip::Intercept::StartInterception() STUB
106Ip::Intercept Ip::Interceptor;
107
108#include "ip/NfMarkConfig.h"
111std::ostream &Ip::operator <<(std::ostream &os, Ip::NfMarkConfig) STUB_RETVAL(os)
112
113#include "ip/tools.h"
115int Ip::EnableIpv6 = 0;
116
#define STUB
macro to stub a void function.
Definition STUB.h:34
#define STUB_NOP
Definition STUB.h:38
#define STUB_RETSTATREF(x)
Definition STUB.h:55
#define STUB_RETVAL(x)
Definition STUB.h:42
class SquidConfig Config
#define CBDATA_CLASS_INIT(type)
Definition cbdata.h:325
static std::optional< Address > Parse(const char *)
Definition Address.cc:44
Address & operator=(struct sockaddr_in const &s)
Definition Address.cc:450
bool LookupNat(const Comm::Connection &)
Definition Intercept.cc:391
a netfilter mark/mask pair
static NfMarkConfig Parse(const SBuf &token)
parses a token and returns an object, expects a "mark[/mask]" format
nfmark_t applyToMark(nfmark_t m) const
Definition SBuf.h:94
Definition fde.h:52
static int port
hier_code
Definition hier_code.h:12
void parse_IpAddress_list_token(Ip::Address_list **, char *)
#define MAX_IPSTRLEN
Length of buffer that needs to be allocated to old a null-terminated IP-string.
Definition forward.h:25
unsigned char tos_t
Definition forward.h:27
uint32_t nfmark_t
Definition forward.h:26
Abstraction layer for TCP, UDP, TLS, UDS and filedescriptor sockets.
Definition Xaction.cc:137
void ProbeTransport(void)
Probe to discover IPv6 capabilities.
STL namespace.