Skip to content

Commit

Permalink
flow/pkts: make syntax cleaner and compact
Browse files Browse the repository at this point in the history
Currently, the syntax includes direction as a part of the keyword which
is against how usually keywords are done. By making direction as a
mandatory argument, it is possible to make the syntax cleaner and the
implementation more compact and easily extendable.
Pros:
- Registration table sees lesser entries
- If the options have to be extended, it can be done trivially
- In accordance w existing keyword implementations
  • Loading branch information
inashivb committed Oct 7, 2024
1 parent 3f0512e commit ac9c5d2
Show file tree
Hide file tree
Showing 4 changed files with 152 additions and 181 deletions.
6 changes: 2 additions & 4 deletions src/detect-engine-register.c
Original file line number Diff line number Diff line change
Expand Up @@ -569,10 +569,8 @@ void SigTableSetup(void)
DetectReplaceRegister();
DetectFlowRegister();
DetectFlowAgeRegister();
DetectFlowPktsToClientRegister();
DetectFlowPktsToServerRegister();
DetectFlowBytesToClientRegister();
DetectFlowBytesToServerRegister();
DetectFlowPktsRegister();
DetectFlowBytesRegister();
DetectRequiresRegister();
DetectWindowRegister();
DetectRpcRegister();
Expand Down
6 changes: 2 additions & 4 deletions src/detect-engine-register.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,8 @@ enum DetectKeywordId {
DETECT_FRAME,

DETECT_FLOW_AGE,
DETECT_FLOW_PKTS_TO_CLIENT,
DETECT_FLOW_PKTS_TO_SERVER,
DETECT_FLOW_BYTES_TO_CLIENT,
DETECT_FLOW_BYTES_TO_SERVER,
DETECT_FLOW_PKTS,
DETECT_FLOW_BYTES,

DETECT_REQUIRES,

Expand Down
Loading

0 comments on commit ac9c5d2

Please sign in to comment.