#include "rtc_base/firewall_socket_server.h"
#include <errno.h>
#include <stddef.h>
#include <stdint.h>
#include <string>
#include "absl/algorithm/container.h"
#include "rtc_base/async_socket.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
namespace rtc {
class FirewallSocket : public AsyncSocketAdapter { … };
FirewallSocketServer::FirewallSocketServer(SocketServer* server,
FirewallManager* manager,
bool should_delete_server)
: … { … }
FirewallSocketServer::~FirewallSocketServer() { … }
void FirewallSocketServer::AddRule(bool allow,
FirewallProtocol p,
FirewallDirection d,
const SocketAddress& addr) { … }
void FirewallSocketServer::AddRule(bool allow,
FirewallProtocol p,
const SocketAddress& src,
const SocketAddress& dst) { … }
void FirewallSocketServer::ClearRules() { … }
bool FirewallSocketServer::Check(FirewallProtocol p,
const SocketAddress& src,
const SocketAddress& dst) { … }
void FirewallSocketServer::SetUnbindableIps(
const std::vector<rtc::IPAddress>& unbindable_ips) { … }
bool FirewallSocketServer::IsBindableIp(const rtc::IPAddress& ip) { … }
Socket* FirewallSocketServer::CreateSocket(int family, int type) { … }
void FirewallSocketServer::SetMessageQueue(Thread* queue) { … }
bool FirewallSocketServer::Wait(webrtc::TimeDelta max_wait_duration,
bool process_io) { … }
void FirewallSocketServer::WakeUp() { … }
Socket* FirewallSocketServer::WrapSocket(Socket* sock, int type) { … }
FirewallManager::FirewallManager() { … }
FirewallManager::~FirewallManager() { … }
void FirewallManager::AddServer(FirewallSocketServer* server) { … }
void FirewallManager::RemoveServer(FirewallSocketServer* server) { … }
void FirewallManager::AddRule(bool allow,
FirewallProtocol p,
FirewallDirection d,
const SocketAddress& addr) { … }
void FirewallManager::ClearRules() { … }
}