Debian Codegraph @

runtime/nsd_ptcp.h

raw
1 /* An implementation of the nsd interface for plain tcp sockets.
2 *
3 * Copyright 2007-2026 Adiscon GmbH.
4 *
5 * This file is part of the rsyslog runtime library.
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 * -or-
13 * see COPYING.ASL20 in the source distribution
14 *
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 */
21
22 #ifndef INCLUDED_NSD_PTCP_H
23 #define INCLUDED_NSD_PTCP_H
24
25 #include <sys/socket.h>
26 #include "tcpsrv.h"
27
28 #include "nsd.h"
29 typedef nsd_if_t nsd_ptcp_if_t; /* we just *implement* this interface */
30
31 /* the nsd_ptcp object */
32 struct nsd_ptcp_s {
33 BEGINobjInstance
34 ; /* Data to implement generic object - MUST be the first data element! */
35 prop_t *remoteIP; /**< IP address of remote peer (currently used in server mode, only) */
36 uchar *pRemHostName; /**< host name of remote peer (currently used in server mode, only) */
37 struct sockaddr_storage remAddr; /**< remote addr as sockaddr - used for legacy ACL code */
38 int sock; /**< the socket we use for regular, single-socket, operations */
39 int iKeepAliveIntvl; /**< socket layer KEEPALIVE interval */
40 int iKeepAliveProbes; /**< socket layer KEEPALIVE probes */
41 int iKeepAliveTime; /**< socket layer KEEPALIVE timeout */
42 };
43
44 /* interface is defined in nsd.h, we just implement it! */
45 #define nsd_ptcpCURR_IF_VERSION nsdCURR_IF_VERSION
46
47 /* prototypes */
48 PROTOTYPEObjFull(nsd_ptcp);
49
50 /* the name of our library binary */
51 #define LM_NSD_PTCP_FILENAME "lmnsd_ptcp"
52
53 #endif /* #ifndef INCLUDED_NSD_PTCP_H */