either a domain name (as defined in DNS RFC 1034) or an IP address More...
#include <Host.h>
Public Member Functions | |
auto | ip () const |
auto | domainName () const |
stored domain name (if any) More... | |
Static Public Member Functions | |
static std::optional< Host > | ParseIp (const Ip::Address &) |
converts an already parsed IP address to a Host object More... | |
static std::optional< Host > | ParseSimpleDomainName (const SBuf &) |
static std::optional< Host > | ParseWildDomainName (const SBuf &) |
Private Types | |
using | Storage = std::variant< Ip::Address, Dns::DomainName > |
Private Member Functions | |
Host (const Storage &raw) | |
Static Private Member Functions | |
static std::optional< Host > | ParseDomainName (const SBuf &) |
common parts of FromSimpleDomain() and FromWildDomain() More... | |
Private Attributes | |
Storage | raw_ |
the host we are providing access to More... | |
Detailed Description
Member Typedef Documentation
◆ Storage
|
private |
Constructor & Destructor Documentation
◆ Host()
|
inlineprivate |
Member Function Documentation
◆ domainName()
|
inline |
Definition at line 48 of file Host.h.
References raw_.
Referenced by Ssl::GeneralNameMatcher::match(), and AnyP::operator<<().
◆ ip()
|
inline |
stored IPv or IPv6 address (if any)
Ip::Address::isNoAddr() may be true for the returned address. Ip::Address::isAnyAddr() may be true for the returned address.
Definition at line 45 of file Host.h.
References raw_.
Referenced by Ssl::GeneralNameMatcher::match(), AnyP::operator<<(), and ParseIp().
◆ ParseDomainName()
|
staticprivate |
Definition at line 24 of file Host.cc.
References debugs, SBuf::find(), SBuf::isEmpty(), and SBuf::npos.
◆ ParseIp()
|
static |
Definition at line 15 of file Host.cc.
References debugs, Host(), and ip().
Referenced by Ssl::ParseAsSimpleDomainNameOrIp(), AnyP::Uri::parsedHost(), and ParseSubjectAltName().
◆ ParseSimpleDomainName()
|
static |
Parses input as a literal ASCII domain name (A-labels OK; see RFC 5890). Does not allow wildcards;
- See also
- ParseWildDomainName().
Definition at line 49 of file Host.cc.
References debugs, SBuf::find(), and SBuf::npos.
Referenced by Acl::ServerNameCheck::match(), Ssl::ParseAsSimpleDomainNameOrIp(), and AnyP::Uri::parsedHost().
◆ ParseWildDomainName()
|
static |
Same as ParseSimpleDomainName() but allows the first label to be a wildcard (RFC 9525 Section 6.3).
Definition at line 59 of file Host.cc.
References debugs, SBuf::find(), SBuf::npos, and SBuf::startsWith().
Referenced by ParseSubjectAltName().
Member Data Documentation
◆ raw_
|
private |
Definition at line 58 of file Host.h.
Referenced by domainName(), and ip().
The documentation for this class was generated from the following files:
Introduction
- About Squid
- Why Squid?
- Squid Developers
- How to Donate
- How to Help Out
- Getting Squid
- Squid Source Packages
- Squid Deployment Case-Studies
- Squid Software Foundation
Documentation
- Quick Setup
- Configuration:
- FAQ and Wiki
- Guide Books:
- Non-English
- More...
Support
- Security Advisories
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products
Miscellaneous
- Developer Resources
- Related Writings
- Related Software:
- Squid Artwork
Web Site Translations
Mirrors
- Website:
- ... full list