~ubuntu-branches/ubuntu/lucid/rsyslog/lucid-updates

« back to all changes in this revision

Viewing changes to tcpsrv.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl
  • Date: 2009-06-23 12:12:43 UTC
  • mfrom: (1.1.11 upstream) (3.2.8 sid)
  • Revision ID: james.westby@ubuntu.com-20090623121243-d2fejarzidywnn17
Tags: 4.2.0-1
* New upstream release of the now stable v4 branch.
  - Fix warnings when /etc/rsyslog.d/ is empty. Closes: #530228
* debian/patches/imudp_multiple_udp_sockets.patch
  - Removed, merged upstream.
* debian/rsyslog.default
  - Set default compat mode to '4'.
* debian/rsyslog.logcheck.ignore.server
  - Update logcheck rules files to also ignore rsyslogd and imklog stop
    messages.
* debian/control
  - Bump Standards-Version to 3.8.2. No further changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#include "obj.h"
26
26
#include "tcps_sess.h"
27
27
 
 
28
/* support for framing anomalies */
 
29
typedef enum ETCPsyslogFramingAnomaly {
 
30
        frame_normal = 0,
 
31
        frame_NetScreen = 1,
 
32
        frame_CiscoIOS = 2
 
33
} eTCPsyslogFramingAnomaly;
 
34
 
 
35
#define TCPSRV_NO_ADDTL_DELIMITER -1 /* specifies that no additional delimiter is to be used in TCP framing */
 
36
 
28
37
/* the tcpsrv object */
29
38
struct tcpsrv_s {
30
39
        BEGINobjInstance;       /**< Data to implement generic object - MUST be the first data element! */
31
40
        netstrms_t *pNS;        /**< pointer to network stream subsystem */
32
41
        int iDrvrMode;          /**< mode of the stream driver to use */
33
42
        uchar *pszDrvrAuthMode; /**< auth mode of the stream driver to use */
 
43
        uchar *pszInputName;    /**< value to be used as input name */
34
44
        permittedPeers_t *pPermPeers;/**< driver's permitted peers */
35
45
        int iLstnMax;           /**< max nbr of listeners currently supported */
36
46
        netstrm_t **ppLstn;     /**< our netstream listners */
37
47
        int iSessMax;           /**< max number of sessions supported */
38
48
        char *TCPLstnPort;      /**< the port the listener shall listen on */
 
49
        int addtlFrameDelim;    /**< additional frame delimiter for plain TCP syslog framing (e.g. to handle NetScreen) */
39
50
        tcps_sess_t **pSessions;/**< array of all of our sessions */
40
51
        void *pUsr;             /**< a user-settable pointer (provides extensibility for "derived classes")*/
41
52
        /* callbacks */
64
75
        rsRetVal (*create_tcp_socket)(tcpsrv_t *pThis);
65
76
        rsRetVal (*Run)(tcpsrv_t *pThis);
66
77
        /* set methods */
 
78
        rsRetVal (*SetAddtlFrameDelim)(tcpsrv_t*, int);
 
79
        rsRetVal (*SetInputName)(tcpsrv_t*, uchar*);
67
80
        rsRetVal (*SetUsrP)(tcpsrv_t*, void*);
68
81
        rsRetVal (*SetCBIsPermittedHost)(tcpsrv_t*, int (*) (struct sockaddr *addr, char*, void*, void*));
69
82
        rsRetVal (*SetCBOpenLstnSocks)(tcpsrv_t *, rsRetVal (*)(tcpsrv_t*));
79
92
        rsRetVal (*SetCBOnSessAccept)(tcpsrv_t*, rsRetVal (*) (tcpsrv_t*, tcps_sess_t*));
80
93
        rsRetVal (*SetCBOnSessDestruct)(tcpsrv_t*, rsRetVal (*) (void*));
81
94
        rsRetVal (*SetCBOnSessConstructFinalize)(tcpsrv_t*, rsRetVal (*) (void*));
82
 
        /* added v4 */
 
95
        /* added v5 */
83
96
        rsRetVal (*SetSessMax)(tcpsrv_t *pThis, int iMaxSess);  /* 2009-04-09 */
84
97
ENDinterface(tcpsrv)
85
 
#define tcpsrvCURR_IF_VERSION 4 /* increment whenever you change the interface structure! */
 
98
#define tcpsrvCURR_IF_VERSION 5 /* increment whenever you change the interface structure! */
 
99
/* change for v4:
 
100
 * - SetAddtlFrameDelim() added -- rgerhards, 2008-12-10
 
101
 * - SetInputName() added -- rgerhards, 2008-12-10
 
102
 * change for v5 and up: see above
 
103
 */
86
104
 
87
105
 
88
106
/* prototypes */