head 1.3; access; symbols LMTP2NNTP_1_4_1:1.3 LMTP2NNTP_1_4_0:1.3 LMTP2NNTP_1_3_0:1.3 LMTP2NNTP_1_3b2:1.3 LMTP2NNTP_1_3b1:1.3 LMTP2NNTP_1_3a3:1.3 LMTP2NNTP_1_3a2:1.3 LMTP2NNTP_1_3a1:1.3 LMTP2NNTP_1_2_0:1.3 LMTP2NNTP_1_2b4:1.3 LMTP2NNTP_1_2b3:1.3 LMTP2NNTP_1_2b2:1.3 LMTP2NNTP_1_2b1:1.3 LMTP2NNTP_1_2a8:1.3 LMTP2NNTP_1_2a7:1.2; locks; strict; comment @ * @; 1.3 date 2003.02.06.13.50.08; author thl; state Exp; branches; next 1.2; 1.2 date 2003.01.30.19.42.12; author rse; state Exp; branches; next 1.1; 1.1 date 2003.01.30.19.27.29; author rse; state Exp; branches; next ; desc @@ 1.3 log @moving definitions between header files @ text @/* ** OSSP lmtp2nntp - Mail to News Gateway ** Copyright (c) 2002-2003 Ralf S. Engelschall ** Copyright (c) 2002-2003 The OSSP Project ** Copyright (c) 2002-2003 Cable & Wireless Germany ** ** This file is part of OSSP lmtp2nntp, an LMTP speaking local ** mailer which forwards mails as Usenet news articles via NNTP. ** It can be found at http://www.ossp.org/pkg/tool/lmtp2nntp/. ** ** This program is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License ** as published by the Free Software Foundation; either version ** 2.0 of the License, or (at your option) any later version. ** ** This program is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ** General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with this file; if not, write to the Free Software ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 ** USA, or contact the OSSP project . ** ** lmtp2nntp_common.h: common stuff */ #ifndef __LMTP2NNTP_COMMON_H__ #define __LMTP2NNTP_COMMON_H__ #include #include #include struct acl { char *acl; int not; size_t prefixlen; sa_addr_t *saa; }; #include "lmtp2nntp_nntp.h" struct ns { sa_addr_t *saa; sa_t *sa; nntp_t *nntp; nntp_rc_t rc; l2_channel_t *l2; }; struct session { int lhlo_seen; char *lhlo_domain; }; #include typedef struct { l2_context_t ctx; val_t *prival; val_t *val; char *progname; int option_groupmode; int option_operationmode; char *option_operationmodefakestatus; char *option_operationmodefakedsn; int option_maxmessagesize; headerrule_t *option_firstheaderrule; int option_timeout_lmtp_accept; int option_timeout_lmtp_read; int option_timeout_lmtp_write; int option_timeout_nntp_connect; int option_timeout_nntp_read; int option_timeout_nntp_write; char *option_nodename; char *option_mailfrom; char *option_restrictheader; char *option_pidfile; int option_killflag; uid_t option_uid; int option_daemon; int nacl; /* number of acl structures found at pacl */ struct acl *pacl; /* pointer to an array of acl structures */ int option_childsmax; int active_childs; l2_env_t *l2_env; l2_channel_t *l2; sa_addr_t *saaServerbind; sa_t *saServerbind; sa_addr_t *saaClientbind; sa_t *saClientbind; sa_addr_t *saaIO; sa_t *saIO; int fdIOi; int fdIOo; int nns; /* number of ns structures found at pns */ struct ns *pns; /* pointer to an array of ns structures */ char *azGroupargs; size_t asGroupargs; struct session session; msg_t *msg; var_t *config_varregex; var_t *config_varctx; int msgcount; /* number of messages processed, used for creating unique ids */ } lmtp2nntp_t; #define ERR_EXECUTION 1 #define ERR_DELIVERY -2 enum { GROUPMODE_UNDEF = 0, GROUPMODE_ARG, GROUPMODE_ENVELOPE, GROUPMODE_HEADER }; enum { OPERATIONMODE_UNDEF = 0, OPERATIONMODE_FAKE, OPERATIONMODE_POST, OPERATIONMODE_FEED }; void msg_headermatrixbuildup(msg_t *msg); void msg_headermatrixteardwn(msg_t *msg); void headerrewrite(lmtp2nntp_t *ctx); #include "l2.h" extern l2_handler_t l2_handler_var; extern void logbook(l2_channel_t *, l2_level_t, const char *, ...); #endif /* __LMTP2NNTP_COMMON_H__ */ @ 1.2 log @Apply the standard OSSP copyright header, document ASCII art and fix URL to lmtp2nntp homepage. @ text @a28 7 /* * FIXME this stuff actually should be not global/common! It was mainly * a temporary fix to allow code migration from lmtp2nntp_main.c's * getopt switch to lmtp2nntp_config.[ch]. Unfortunately it is very hard * to move this remaining stuff into local contexts. */ d42 1 a42 2 struct nntp_st; typedef struct nntp_st nntp_t; d51 1 d56 1 a57 29 struct headerrule_st; typedef struct headerrule_st headerrule_t; #include struct headerrule_st { headerrule_t *next; int pri; char *regex; char *name; char *val; pcre *pcreRegex; pcre_extra *pcreExtra; }; headerrule_t *FIXME1; struct headerdata_st; typedef struct headerdata_st headerdata_t; struct headerdata_st { headerdata_t *prev; headerdata_t *next; char *name; int ndata; /* =0 means data is invalid, =1 means use data.s, >1 means use data.m */ union { char *s; char **m; } data; }; headerdata_t *FIXME2; a132 1 @ 1.1 log @Implement the decision from yesterday evening and finally rename fixme.h to lmtp2nntp_common.h because there is little chance this this stuff ever can be moved into more local source contexts. @ text @d2 4 a5 2 ** Copyright (c) 2001-2002 The OSSP Project ** Copyright (c) 2001-2002 Cable & Wireless Deutschland d9 1 a9 1 ** It can be found at http://www.ossp.org/pkg/lmtp2nntp/. @