diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-07-17 11:37:53 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-07-17 11:37:53 +0200 |
commit | 4c2bef51d1517ad469e0ecf837ec7e87309ba1dd (patch) | |
tree | 4fb5e4b13c27c483e03d355dcf4af30933f4de79 /runtime/msg.h | |
parent | d4ca9a48d6ae23f0036372563f4480baab361858 (diff) | |
download | rsyslog-4c2bef51d1517ad469e0ecf837ec7e87309ba1dd.tar.gz rsyslog-4c2bef51d1517ad469e0ecf837ec7e87309ba1dd.tar.bz2 rsyslog-4c2bef51d1517ad469e0ecf837ec7e87309ba1dd.zip |
milestone: basic local variable functionality available
but some nits, like do not work with disk queues
Diffstat (limited to 'runtime/msg.h')
-rw-r--r-- | runtime/msg.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/msg.h b/runtime/msg.h index efa36d91..f9ffc5e3 100644 --- a/runtime/msg.h +++ b/runtime/msg.h @@ -108,6 +108,7 @@ struct msg { struct syslogTime tRcvdAt;/* time the message entered this program */ struct syslogTime tTIMESTAMP;/* (parsed) value of the timestamp */ struct json_object *json; + struct json_object *localvars; /* some fixed-size buffers to save malloc()/free() for frequently used fields (from the default templates) */ uchar szRawMsg[CONF_RAWMSG_BUFSIZE]; /* most messages are small, and these are stored here (without malloc/free!) */ uchar szHOSTNAME[CONF_HOSTNAME_BUFSIZE]; @@ -186,6 +187,7 @@ char *getPRI(msg_t *pMsg); void getRawMsg(msg_t *pM, uchar **pBuf, int *piLen); rsRetVal msgGetCEEVar(msg_t *pThis, cstr_t *propName, var_t **ppVar); es_str_t* msgGetCEEVarNew(msg_t *pMsg, char *name); +es_str_t* msgGetLocalVarNew(msg_t *pMsg, char *name); rsRetVal msgAddJSON(msg_t *pM, uchar *name, struct json_object *json); rsRetVal getCEEPropVal(msg_t *pM, es_str_t *propName, uchar **pRes, rs_size_t *buflen, unsigned short *pbMustBeFreed); rsRetVal MsgGetSeverity(msg_t *pThis, int *piSeverity); @@ -206,6 +208,7 @@ uchar *getRcvFrom(msg_t *pM); rsRetVal propNameToID(cstr_t *pCSPropName, propid_t *pPropID); uchar *propIDToName(propid_t propID); rsRetVal msgGetCEEPropJSON(msg_t *pM, es_str_t *propName, struct json_object **pjson); +rsRetVal msgGetLocalVarJSON(msg_t *pM, es_str_t *propName, struct json_object **pjson); rsRetVal msgSetJSONFromVar(msg_t *pMsg, uchar *varname, struct var *var); rsRetVal msgDelJSON(msg_t *pMsg, uchar *varname); rsRetVal jsonFind(struct json_object *jroot, es_str_t *propName, struct json_object **jsonres); |