/*
- * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
#include "acl/Arp.h"
#include "acl/FilledChecklist.h"
-#include "Debug.h"
+#include "cache_cf.h"
+#include "debug/Stream.h"
#include "eui/Eui48.h"
#include "globals.h"
#include "ip/Address.h"
#include <algorithm>
-ACL *
-ACLARP::clone() const
-{
- return new ACLARP(*this);
-}
-
ACLARP::ACLARP (char const *theClass) : class_ (theClass)
{}
-ACLARP::ACLARP (ACLARP const & old) : class_ (old.class_), aclArpData(old.aclArpData)
-{
-}
-
char const *
ACLARP::typeString() const
{
* Working on setting up a proper firewall for a network containing some
* Win'95 computers at our Univ, I've discovered that some smart students
* avoid the restrictions easily just changing their IP addresses in Win'95
- * Contol Panel... It has been getting boring, so I took Squid-1.1.18
+ * Control Panel... It has been getting boring, so I took Squid-1.1.18
* sources and added a new acl type for hard-wired access control:
*
* acl <name> arp <Ethernet address> ...
* Solaris code by R. Gancarz <radekg@solaris.elektrownia-lagisza.com.pl>
*/
-Eui::Eui48 *
+static Eui::Eui48 *
aclParseArpData(const char *t)
{
char buf[256];
debugs(28, 5, "aclParseArpData: " << t);
if (sscanf(t, "%[0-9a-fA-F:]", buf) != 1) {
- debugs(28, DBG_CRITICAL, "aclParseArpData: Bad ethernet address: '" << t << "'");
+ debugs(28, DBG_CRITICAL, "ERROR: aclParseArpData: Bad ethernet address: '" << t << "'");
delete q;
- return NULL;
+ return nullptr;
}
if (!q->decode(buf)) {
debugs(28, DBG_CRITICAL, "" << cfg_filename << " line " << config_lineno << ": " << config_input_line);
- debugs(28, DBG_CRITICAL, "aclParseArpData: Ignoring invalid ARP acl entry: can't parse '" << buf << "'");
+ debugs(28, DBG_CRITICAL, "ERROR: aclParseArpData: Ignoring invalid ARP acl entry: cannot parse '" << buf << "'");
delete q;
- return NULL;
+ return nullptr;
}
return q;