Project

General

Profile

Actions

Optimization #7186

open

detect: represent direction with enum

Added by Juliana Fajardini Reichow 3 months ago. Updated 3 months ago.

Status:
New
Priority:
Normal
Assignee:
Target version:
Effort:
Difficulty:
Label:
Beginner, C, Good First Issue

Description

As per the discussion seen in https://github.com/OISF/suricata/pull/11530#discussion_r1690185187, replace uint8_t with an enum to represent app-proto direction (https://github.com/OISF/suricata/blob/master/src/detect.h#L431).

Actions #1

Updated by Philippe Antoine 3 months ago

  • Label Beginner, C, Good First Issue added

I would say a bool rather than an enum with 2 values

Actions #2

Updated by Juliana Fajardini Reichow 3 months ago

Philippe Antoine wrote in #note-1:

I would say a bool rather than an enum with 2 values

What I'd like to achieve with this is more readability - as well as type-checking if possible. As long as we have that, it's good, imho.

Actions

Also available in: Atom PDF