• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

OISF / suricata / 22550237931

01 Mar 2026 06:56PM UTC coverage: 64.812% (-8.9%) from 73.687%
22550237931

Pull #14920

github

web-flow
Merge e05854a6d into 90823fa90
Pull Request #14920: draft: rust based configuration file parser and loader - v4

561 of 789 new or added lines in 4 files covered. (71.1%)

23225 existing lines in 498 files now uncovered.

131605 of 203055 relevant lines covered (64.81%)

2328818.84 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/detect-lua-extensions.c
1
/* Copyright (C) 2007-2022 Open Information Security Foundation
2
 *
3
 * You can copy, redistribute or modify this Program under the terms of
4
 * the GNU General Public License version 2 as published by the Free
5
 * Software Foundation.
6
 *
7
 * This program is distributed in the hope that it will be useful,
8
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10
 * GNU General Public License for more details.
11
 *
12
 * You should have received a copy of the GNU General Public License
13
 * version 2 along with this program; if not, write to the Free Software
14
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15
 * 02110-1301, USA.
16
 */
17

18
/**
19
 * \file
20
 *
21
 * \author Victor Julien <victor@inliniac.net>
22
 *
23
 * Functions to expose to the lua scripts.
24
 */
25

26
#include "suricata-common.h"
27

28
#include "decode.h"
29
#include "detect.h"
30

31
#include "flow.h"
32

33
#include "util-debug.h"
34

35
#include "detect-lua.h"
36

37
#include "rust.h"
38
#include "app-layer-parser.h"
39

40
#include "util-lua.h"
41
#include "util-lua-common.h"
42
#include "detect-lua-extensions.h"
43

44
/* Lua registry key for DetectLuaData. */
45
const char luaext_key_ld[] = "suricata:luadata";
46

47
void LuaExtensionsMatchSetup(lua_State *lua_state, DetectLuaData *ld,
48
        DetectEngineThreadCtx *det_ctx, Flow *f, Packet *p, const Signature *s, uint8_t flags)
UNCOV
49
{
×
UNCOV
50
    SCLogDebug("det_ctx %p, f %p", det_ctx, f);
×
51

UNCOV
52
    LuaStateSetSignature(lua_state, s);
×
UNCOV
53
    LuaStateSetFlow(lua_state, f);
×
UNCOV
54
    LuaStateSetDetCtx(lua_state, det_ctx);
×
55

UNCOV
56
    if (det_ctx->tx_id_set) {
×
UNCOV
57
        if (f && f->alstate) {
×
UNCOV
58
            void *txptr = AppLayerParserGetTx(f->proto, f->alproto, f->alstate, det_ctx->tx_id);
×
UNCOV
59
            if (txptr) {
×
UNCOV
60
                LuaStateSetTX(lua_state, txptr, det_ctx->tx_id);
×
UNCOV
61
            }
×
UNCOV
62
        }
×
UNCOV
63
    }
×
64

UNCOV
65
    if (p != NULL)
×
UNCOV
66
        LuaStateSetPacket(lua_state, p);
×
67

UNCOV
68
    LuaStateSetDirection(lua_state, (flags & STREAM_TOSERVER));
×
UNCOV
69
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc