stub_comm.cc
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
3  *
4  * Squid software is distributed under GPLv2+ license and includes
5  * contributions from numerous individuals and organizations.
6  * Please see the COPYING and CONTRIBUTORS files for details.
7  */
8 
9 #include "squid.h"
10 #include "comm.h"
11 #include "comm/Connection.h"
12 #include "comm/Loops.h"
13 // #include "comm/Read.h"
14 #include "fde.h"
15 
16 #define STUB_API "comm.cc"
17 #include "tests/STUB.h"
18 
19 #include <ostream>
20 
21 // void comm_read(const Comm::ConnectionPointer &, char *, int, IOCB *, void *) STUB
22 // void comm_read(const Comm::ConnectionPointer &, char*, int, AsyncCall::Pointer &) STUB
23 
24 /* should be in stub_CommRead */
25 #include "CommRead.h"
29 DeferredRead::DeferredRead(DeferrableRead *, void *, CommRead const &) STUB
30 void DeferredReadManager::delayRead(DeferredRead const &) STUB
31 void DeferredReadManager::kickReads(int const) STUB
32 
33 #include "comm.h"
34 bool comm_iocallbackpending(void) STUB_RETVAL(false)
38 void _comm_close(int, char const *, int) STUB
39 void old_comm_reset_close(int) STUB
41 int comm_connect_addr(int, const Ip::Address &) STUB_RETVAL(-1)
42 
43 void comm_init(void) STUB
44 void comm_exit(void) STUB
45 int comm_open(int, int, Ip::Address &, int, const char *) STUB_RETVAL(-1)
46 int comm_open_uds(int, int, struct sockaddr_un*, int) STUB_RETVAL(-1)
47 void comm_import_opened(const Comm::ConnectionPointer &, const char *, struct addrinfo *) STUB
48 int comm_open_listener(int, int, Ip::Address &, int, const char *) STUB_RETVAL(-1)
49 void comm_open_listener(int, int, Comm::ConnectionPointer &, const char *) STUB
50 // int comm_openex(int, int, Ip::Address &, int, tos_t, nfmark_t, const char *) STUB_RETVAL(-1)
51 unsigned short comm_local_port(int) STUB_RETVAL(0)
52 int comm_udp_sendto(int, const Ip::Address &, const void *, int) STUB_RETVAL(-1)
54 void commUnsetFdTimeout(int) STUB
55 // int commSetTimeout(const Comm::ConnectionPointer &, int, AsyncCall::Pointer&) STUB_RETVAL(-1)
56 int commSetConnTimeout(const Comm::ConnectionPointer &, int, AsyncCall::Pointer &) STUB_RETVAL(-1)
58 int ignoreErrno(int) STUB_RETVAL(-1)
59 void commCloseAllSockets(void) STUB
60 void checkTimeouts(void) STUB
61 AsyncCall::Pointer comm_add_close_handler(int, CLCB *, void *) STUB
62 void comm_add_close_handler(int, AsyncCall::Pointer &) STUB
63 void comm_remove_close_handler(int, CLCB *, void *) STUB
64 void comm_remove_close_handler(int, AsyncCall::Pointer &)STUB
65 int comm_udp_recvfrom(int, void *, size_t, int, Ip::Address &) STUB_RETVAL(-1)
66 int comm_udp_recv(int, void *, size_t, int) STUB_RETVAL(-1)
67 ssize_t comm_udp_send(int, const void *, size_t, int) STUB_RETVAL(-1)
71 int CommSelectEngine::checkEvents(int) STUB_RETVAL(0)
72 
void comm_exit(void)
Definition: comm.cc:1160
AsyncCall::Pointer comm_add_close_handler(int fd, CLCB *handler, void *data)
Definition: comm.cc:922
void _comm_close(int fd, char const *file, int line)
Definition: comm.cc:815
#define STUB_RETVAL(x)
Definition: STUB.h:41
int comm_connect_addr(int sock, const Ip::Address &address)
Definition: comm.cc:603
int comm_udp_sendto(int fd, const Ip::Address &to_addr, const void *buf, int len)
Definition: comm.cc:891
void commCallCloseHandlers(int fd)
Definition: comm.cc:728
int commSetConnTimeout(const Comm::ConnectionPointer &conn, int timeout, AsyncCall::Pointer &callback)
Definition: comm.cc:564
ssize_t comm_udp_send(int s, const void *buf, size_t len, int flags)
Definition: comm.cc:143
int comm_udp_recv(int fd, void *buf, size_t len, int flags)
Definition: comm.cc:136
int commSetNonBlocking(int fd)
Definition: comm.cc:1037
Abstraction layer for TCP, UDP, TLS, UDS and filedescriptor sockets.
Definition: AcceptLimiter.h:17
void comm_import_opened(const Comm::ConnectionPointer &conn, const char *note, struct addrinfo *AI)
update Comm state after getting a comm_open() FD from another process
Definition: comm.cc:511
void CLCB(const CommCloseCbParams &params)
Definition: CommCalls.h:42
bool commHasHalfClosedMonitor(int fd)
checks whether we are waiting for possibly half-closed connection to close
Definition: comm.cc:1601
bool comm_has_incomplete_write(int fd)
Definition: comm.cc:149
void commCloseAllSockets(void)
Definition: comm.cc:1441
bool comm_iocallbackpending(void)
void comm_open_listener(int sock_type, int proto, Comm::ConnectionPointer &conn, const char *note)
Definition: comm.cc:234
int commUnsetNonBlocking(int fd)
Definition: comm.cc:1070
void comm_init(void)
Definition: comm.cc:1137
void commUnsetFdTimeout(int fd)
clear a timeout handler by FD number
Definition: comm.cc:551
CommRead()
Definition: comm.cc:1647
void checkTimeouts(void)
Definition: comm.cc:1498
unsigned short comm_local_port(int fd)
Definition: comm.cc:162
void comm_reset_close(const Comm::ConnectionPointer &conn)
Definition: comm.cc:754
void commSetCloseOnExec(int fd)
Definition: comm.cc:1098
@ COMM_ERROR
Definition: Flag.h:17
int comm_open(int sock_type, int proto, Ip::Address &addr, int flags, const char *note)
Definition: comm.cc:224
#define STUB
macro to stub a void function.
Definition: STUB.h:33
int commUnsetConnTimeout(const Comm::ConnectionPointer &conn)
Definition: comm.cc:590
Definition: client_db.h:23
int ignoreErrno(int ierrno)
Definition: comm.cc:1411
RefCount< Comm::Connection > ConnectionPointer
Definition: forward.h:26
#define STUB_NOP
Definition: STUB.h:37
int comm_udp_recvfrom(int fd, void *buf, size_t len, int flags, Ip::Address &from)
Definition: comm.cc:123
void commStartHalfClosedMonitor(int fd)
Start waiting for a possibly half-closed connection to close.
Definition: comm.cc:1551
int comm_open_uds(int sock_type, int proto, struct sockaddr_un *addr, int flags)
Create a unix-domain socket (UDS) that only supports FD_MSGHDR I/O.
Definition: comm.cc:1824
#define false
Definition: GnuRegex.c:233
void old_comm_reset_close(int fd)
Definition: comm.cc:769
void comm_remove_close_handler(int fd, CLCB *handler, void *data)
Definition: comm.cc:949
int unsigned int
Definition: stub_fd.cc:19

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors