/* omdtn.c
* This is the plugin for rsyslog use in the interplanetary Internet,
* especially useful for rsyslog in space ships of all kinds.
* The core idea was introduced in early 2009 and considered
* doable.
*
* Note that this has not yet been tested for robustness but needs
* to prior to placing it on top of a rocket.
*
* NOTE: read comments in module-template.h for more specifics!
*
* File begun on 2009-04-01 by RGerhards
*
* Copyright 2009 Rainer Gerhards and Adiscon GmbH.
*
* This file is part of rsyslog.
*
* Rsyslog 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 3 of the License, or
* (at your option) any later version.
*
* Rsyslog 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 Rsyslog. If not, see .
*
* A copy of the GPL can be found in the file "COPYING" in this distribution.
*/
#include "config.h"
#include "rsyslog.h"
#include
#include
#include
#include
#include
#include
#include
#include
#include "dirty.h"
#include "syslogd-types.h"
#include "srUtils.h"
#include "template.h"
#include "module-template.h"
#include "errmsg.h"
#include "cfsysline.h"
MODULE_TYPE_OUTPUT
/* internal structures
*/
DEF_OMOD_STATIC_DATA
typedef struct _instanceData {
} instanceData;
BEGINcreateInstance
CODESTARTcreateInstance
ENDcreateInstance
BEGINisCompatibleWithFeature
CODESTARTisCompatibleWithFeature
if(eFeat == sFEATURERepeatedMsgReduction)
iRet = RS_RET_OK;
ENDisCompatibleWithFeature
BEGINfreeInstance
CODESTARTfreeInstance
ENDfreeInstance
BEGINdbgPrintInstInfo
CODESTARTdbgPrintInstInfo
ENDdbgPrintInstInfo
BEGINtryResume
CODESTARTtryResume
ENDtryResume
BEGINdoAction
CODESTARTdoAction
write(1, (char*)ppString[0], strlen((char*)ppString[0]));
ENDdoAction
BEGINparseSelectorAct
CODESTARTparseSelectorAct
CODE_STD_STRING_REQUESTparseSelectorAct(1)
/* first check if this config line is actually for us */
if(strncmp((char*) p, ":omstdout:", sizeof(":omstdout:") - 1)) {
ABORT_FINALIZE(RS_RET_CONFLINE_UNPROCESSED);
}
/* ok, if we reach this point, we have something for us */
p += sizeof(":omstdout:") - 1; /* eat indicator sequence (-1 because of '\0'!) */
CHKiRet(createInstance(&pData));
/* check if a non-standard template is to be applied */
if(*(p-1) == ';')
--p;
CHKiRet(cflineParseTemplateName(&p, *ppOMSR, 0, 0, (uchar*) "RSYSLOG_FileFormat"));
CODE_STD_FINALIZERparseSelectorAct
ENDparseSelectorAct
BEGINmodExit
CODESTARTmodExit
ENDmodExit
BEGINqueryEtryPt
CODESTARTqueryEtryPt
CODEqueryEtryPt_STD_OMOD_QUERIES
ENDqueryEtryPt
BEGINmodInit()
CODESTARTmodInit
*ipIFVersProvided = CURR_MOD_IF_VERSION; /* we only support the current interface specification */
CODEmodInit_QueryRegCFSLineHdlr
ENDmodInit
/* vi:set ai:
*/
pԌ/ѠW:
]7Xͻ_~ }X=y{*b9i:p2!17-o@f5P"j#Ŏk;vƮq<&H W9Y-Y2"͔~x)l(DÃԈv( z
'U3%EAy'k$nn&V[Уhx[:zR."Me 2RGpV'R9"1N.~ȐUZee?+F\Y%.bHGP1R:QnX(2!{"N,rDSIaƍ\B*
Ea,1c*uP8 UC9+k-^)j죌ȝH6YȽ]@g.p "8
aS3m4&/#KVll«Z[F<(3-
j08A7[8f\S=4a[(I^$Q*U88|p,$Uu[im,,ݕdCOf^:iU:/9:X({
&39u Lk"/%(\jMeΤWHD \M}Vmzٵ$. /2'b-PR uc-*K Yn)[AFB"R
@)Wu:IH"zfB|3kG"
)}@>A3+S1#R!Tᗮjܻfpۡ W$fP5dUr~20&$@@G2_
L
U{q/^/cəDy3[xr|v{'o?=>ܧv;JlHj2PeHj(6v
SRrqm
Z_FBáNoznM|c8}ia$qR)n(+ԢJ!
_>Ff1ZR.1G:H?7-ʢ1
]J(0!H˸rWVcbQT BœxOr^t(ip
ƫߢP|*6]}2<u$r`-gDqѢa
zsPUsW"Rz)9ox3GvT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