Skip to content

Commit

Permalink
app-layer: add tx detect functions to register struct
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonish committed Nov 27, 2019
1 parent fdb587d commit 20bc08a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/app-layer-register.c
Expand Up @@ -171,6 +171,11 @@ int AppLayerRegisterParser(const struct AppLayerParser *p, AppProto alproto)
p->GetTxIterator);
}

if (p->SetTxDetectFlags && p->GetTxDetectFlags) {
AppLayerParserRegisterDetectFlagsFuncs(p->ip_proto, alproto,
p->GetTxDetectFlags, p->SetTxDetectFlags);
}

return 0;
}

Expand Down
3 changes: 3 additions & 0 deletions src/app-layer-register.h
Expand Up @@ -71,6 +71,9 @@ typedef struct AppLayerParser {
AppLayerGetTxIterTuple (*GetTxIterator)(const uint8_t ipproto,
const AppProto alproto, void *alstate, uint64_t min_tx_id,
uint64_t max_tx_id, AppLayerGetTxIterState *istate);

void (*SetTxDetectFlags)(void *, uint8_t, uint64_t);
uint64_t (*GetTxDetectFlags)(void *, uint8_t);
} AppLayerParser;

/**
Expand Down

0 comments on commit 20bc08a

Please sign in to comment.