Skip to content

Commit

Permalink
clean: remove unused struct definitions
Browse files Browse the repository at this point in the history
Found with
git grep "typedef struct" src/ | awk '{print $3}' | sort |
uniq | sed 's/_$//' | while read i; do
echo -n $i; git grep $i | wc -l; done | awk '$2 < 3'

Ticket: 4083
  • Loading branch information
catenacyber authored and victorjulien committed May 22, 2024
1 parent fc2e49f commit b3eb1c4
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 56 deletions.
38 changes: 0 additions & 38 deletions src/decode-ipv6.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,22 +113,6 @@ typedef struct IPV6AuthHdr_
uint32_t ip6ah_seq; /* sequence number */
} __attribute__((__packed__)) IPV6AuthHdr;

typedef struct IPV6EspHdr_
{
uint32_t ip6esph_spi; /* SECURITY PARAMETERS INDEX (SPI) */
uint32_t ip6esph_seq; /* sequence number */
} __attribute__((__packed__)) IPV6EspHdr;

typedef struct IPV6RouteHdr_
{
uint8_t ip6rh_nxt; /* next header */
uint8_t ip6rh_len; /* header length in units of 8 bytes, not
including first 8 bytes. */
uint8_t ip6rh_type; /* routing type */
uint8_t ip6rh_segsleft; /* segments left */
} __attribute__((__packed__)) IPV6RouteHdr;


/* Hop-by-Hop header and Destination Options header use options that are
* defined here. */

Expand Down Expand Up @@ -162,28 +146,6 @@ typedef struct IPV6OptJumbo_
uint32_t ip6j_payload_len; /* Jumbo Payload Length */
} IPV6OptJumbo;

typedef struct IPV6HopOptsHdr_
{
uint8_t ip6hh_nxt; /* next header */
uint8_t ip6hh_len; /* header length in units of 8 bytes, not
including first 8 bytes. */
} __attribute__((__packed__)) IPV6HopOptsHdr;

typedef struct IPV6DstOptsHdr_
{
uint8_t ip6dh_nxt; /* next header */
uint8_t ip6dh_len; /* header length in units of 8 bytes, not
including first 8 bytes. */
} __attribute__((__packed__)) IPV6DstOptsHdr;

typedef struct IPV6GenOptHdr_
{
uint8_t type;
uint8_t next;
uint8_t len;
uint8_t *data;
} IPV6GenOptHdr;

typedef struct IPV6ExtHdrs_
{
bool rh_set;
Expand Down
9 changes: 0 additions & 9 deletions src/decode.h
Original file line number Diff line number Diff line change
Expand Up @@ -348,15 +348,6 @@ typedef struct PktProfilingLoggerData_ {
uint64_t ticks_spent;
} PktProfilingLoggerData;

typedef struct PktProfilingPrefilterEngine_ {
uint64_t ticks_spent;
} PktProfilingPrefilterEngine;

typedef struct PktProfilingPrefilterData_ {
PktProfilingPrefilterEngine *engines;
uint32_t size; /**< array size */
} PktProfilingPrefilterData;

/** \brief Per pkt stats storage */
typedef struct PktProfiling_ {
uint64_t ticks_start;
Expand Down
5 changes: 0 additions & 5 deletions src/flow-manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -583,11 +583,6 @@ static uint32_t FlowCleanupHash(void)
return cnt;
}

typedef struct FlowQueueTimeoutCounters {
uint32_t flows_removed;
uint32_t flows_timeout;
} FlowQueueTimeoutCounters;

typedef struct FlowCounters_ {
uint16_t flow_mgr_full_pass;
uint16_t flow_mgr_rows_sec;
Expand Down
4 changes: 0 additions & 4 deletions src/util-logopenfile.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ enum LogFileType {
LOGFILE_TYPE_NOTSET
};

typedef struct SyslogSetup_ {
int alert_syslog_level;
} SyslogSetup;

typedef struct ThreadLogFileHashEntry {
struct LogFileCtx_ *ctx;

Expand Down

0 comments on commit b3eb1c4

Please sign in to comment.