|
Lines 1-5
Link Here
|
| 1 |
/* |
1 |
/* |
| 2 |
* Copyright (C) 1996-2022 The Squid Software Foundation and contributors |
2 |
* Copyright (C) 1996-2023 The Squid Software Foundation and contributors |
| 3 |
* |
3 |
* |
| 4 |
* Squid software is distributed under GPLv2+ license and includes |
4 |
* Squid software is distributed under GPLv2+ license and includes |
| 5 |
* contributions from numerous individuals and organizations. |
5 |
* contributions from numerous individuals and organizations. |
|
Lines 12-45
Link Here
|
| 12 |
#define STUB_API "ip/libip.la" |
12 |
#define STUB_API "ip/libip.la" |
| 13 |
#include "tests/STUB.h" |
13 |
#include "tests/STUB.h" |
| 14 |
|
14 |
|
|
|
15 |
#include "ip/Address.h" |
| 16 |
Ip::Address::Address(const struct in_addr &) STUB |
| 17 |
Ip::Address::Address(const struct sockaddr_in &) STUB |
| 18 |
Ip::Address::Address(const struct in6_addr &) STUB |
| 19 |
Ip::Address::Address(const struct sockaddr_in6 &) STUB |
| 20 |
Ip::Address::Address(const struct hostent &) STUB |
| 21 |
Ip::Address::Address(const struct addrinfo &) STUB |
| 22 |
Ip::Address::Address(const char*) STUB |
| 23 |
Ip::Address& Ip::Address::operator =(struct sockaddr_in const &) STUB_RETVAL(*this) |
| 24 |
Ip::Address& Ip::Address::operator =(struct sockaddr_storage const &) STUB_RETVAL(*this) |
| 25 |
Ip::Address& Ip::Address::operator =(struct in_addr const &) STUB_RETVAL(*this) |
| 26 |
Ip::Address& Ip::Address::operator =(struct in6_addr const &) STUB_RETVAL(*this) |
| 27 |
Ip::Address& Ip::Address::operator =(struct sockaddr_in6 const &) STUB_RETVAL(*this) |
| 28 |
bool Ip::Address::operator =(const struct hostent &) STUB_RETVAL(false) |
| 29 |
bool Ip::Address::operator =(const struct addrinfo &) STUB_RETVAL(false) |
| 30 |
bool Ip::Address::operator =(const char *) STUB_RETVAL(false) |
| 31 |
bool Ip::Address::operator ==(Ip::Address const &) const 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::isIPv4() const STUB_RETVAL(false) |
| 38 |
bool Ip::Address::isIPv6() const STUB_RETVAL(false) |
| 39 |
bool Ip::Address::isSockAddr() const STUB_RETVAL(false) |
| 40 |
bool Ip::Address::isAnyAddr() const STUB_RETVAL(false) |
| 41 |
bool Ip::Address::isNoAddr() const STUB_RETVAL(false) |
| 42 |
bool Ip::Address::isLocalhost() const STUB_RETVAL(false) |
| 43 |
bool Ip::Address::isSiteLocal6() const STUB_RETVAL(false) |
| 44 |
bool Ip::Address::isSiteLocalAuto() const STUB_RETVAL(false) |
| 45 |
unsigned short Ip::Address::port() const STUB |
| 46 |
unsigned short Ip::Address::port(unsigned short) STUB |
| 47 |
void Ip::Address::setAnyAddr() STUB |
| 48 |
void Ip::Address::setNoAddr() STUB |
| 49 |
void Ip::Address::setLocalhost() STUB |
| 50 |
void Ip::Address::setEmpty() STUB_NOP // NOP for default constructor |
| 51 |
bool Ip::Address::setIPv4() STUB_RETVAL(false) |
| 52 |
int Ip::Address::cidr() const STUB_RETVAL(0) |
| 53 |
int Ip::Address::applyMask(const Ip::Address &) STUB_RETVAL(0) |
| 54 |
bool Ip::Address::applyMask(const unsigned int, int) STUB_RETVAL(false) |
| 55 |
void Ip::Address::applyClientMask(const Ip::Address &) STUB |
| 56 |
char* Ip::Address::toStr(char *, const unsigned int, int) const STUB_RETVAL(nullptr) |
| 57 |
char* Ip::Address::toUrl(char *, unsigned int) const STUB_RETVAL(nullptr) |
| 58 |
unsigned int Ip::Address::toHostStr(char *, const unsigned int) const STUB_RETVAL(0) |
| 59 |
bool Ip::Address::fromHost(const char *) STUB_RETVAL(false) |
| 60 |
bool Ip::Address::getReverseString(char [MAX_IPSTRLEN], int) const STUB_RETVAL(false) |
| 61 |
int Ip::Address::matchIPAddr(const Ip::Address &) const STUB_RETVAL(0) |
| 62 |
int Ip::Address::compareWhole(const Ip::Address &) const STUB_RETVAL(0) |
| 63 |
void Ip::Address::getAddrInfo(struct addrinfo *&, int) const STUB |
| 64 |
void Ip::Address::FreeAddr(struct addrinfo *&) STUB |
| 65 |
void Ip::Address::InitAddr(struct addrinfo *&) STUB |
| 66 |
bool Ip::Address::GetHostByName(const char *) STUB_RETVAL(false) |
| 67 |
void Ip::Address::getSockAddr(struct sockaddr_storage &, const int) const STUB |
| 68 |
void Ip::Address::getSockAddr(struct sockaddr_in &) const STUB |
| 69 |
bool Ip::Address::getInAddr(struct in_addr &) const STUB_RETVAL(false) |
| 70 |
void Ip::Address::getSockAddr(struct sockaddr_in6 &) const STUB |
| 71 |
void Ip::Address::getInAddr(struct in6_addr &) const STUB |
| 72 |
void parse_IpAddress_list_token(Ip::Address_list **, char *) STUB |
| 73 |
|
| 74 |
//#include "ip/forward.h" |
| 75 |
|
| 15 |
#include "ip/QosConfig.h" |
76 |
#include "ip/QosConfig.h" |
| 16 |
namespace Ip |
77 |
CBDATA_CLASS_INIT(acl_tos); |
| 17 |
{ |
78 |
acl_tos::~acl_tos() STUB |
| 18 |
namespace Qos |
79 |
CBDATA_CLASS_INIT(acl_nfmark); |
| 19 |
{ |
80 |
acl_nfmark::~acl_nfmark() STUB |
| 20 |
void getTosFromServer(fde *, const int) { |
81 |
void Ip::Qos::getTosFromServer(const Comm::ConnectionPointer &, fde *) STUB |
| 21 |
#if USE_QOS_TOS |
82 |
nfmark_t Ip::Qos::getNfConnmark(const Comm::ConnectionPointer &, const ConnectionDirection) STUB_RETVAL(-1) |
| 22 |
STUB |
83 |
bool Ip::Qos::setNfConnmark(Comm::ConnectionPointer &, const ConnectionDirection, const Ip::NfMarkConfig &) STUB_RETVAL(false) |
| 23 |
#endif |
84 |
int Ip::Qos::doTosLocalMiss(const Comm::ConnectionPointer &, const hier_code) STUB_RETVAL(-1) |
| 24 |
} |
85 |
int Ip::Qos::doNfmarkLocalMiss(const Comm::ConnectionPointer &, const hier_code) STUB_RETVAL(-1) |
| 25 |
void getNfmarkFromServer(const fde *, const fde *, const int) { |
86 |
int Ip::Qos::doTosLocalHit(const Comm::ConnectionPointer &) STUB_RETVAL(-1) |
| 26 |
#if USE_QOS_NFMARK |
87 |
int Ip::Qos::doNfmarkLocalHit(const Comm::ConnectionPointer &) STUB_RETVAL(-1) |
| 27 |
STUB |
88 |
int Ip::Qos::setSockTos(const Comm::ConnectionPointer &, tos_t) STUB_RETVAL(-1) |
| 28 |
#endif |
89 |
int Ip::Qos::setSockTos(const int, tos_t, int) STUB_RETVAL(-1) |
| 29 |
} |
90 |
int Ip::Qos::setSockNfmark(const Comm::ConnectionPointer &, nfmark_t) STUB_RETVAL(-1) |
| 30 |
#if USE_QOS_NFMARK |
91 |
int Ip::Qos::setSockNfmark(const int, nfmark_t) STUB_RETVAL(-1) |
| 31 |
int GetNfMarkCallback(enum nf_conntrack_msg_type, struct nf_conntrack *, void *) STUB_RETVAL(-1) |
92 |
Ip::Qos::Config::Config() STUB_NOP |
| 32 |
#endif |
93 |
void Ip::Qos::Config::parseConfigLine() STUB |
| 33 |
tos_t doTosLocalMiss(const int, const hier_code) STUB_RETVAL(-1) |
94 |
void Ip::Qos::Config::dumpConfigLine(char *, const char *) const STUB |
| 34 |
int doNfmarkLocalMiss(const int, const hier_code) STUB_RETVAL(-1) |
95 |
bool Ip::Qos::Config::isAclNfmarkActive() const STUB_RETVAL(false) |
| 35 |
int doTosLocalHit(const int) STUB_RETVAL(-1) |
96 |
bool Ip::Qos::Config::isAclTosActive() const STUB_RETVAL(false) |
| 36 |
int doNfmarkLocalHit(const int) STUB_RETVAL(-1) |
97 |
Ip::Qos::Config Ip::Qos::TheConfig; |
| 37 |
void parseConfigLine() STUB |
98 |
|
| 38 |
void dumpConfigLine(char *, const char *) STUB |
99 |
#include "ip/Intercept.h" |
| 39 |
|
100 |
bool Ip::Intercept::ProbeForTproxy(Ip::Address &) STUB_RETVAL(false) |
| 40 |
Config::Config() {STUB} |
101 |
void Ip::Intercept::StopTransparency(const char *) STUB |
| 41 |
bool Config::isAclNfmarkActive() const STUB_RETVAL(false) |
102 |
bool Ip::Intercept::Lookup(const Comm::ConnectionPointer &newConn, const Comm::ConnectionPointer &listenConn) STUB_RETVAL(false) |
| 42 |
bool Config::isAclTosActive() const STUB_RETVAL(false) |
103 |
Ip::Intercept Ip::Interceptor; |
| 43 |
} |
104 |
|
| 44 |
} |
105 |
#include "ip/NfMarkConfig.h" |
|
|
106 |
Ip::NfMarkConfig Ip::NfMarkConfig::Parse(const SBuf &) STUB_RETSTATREF(Ip::NfMarkConfig) |
| 107 |
nfmark_t Ip::NfMarkConfig::applyToMark(nfmark_t) const STUB_RETVAL(0) |
| 108 |
std::ostream &operator <<(std::ostream &os, Ip::NfMarkConfig) STUB_RETVAL(os) |
| 109 |
|
| 110 |
#include "ip/tools.h" |
| 111 |
void Ip::ProbeTransport() STUB |
| 112 |
int Ip::EnableIpv6 = 0; |
| 45 |
|
113 |
|