#include "squid.h"#include "cache_cf.h"#include "comm.h"#include "comm/Connection.h"#include "compat/socket.h"#include "compat/unistd.h"#include "fd.h"#include "fde.h"#include "globals.h"#include "ip/Address.h"#include "rfc1738.h"#include "SquidConfig.h"#include "SquidIpc.h"#include "tools.h"#include <cerrno>#include <chrono>#include <thread>#include <process.h>
Go to the source code of this file.
Classes | |
| struct | ipc_params |
| struct | thread_params |
Macros | |
| #define | HELLO_BUF_SZ 32 |
Functions | |
| static unsigned int __stdcall | ipc_thread_1 (void *params) |
| static unsigned int __stdcall | ipc_thread_2 (void *params) |
| static int | ipcCloseAllFD (int prfd, int pwfd, int crfd, int cwfd) |
| static void | PutEnvironment () |
| pid_t | ipcCreate (int type, const char *prog, const char *const args[], const char *name, Ip::Address &local_addr, int *rfd, int *wfd, void **hIpc) |
| static int | ipcSend (int cwfd, const char *buf, int len) |
Variables | |
| static const char * | ok_string = "OK\n" |
| static const char * | err_string = "ERR\n" |
| static const char * | shutdown_string = "$shutdown\n" |
| static const char * | hello_string = "hi there\n" |
| static char | hello_buf [HELLO_BUF_SZ] |
Macro Definition Documentation
◆ HELLO_BUF_SZ
| #define HELLO_BUF_SZ 32 |
Definition at line 61 of file ipc_win32.cc.
Function Documentation
◆ ipc_thread_1()
|
static |
Definition at line 344 of file ipc_win32.cc.
References ipc_params::args, assert, comm_close, comm_connect_addr(), Comm::COMM_ERROR, comm_open(), commUnsetNonBlocking(), ipc_params::crfd, ipc_params::cwfd, DBG_CRITICAL, debugs, DebugStream(), err_string, fd_note(), fd_open(), FD_SOCKET, fd_table, Ip::Address::FreeAddr(), getCurrentTime(), hello_buf, hello_string, Ip::Address::InitAddr(), IPC_TCP_SOCKET, ipc_thread_2(), IPC_UDP_SOCKET, ipcCloseAllFD(), ipcSend(), ipc_params::local_addr, ok_string, pid, thread_params::pid, ipc_params::prog, thread_params::prog, ipc_params::PS, PutEnvironment(), rfc1738_escape, rfc1738_escape_unescaped, thread_params::rfd, thread_params::send_fd, shutdown_string, Squid_MaxFD, TRUE, ipc_params::type, thread_params::type, w_space, xaccept(), xcalloc(), xfree, xgetsockname(), xread(), xrecv(), xsend(), xstrdup, xstrerr(), and xwrite().
Referenced by ipcCreate().
◆ ipc_thread_2()
|
static |
Definition at line 789 of file ipc_win32.cc.
References debugs, IPC_TCP_SOCKET, IPC_UDP_SOCKET, pid, thread_params::pid, thread_params::prog, rfc1738_escape_unescaped, thread_params::rfd, thread_params::send_fd, shutdown_string, thread_params::type, xcalloc(), xfree, xread(), xrecv(), xsend(), and xstrdup.
Referenced by ipc_thread_1().
◆ ipcCloseAllFD()
Definition at line 65 of file ipc_win32.cc.
References comm_close.
Referenced by ipc_thread_1(), and ipcCreate().
◆ ipcCreate()
| pid_t ipcCreate | ( | int | type, |
| const char * | prog, | ||
| const char *const | args[], | ||
| const char * | name, | ||
| Ip::Address & | local_addr, | ||
| int * | rfd, | ||
| int * | wfd, | ||
| void ** | hIpc | ||
| ) |
Definition at line 91 of file ipc_win32.cc.
References ipc_params::args, assert, comm_close, comm_connect_addr(), Comm::COMM_ERROR, COMM_NOCLOEXEC, comm_open(), comm_open_listener(), comm_udp_recv(), comm_udp_send(), commSetCloseOnExec(), commSetNonBlocking(), commUnsetFdTimeout(), Config, ipc_params::crfd, ipc_params::cwfd, DBG_CRITICAL, DBG_IMPORTANT, debugs, DebugStream(), err_string, Debug::Extra(), fd_open(), FD_PIPE, fd_table, Ip::Address::FreeAddr(), hello_buf, HELLO_BUF_SZ, hello_string, hIpc, Ip::Address::InitAddr(), IPC_CHECK_FAIL, IPC_FIFO, IPC_NONE, IPC_TCP_SOCKET, ipc_thread_1(), IPC_UDP_SOCKET, IPC_UNIX_DGRAM, IPC_UNIX_STREAM, ipcCloseAllFD(), ipc_params::local_addr, logsFlush(), no_suid(), ok_string, opt_no_daemon, pid, pkHelper, ipc_params::prog, ipc_params::PS, PutEnvironment(), requirePathnameExists(), ResyncDebugLog(), rfc1738_escape, Ip::Address::setEmpty(), SquidConfig::sleep_after_fork, TheProcessKind, ipc_params::type, xaccept(), xclose(), xgetsockname(), xlisten(), xread(), xrecv(), xsend(), xsetsockopt(), xstrerr(), and xwrite().
◆ ipcSend()
Definition at line 330 of file ipc_win32.cc.
References DBG_CRITICAL, debugs, xsend(), and xstrerr().
Referenced by ipc_thread_1().
◆ PutEnvironment()
|
static |
Definition at line 85 of file ipc_win32.cc.
References Debug::debugOptions.
Referenced by ipc_thread_1().
Variable Documentation
◆ err_string
|
static |
Definition at line 57 of file ipc_win32.cc.
Referenced by ipc_thread_1(), and ipcCreate().
◆ hello_buf
|
static |
Definition at line 62 of file ipc_win32.cc.
Referenced by ipc_thread_1(), and ipcCreate().
◆ hello_string
|
static |
Definition at line 60 of file ipc_win32.cc.
Referenced by ipc_thread_1(), and ipcCreate().
◆ ok_string
|
static |
Definition at line 56 of file ipc_win32.cc.
Referenced by ipc_thread_1(), and ipcCreate().
◆ shutdown_string
|
static |
Definition at line 58 of file ipc_win32.cc.
Referenced by ipc_thread_1(), and ipc_thread_2().
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
