Project

General

Profile

Actions

Optimization #7186

open
JF OD

detect: represent direction with enum

Optimization #7186: detect: represent direction with enum

Added by Juliana Fajardini Reichow over 1 year ago. Updated 2 months ago.

Status:
Assigned
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).

PA Updated by Philippe Antoine over 1 year ago Actions #1

  • Label Beginner, C, Good First Issue added

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

JF Updated by Juliana Fajardini Reichow over 1 year ago Actions #2

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.

VJ Updated by Victor Julien about 1 year ago Actions #3

  • Target version changed from 8.0.0-beta1 to 9.0.0-beta1

PA Updated by Philippe Antoine 2 months ago Actions #4

  • Status changed from New to Assigned
Actions

Also available in: PDF Atom