use std::os::raw::{c_void,c_char,c_int};
use crate::core::SC;
use std::ffi::CStr;
+use crate::core::StreamingBufferConfig;
// Make the AppLayerEvent derive macro available to users importing
// AppLayerEvent from this module.
($ptr:ident, $ty:ty) => ( &mut *($ptr as *mut $ty) );
}
+/// helper for the GetTxFilesFn. Not meant to be embedded as the config
+/// pointer is passed around in the API.
+#[allow(non_snake_case)]
+#[repr(C)]
+pub struct AppLayerGetFileState {
+ pub fc: *mut FileContainer,
+ pub cfg: *const StreamingBufferConfig,
+}
+impl AppLayerGetFileState {
+ pub fn err() -> AppLayerGetFileState {
+ AppLayerGetFileState { fc: std::ptr::null_mut(), cfg: std::ptr::null() }
+ }
+}
+
pub type ParseFn = unsafe extern "C" fn (flow: *const Flow,
state: *mut c_void,
pstate: *mut c_void,
pub type GetEventInfoByIdFn = unsafe extern "C" fn (c_int, *mut *const c_char, *mut AppLayerEventType) -> i8;
pub type LocalStorageNewFn = extern "C" fn () -> *mut c_void;
pub type LocalStorageFreeFn = extern "C" fn (*mut c_void);
-pub type GetTxFilesFn = unsafe extern "C" fn (*mut c_void, u8) -> *mut FileContainer;
+pub type GetTxFilesFn = unsafe extern "C" fn (*mut c_void, *mut c_void, u8) -> AppLayerGetFileState;
pub type GetTxIteratorFn = unsafe extern "C" fn (ipproto: u8, alproto: AppProto,
state: *mut c_void,
min_tx_id: u64,
#[no_mangle]
pub unsafe extern "C" fn rs_http2_getfiles(
+ _state: *mut std::os::raw::c_void,
tx: *mut std::os::raw::c_void, direction: u8,
-) -> *mut FileContainer {
+) -> AppLayerGetFileState {
let tx = cast_pointer!(tx, HTTP2Transaction);
- if direction == Direction::ToClient.into() {
- &mut tx.files.files_tc as *mut FileContainer
- } else {
- &mut tx.files.files_ts as *mut FileContainer
+ let (files, _flags) = tx.files.get(direction.into());
+ if let Some(sfcm) = { SURICATA_HTTP2_FILE_CONFIG } {
+ return AppLayerGetFileState { fc: files, cfg: sfcm.files_sbcfg }
}
+ AppLayerGetFileState::err()
}
// Parser name as a C style string.
}
#[no_mangle]
-pub unsafe extern "C" fn rs_nfs_gettxfiles(tx_ptr: *mut std::ffi::c_void, direction: u8) -> * mut FileContainer {
- let tx = cast_pointer!(tx_ptr, NFSTransaction);
+pub unsafe extern "C" fn rs_nfs_gettxfiles(_state: *mut std::ffi::c_void, tx: *mut std::ffi::c_void, direction: u8) -> AppLayerGetFileState {
+ let tx = cast_pointer!(tx, NFSTransaction);
if let Some(NFSTransactionTypeData::FILE(ref mut tdf)) = tx.type_data {
let (files, _flags) = tdf.files.get(direction.into());
- files
- } else {
- std::ptr::null_mut()
+ if let Some(sfcm) = { SURICATA_NFS_FILE_CONFIG } {
+ return AppLayerGetFileState { fc: files, cfg: sfcm.files_sbcfg }
+ }
}
+ AppLayerGetFileState::err()
}
#[derive(Debug)]
}
}
+use crate::applayer::AppLayerGetFileState;
#[no_mangle]
-pub unsafe extern "C" fn rs_smb_gettxfiles(tx_ptr: *mut std::ffi::c_void, direction: u8) -> * mut FileContainer {
- let tx = cast_pointer!(tx_ptr, SMBTransaction);
+pub unsafe extern "C" fn rs_smb_gettxfiles(_state: *mut std::ffi::c_void, tx: *mut std::ffi::c_void, direction: u8) -> AppLayerGetFileState {
+ let tx = cast_pointer!(tx, SMBTransaction);
if let Some(SMBTransactionTypeData::FILE(ref mut tdf)) = tx.type_data {
let (files, _flags) = tdf.files.get(direction.into());
- files
- } else {
- std::ptr::null_mut()
+ if let Some(sfcm) = { SURICATA_SMB_FILE_CONFIG } {
+ return AppLayerGetFileState { fc: files, cfg: sfcm.files_sbcfg }
+ }
}
+ AppLayerGetFileState::err()
}
return FTPDATA_STATE_FINISHED;
}
-static FileContainer *FTPDataStateGetTxFiles(void *tx, uint8_t direction)
+static AppLayerGetFileState FTPDataStateGetTxFiles(void *_state, void *tx, uint8_t direction)
{
FtpDataState *ftpdata_state = (FtpDataState *)tx;
+ AppLayerGetFileState files = { .fc = NULL, .cfg = &sbcfg };
- if (direction != ftpdata_state->direction)
- SCReturnPtr(NULL, "FileContainer");
+ if (direction == ftpdata_state->direction)
+ files.fc = ftpdata_state->files;
- SCReturnPtr(ftpdata_state->files, "FileContainer");
+ return files;
}
static void FTPSetMpmState(void)
* \param direction flow direction
* \retval files files ptr
*/
-static FileContainer *HTPGetTxFiles(void *txv, uint8_t direction)
+static AppLayerGetFileState HTPGetTxFiles(void *state, void *txv, uint8_t direction)
{
+ AppLayerGetFileState files = { .fc = NULL, .cfg = NULL };
+ HtpState *s = state;
htp_tx_t *tx = (htp_tx_t *)txv;
HtpTxUserData *tx_ud = htp_tx_get_user_data(tx);
if (tx_ud) {
if (direction & STREAM_TOCLIENT) {
- SCReturnPtr(&tx_ud->files_tc, "FileContainer");
+ files.fc = &tx_ud->files_tc;
+ files.cfg = &s->cfg->response.sbcfg;
} else {
- SCReturnPtr(&tx_ud->files_ts, "FileContainer");
+ files.fc = &tx_ud->files_ts;
+ files.cfg = &s->cfg->request.sbcfg;
}
}
- SCReturnPtr(NULL, "FileContainer");
+ return files;
}
static int HTPStateGetAlstateProgress(void *tx, uint8_t direction)
void *tx_ptr = AppLayerParserGetTx(IPPROTO_TCP, ALPROTO_HTTP1, http_state, 0);
FAIL_IF_NULL(tx_ptr);
- FileContainer *ffc = HTPGetTxFiles(tx_ptr, STREAM_TOCLIENT);
+ AppLayerGetFileState files = HTPGetTxFiles(http_state, tx_ptr, STREAM_TOCLIENT);
+ FileContainer *ffc = files.fc;
FAIL_IF_NULL(ffc);
File *ptr = ffc->head;
/** get FileContainer reference from the TX. MUST return a non-NULL reference if the TX
* has or may have files in the requested direction at some point. */
- FileContainer *(*GetTxFiles)(void *, uint8_t);
+ AppLayerGetFileState (*GetTxFiles)(void *, void *, uint8_t);
int (*StateGetProgress)(void *alstate, uint8_t direction);
uint64_t (*StateGetTxCnt)(void *alstate);
SCReturn;
}
-void AppLayerParserRegisterGetTxFilesFunc(
- uint8_t ipproto, AppProto alproto, FileContainer *(*GetTxFiles)(void *, uint8_t))
+void AppLayerParserRegisterGetTxFilesFunc(uint8_t ipproto, AppProto alproto,
+ AppLayerGetFileState (*GetTxFiles)(void *, void *, uint8_t))
{
SCEnter();
SCReturnPtr(ptr, "AppLayerDecoderEvents *");
}
-FileContainer *AppLayerParserGetTxFiles(const Flow *f, void *tx, const uint8_t direction)
+AppLayerGetFileState AppLayerParserGetTxFiles(
+ const Flow *f, void *state, void *tx, const uint8_t direction)
{
SCEnter();
- FileContainer *ptr = NULL;
-
if (alp_ctx.ctxs[f->protomap][f->alproto].GetTxFiles != NULL) {
- ptr = alp_ctx.ctxs[f->protomap][f->alproto].GetTxFiles(tx, direction);
+ return alp_ctx.ctxs[f->protomap][f->alproto].GetTxFiles(state, tx, direction);
}
- SCReturnPtr(ptr, "FileContainer *");
+ AppLayerGetFileState files = { .fc = NULL, .cfg = NULL };
+ return files;
}
static void AppLayerParserFileTxHousekeeping(
const Flow *f, void *tx, const uint8_t pkt_dir, const bool trunc)
{
- FileContainer *fc = AppLayerParserGetTxFiles(f, tx, pkt_dir);
- if (fc) {
+ AppLayerGetFileState files = AppLayerParserGetTxFiles(f, FlowGetAppState(f), tx, pkt_dir);
+ if (files.fc) {
if (trunc) {
- FileTruncateAllOpenFiles(fc);
+ FileTruncateAllOpenFiles(files.fc);
}
- FilePrune(fc);
+ FilePrune(files.fc);
}
}
void *(*LocalStorageAlloc)(void), void (*LocalStorageFree)(void *));
// void AppLayerParserRegisterGetEventsFunc(uint8_t ipproto, AppProto proto,
// AppLayerDecoderEvents *(*StateGetEvents)(void *) __attribute__((nonnull)));
-void AppLayerParserRegisterGetTxFilesFunc(
- uint8_t ipproto, AppProto alproto, FileContainer *(*GetTxFiles)(void *, uint8_t));
+void AppLayerParserRegisterGetTxFilesFunc(uint8_t ipproto, AppProto alproto,
+ AppLayerGetFileState (*GetTxFiles)(void *, void *, uint8_t));
void AppLayerParserRegisterLoggerFuncs(uint8_t ipproto, AppProto alproto,
LoggerId (*StateGetTxLogged)(void *, void *),
void (*StateSetTxLogged)(void *, void *, LoggerId));
AppLayerDecoderEvents *AppLayerParserGetDecoderEvents(AppLayerParserState *pstate);
void AppLayerParserSetDecoderEvents(AppLayerParserState *pstate, AppLayerDecoderEvents *devents);
AppLayerDecoderEvents *AppLayerParserGetEventsByTx(uint8_t ipproto, AppProto alproto, void *tx);
-FileContainer *AppLayerParserGetTxFiles(const Flow *f, void *tx, const uint8_t direction);
+AppLayerGetFileState AppLayerParserGetTxFiles(
+ const Flow *f, void *state, void *tx, const uint8_t direction);
int AppLayerParserGetStateProgress(uint8_t ipproto, AppProto alproto,
void *alstate, uint8_t direction);
uint64_t AppLayerParserGetTxCnt(const Flow *, void *alstate);
void *(*LocalStorageAlloc)(void);
void (*LocalStorageFree)(void *);
- FileContainer *(*GetTxFiles)(void *, uint8_t);
+ AppLayerGetFileState (*GetTxFiles)(void *, void *, uint8_t);
AppLayerGetTxIterTuple (*GetTxIterator)(const uint8_t ipproto,
const AppProto alproto, void *alstate, uint64_t min_tx_id,
return tx->done;
}
-static FileContainer *SMTPGetTxFiles(void *txv, uint8_t direction)
+static AppLayerGetFileState SMTPGetTxFiles(void *state, void *txv, uint8_t direction)
{
+ AppLayerGetFileState files = { .fc = NULL, .cfg = &smtp_config.sbcfg };
SMTPTransaction *tx = (SMTPTransaction *)txv;
- if (direction & STREAM_TOCLIENT) {
- SCReturnPtr(NULL, "FileContainer");
- } else {
- SCLogDebug("tx->files_ts %p", &tx->files_ts);
- SCReturnPtr(&tx->files_ts, "FileContainer");
+ if (direction & STREAM_TOSERVER) {
+ files.fc = &tx->files_ts;
}
+ return files;
}
static AppLayerTxData *SMTPGetTxData(void *vtx)
*/
uint8_t DetectFileInspectGeneric(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx,
const struct DetectEngineAppInspectionEngine_ *engine, const Signature *s, Flow *f,
- uint8_t flags, void *_alstate, void *tx, uint64_t tx_id)
+ uint8_t flags, void *alstate, void *tx, uint64_t tx_id)
{
SCEnter();
- DEBUG_VALIDATE_BUG_ON(f->alstate != _alstate);
+ DEBUG_VALIDATE_BUG_ON(f->alstate != alstate);
const uint8_t direction = flags & (STREAM_TOSERVER|STREAM_TOCLIENT);
- FileContainer *ffc = AppLayerParserGetTxFiles(f, tx, direction);
+ AppLayerGetFileState files = AppLayerParserGetTxFiles(f, alstate, tx, direction);
+ FileContainer *ffc = files.fc;
SCLogDebug("tx %p tx_id %" PRIu64 " ffc %p ffc->head %p sid %u", tx, tx_id, ffc,
ffc ? ffc->head : NULL, s->id);
if (ffc == NULL) {
SigMatchSignatures(&th_v, de_ctx, det_ctx, p);
FAIL_IF(!(PacketAlertCheck(p, 1)));
- FileContainer *files = AppLayerParserGetTxFiles(p->flow, tx, STREAM_TOSERVER);
- FAIL_IF_NULL(files);
+ AppLayerGetFileState files = AppLayerParserGetTxFiles(p->flow, http_state, tx, STREAM_TOSERVER);
+ FileContainer *fc = files.fc;
+ FAIL_IF_NULL(fc);
- File *file = files->head;
+ File *file = fc->head;
FAIL_IF_NULL(file);
FAIL_IF(!(file->flags & FILE_STORE));
HtpTxUserData *tx_ud = htp_tx_get_user_data(tx);
FAIL_IF_NULL(tx_ud);
- FileContainer *files = AppLayerParserGetTxFiles(p->flow, tx, STREAM_TOSERVER);
- FAIL_IF_NULL(files);
- File *file = files->head;
+ AppLayerGetFileState files = AppLayerParserGetTxFiles(p->flow, http_state, tx, STREAM_TOSERVER);
+ FileContainer *fc = files.fc;
+ FAIL_IF_NULL(fc);
+ File *file = fc->head;
FAIL_IF_NULL(file);
FAIL_IF(file->flags & FILE_STORE);
HtpTxUserData *tx_ud = htp_tx_get_user_data(tx);
FAIL_IF_NULL(tx_ud);
- FileContainer *files = AppLayerParserGetTxFiles(p->flow, tx, STREAM_TOSERVER);
- FAIL_IF_NULL(files);
- File *file = files->head;
+ AppLayerGetFileState files = AppLayerParserGetTxFiles(p->flow, http_state, tx, STREAM_TOSERVER);
+ FileContainer *fc = files.fc;
+ FAIL_IF_NULL(fc);
+ File *file = fc->head;
FAIL_IF_NULL(file);
FAIL_IF(http_state->state_data.file_flags & FLOWFILE_NO_STORE_TS);
HtpTxUserData *tx_ud = htp_tx_get_user_data(tx);
FAIL_IF_NULL(tx_ud);
- FileContainer *files = AppLayerParserGetTxFiles(p->flow, tx, STREAM_TOSERVER);
- FAIL_IF_NULL(files);
- File *file = files->head;
+ AppLayerGetFileState files = AppLayerParserGetTxFiles(p->flow, http_state, tx, STREAM_TOSERVER);
+ FileContainer *fc = files.fc;
+ FAIL_IF_NULL(fc);
+ File *file = fc->head;
FAIL_IF_NULL(file);
/* detect will have set FLOWFILE_NO_STORE_TS, but it won't have had
* an opportunity to be applied to the file itself yet */
HtpTxUserData *tx_ud = htp_tx_get_user_data(tx);
FAIL_IF_NULL(tx_ud);
- FileContainer *files = AppLayerParserGetTxFiles(p->flow, tx, STREAM_TOSERVER);
- FAIL_IF_NULL(files);
- File *file = files->head;
+ AppLayerGetFileState files = AppLayerParserGetTxFiles(p->flow, http_state, tx, STREAM_TOSERVER);
+ FileContainer *fc = files.fc;
+ FAIL_IF_NULL(fc);
+ File *file = fc->head;
FAIL_IF_NULL(file);
FAIL_IF(file->flags & FILE_STORE);
HtpTxUserData *tx_ud = htp_tx_get_user_data(tx);
FAIL_IF_NULL(tx_ud);
- FileContainer *files = AppLayerParserGetTxFiles(p->flow, tx, STREAM_TOSERVER);
- FAIL_IF_NULL(files);
- File *file = files->head;
+ AppLayerGetFileState files = AppLayerParserGetTxFiles(p->flow, http_state, tx, STREAM_TOSERVER);
+ FileContainer *fc = files.fc;
+ FAIL_IF_NULL(fc);
+ File *file = fc->head;
FAIL_IF_NULL(file);
FAIL_IF(file->flags & FILE_STORE);
tx_ud = htp_tx_get_user_data(tx);
FAIL_IF_NULL(tx_ud);
- files = AppLayerParserGetTxFiles(p->flow, tx, STREAM_TOSERVER);
- FAIL_IF_NULL(files);
- file = files->head;
+ files = AppLayerParserGetTxFiles(p->flow, http_state, tx, STREAM_TOSERVER);
+ fc = files.fc;
+ FAIL_IF_NULL(fc);
+ file = fc->head;
FAIL_IF_NULL(file);
file = file->next;
FAIL_IF_NULL(file);
HtpTxUserData *tx_ud = htp_tx_get_user_data(tx);
FAIL_IF_NULL(tx_ud);
- FileContainer *files = AppLayerParserGetTxFiles(p->flow, tx, STREAM_TOSERVER);
- FAIL_IF_NULL(files);
- File *file = files->head;
+ AppLayerGetFileState files = AppLayerParserGetTxFiles(p->flow, http_state, tx, STREAM_TOSERVER);
+ FileContainer *fc = files.fc;
+ FAIL_IF_NULL(fc);
+ File *file = fc->head;
FAIL_IF_NULL(file);
FAIL_IF_NOT(file->flags & FILE_STORE);
tx_ud = htp_tx_get_user_data(tx);
FAIL_IF_NULL(tx_ud);
- files = AppLayerParserGetTxFiles(p->flow, tx, STREAM_TOSERVER);
- FAIL_IF_NULL(files);
- file = files->head;
+ files = AppLayerParserGetTxFiles(p->flow, http_state, tx, STREAM_TOSERVER);
+ fc = files.fc;
+ FAIL_IF_NULL(fc);
+ file = fc->head;
FAIL_IF_NULL(file);
FAIL_IF_NOT(file->flags & FILE_STORE);
HtpTxUserData *tx_ud = htp_tx_get_user_data(tx);
FAIL_IF_NULL(tx_ud);
- FileContainer *files = AppLayerParserGetTxFiles(p->flow, tx, STREAM_TOSERVER);
- FAIL_IF_NULL(files);
- File *file = files->head;
+ AppLayerGetFileState files = AppLayerParserGetTxFiles(p->flow, http_state, tx, STREAM_TOSERVER);
+ FileContainer *fc = files.fc;
+ FAIL_IF_NULL(fc);
+ File *file = fc->head;
FAIL_IF_NULL(file);
FAIL_IF_NOT(file->flags & FILE_STORE);
tx_ud = htp_tx_get_user_data(tx);
FAIL_IF_NULL(tx_ud);
- files = AppLayerParserGetTxFiles(p->flow, tx, STREAM_TOSERVER);
- FAIL_IF_NULL(files);
- file = files->head;
+ files = AppLayerParserGetTxFiles(p->flow, http_state, tx, STREAM_TOSERVER);
+ fc = files.fc;
+ FAIL_IF_NULL(fc);
+ file = fc->head;
FAIL_IF_NULL(file);
FAIL_IF_NOT(file->flags & FILE_STORE);
transforms = engine->v2.transforms;
}
- FileContainer *ffc = AppLayerParserGetTxFiles(f, txv, flags);
+ AppLayerGetFileState files = AppLayerParserGetTxFiles(f, alstate, txv, flags);
+ FileContainer *ffc = files.fc;
if (ffc == NULL) {
return DETECT_ENGINE_INSPECT_SIG_CANT_MATCH_FILES;
}
const MpmCtx *mpm_ctx = ctx->mpm_ctx;
const int list_id = ctx->list_id;
- FileContainer *ffc = AppLayerParserGetTxFiles(f, txv, flags);
+ AppLayerGetFileState files = AppLayerParserGetTxFiles(f, f->alstate, txv, flags);
+ FileContainer *ffc = files.fc;
if (ffc != NULL) {
int local_file_id = 0;
for (File *file = ffc->head; file != NULL; file = file->next) {
transforms = engine->v2.transforms;
}
- FileContainer *ffc = AppLayerParserGetTxFiles(f, txv, flags);
+ AppLayerGetFileState files = AppLayerParserGetTxFiles(f, alstate, txv, flags);
+ FileContainer *ffc = files.fc;
if (ffc == NULL) {
return DETECT_ENGINE_INSPECT_SIG_CANT_MATCH_FILES;
}
const MpmCtx *mpm_ctx = ctx->mpm_ctx;
const int list_id = ctx->list_id;
- FileContainer *ffc = AppLayerParserGetTxFiles(f, txv, flags);
+ AppLayerGetFileState files = AppLayerParserGetTxFiles(f, f->alstate, txv, flags);
+ FileContainer *ffc = files.fc;
if (ffc != NULL) {
int local_file_id = 0;
for (File *file = ffc->head; file != NULL; file = file->next) {
transforms = engine->v2.transforms;
}
- FileContainer *ffc = AppLayerParserGetTxFiles(f, txv, flags);
+ AppLayerGetFileState files = AppLayerParserGetTxFiles(f, alstate, txv, flags);
+ FileContainer *ffc = files.fc;
if (ffc == NULL) {
return DETECT_ENGINE_INSPECT_SIG_CANT_MATCH_FILES;
}
const MpmCtx *mpm_ctx = ctx->mpm_ctx;
const int list_id = ctx->list_id;
- FileContainer *ffc = AppLayerParserGetTxFiles(f, txv, flags);
+ AppLayerGetFileState files = AppLayerParserGetTxFiles(f, f->alstate, txv, flags);
+ FileContainer *ffc = files.fc;
if (ffc != NULL) {
int local_file_id = 0;
for (File *file = ffc->head; file != NULL; file = file->next) {
const uint8_t flags = STREAM_FLAGS_FOR_PACKET(p);
for (uint16_t u = 0; u < det_ctx->filestore_cnt; u++) {
- AppLayerParserSetStreamDepthFlag(p->flow->proto, p->flow->alproto, FlowGetAppState(p->flow),
- det_ctx->filestore[u].tx_id, flags);
+ void *alstate = FlowGetAppState(p->flow);
+ AppLayerParserSetStreamDepthFlag(
+ p->flow->proto, p->flow->alproto, alstate, det_ctx->filestore[u].tx_id, flags);
- void *txv = AppLayerParserGetTx(p->flow->proto, p->flow->alproto, FlowGetAppState(p->flow),
- det_ctx->filestore[u].tx_id);
+ void *txv = AppLayerParserGetTx(
+ p->flow->proto, p->flow->alproto, alstate, det_ctx->filestore[u].tx_id);
DEBUG_VALIDATE_BUG_ON(txv == NULL);
if (txv) {
- FileContainer *ffc_tx = AppLayerParserGetTxFiles(p->flow, txv, flags);
+ AppLayerGetFileState files = AppLayerParserGetTxFiles(p->flow, alstate, txv, flags);
+ FileContainer *ffc_tx = files.fc;
DEBUG_VALIDATE_BUG_ON(ffc_tx == NULL);
if (ffc_tx) {
SCLogDebug("u %u txv %p ffc_tx %p file_id %u", u, txv, ffc_tx,
if (p->flow->alstate != NULL) {
void *tx = AppLayerParserGetTx(p->flow->proto, p->flow->alproto, p->flow->alstate, tx_id);
if (tx) {
- ffc = AppLayerParserGetTxFiles(p->flow, tx, direction);
+ AppLayerGetFileState files =
+ AppLayerParserGetTxFiles(p->flow, p->flow->alstate, tx, direction);
+ ffc = files.fc;
}
}
if (ffc != NULL) {
opposing_dir == STREAM_TOSERVER ? "TOSERVER" : "TOCLIENT", packet_dir_ready,
opposing_dir_ready);
- FileContainer *ffc = AppLayerParserGetTxFiles(f, tx, packet_dir);
- FileContainer *ffc_opposing = AppLayerParserGetTxFiles(f, tx, opposing_dir);
+ AppLayerGetFileState app_files =
+ AppLayerParserGetTxFiles(f, FlowGetAppState(f), tx, packet_dir);
+ FileContainer *ffc = app_files.fc;
+ AppLayerGetFileState app_files_opposing =
+ AppLayerParserGetTxFiles(f, FlowGetAppState(f), tx, opposing_dir);
+ FileContainer *ffc_opposing = app_files_opposing.fc;
/* see if opposing side is finished: if no file support in this direction, of is not
* files and tx is done for opposing dir. */