|
suricata
|
#include "rust.h"

Go to the source code of this file.
Data Structures | |
| struct | Frame |
| struct | Frames |
| struct | FramesContainer |
Macros | |
| #define | FRAME_ANY_TYPE 62 |
| #define | FRAME_STREAM_TYPE 63 |
| #define | FRAME_FLAG_TX_ID_SET BIT_U8(FRAME_FLAGE_TX_ID_SET) |
| #define | FRAME_FLAG_ENDS_AT_EOF BIT_U8(FRAME_FLAGE_ENDS_AT_EOF) |
| #define | FRAME_FLAG_LOGGED BIT_U8(FRAME_FLAGE_LOGGED) |
| #define | FRAMES_STATIC_CNT 3 |
Typedefs | |
| typedef int64_t | FrameId |
| typedef struct Frame | Frame |
| typedef struct Frames | Frames |
| typedef struct FramesContainer | FramesContainer |
Enumerations | |
| enum | { FRAME_FLAGE_TX_ID_SET , FRAME_FLAGE_ENDS_AT_EOF , FRAME_FLAGE_LOGGED } |
Functions | |
| void | FramesFree (Frames *frames) |
| void | FramesPrune (Flow *f, Packet *p) |
| Frame * | AppLayerFrameNewByPointer (Flow *f, const StreamSlice *stream_slice, const uint8_t *frame_start, const int64_t len, int dir, uint8_t frame_type) |
| create new frame using a pointer to start of the frame | |
| Frame * | AppLayerFrameNewByRelativeOffset (Flow *f, const StreamSlice *stream_slice, const uint32_t frame_start_rel, const int64_t len, int dir, uint8_t frame_type) |
| create new frame using a relative offset from the start of the stream slice | |
| Frame * | AppLayerFrameNewByAbsoluteOffset (Flow *f, const StreamSlice *stream_slice, const uint64_t frame_start, const int64_t len, int dir, uint8_t frame_type) |
| create new frame using the absolute offset from the start of the stream | |
| void | AppLayerFrameDump (Flow *f) |
| Frame * | FrameGetByIndex (Frames *frames, const uint32_t idx) |
| Frame * | FrameGetById (Frames *frames, const int64_t id) |
| Frame * | FrameGetLastOpenByType (Frames *frames, const uint8_t frame_type) |
| Frame * | AppLayerFrameGetById (Flow *f, const int direction, const FrameId frame_id) |
| Frame * | AppLayerFrameGetLastOpenByType (Flow *f, const int direction, const uint8_t frame_type) |
| FrameId | AppLayerFrameGetId (Frame *r) |
| void | AppLayerFrameAddEvent (Frame *frame, uint8_t e) |
| void | AppLayerFrameAddEventById (Flow *f, const int dir, const FrameId id, uint8_t e) |
| void | AppLayerFrameSetLength (Frame *frame, int64_t len) |
| void | AppLayerFrameSetLengthById (Flow *f, const int dir, const FrameId id, int64_t len) |
| void | AppLayerFrameSetTxId (Frame *r, uint64_t tx_id) |
| void | AppLayerFrameSetTxIdById (Flow *f, const int dir, const FrameId id, uint64_t tx_id) |
| void | AppLayerFramesSlide (Flow *f, const uint32_t slide, const uint8_t direction) |
| FramesContainer * | AppLayerFramesGetContainer (Flow *f) |
| FramesContainer * | AppLayerFramesSetupContainer (Flow *f) |
| void | FrameConfigInit (void) |
| void | FrameConfigDeInit (void) |
| void | FrameConfigEnableAll (void) |
| void | FrameConfigEnable (const AppProto p, const uint8_t type) |
Definition in file app-layer-frames.h.
| #define FRAME_ANY_TYPE 62 |
special value for matching any type
Definition at line 30 of file app-layer-frames.h.
| #define FRAME_FLAG_ENDS_AT_EOF BIT_U8(FRAME_FLAGE_ENDS_AT_EOF) |
Definition at line 40 of file app-layer-frames.h.
| #define FRAME_FLAG_LOGGED BIT_U8(FRAME_FLAGE_LOGGED) |
Definition at line 42 of file app-layer-frames.h.
| #define FRAME_FLAG_TX_ID_SET BIT_U8(FRAME_FLAGE_TX_ID_SET) |
Definition at line 38 of file app-layer-frames.h.
| #define FRAME_STREAM_TYPE 63 |
max 63 to fit the 64 bit per protocol space
Definition at line 32 of file app-layer-frames.h.
| #define FRAMES_STATIC_CNT 3 |
Definition at line 58 of file app-layer-frames.h.
| typedef int64_t FrameId |
Definition at line 34 of file app-layer-frames.h.
| typedef struct FramesContainer FramesContainer |
| anonymous enum |
| Enumerator | |
|---|---|
| FRAME_FLAGE_TX_ID_SET | |
| FRAME_FLAGE_ENDS_AT_EOF | |
| FRAME_FLAGE_LOGGED | |
Definition at line 36 of file app-layer-frames.h.
| void AppLayerFrameAddEvent | ( | Frame * | frame, |
| uint8_t | e | ||
| ) |
Definition at line 646 of file app-layer-frames.c.
References Frame::event_cnt, Frame::events, and FrameDebug.
Referenced by AppLayerFrameAddEventById().

Definition at line 656 of file app-layer-frames.c.
References AppLayerFrameAddEvent(), and AppLayerFrameGetById().

| void AppLayerFrameDump | ( | Flow * | f | ) |
Definition at line 589 of file app-layer-frames.c.
References Flow_::alparser, AppLayerFramesGetContainer(), Flow_::proto, Flow_::protoctx, FramesContainer::toclient, and FramesContainer::toserver.

Definition at line 700 of file app-layer-frames.c.
References AppLayerFramesGetContainer(), FrameGetById(), SCLogDebug, FramesContainer::toclient, and FramesContainer::toserver.
Referenced by AppLayerFrameAddEventById(), AppLayerFrameSetLengthById(), and AppLayerFrameSetTxIdById().


Definition at line 662 of file app-layer-frames.c.
References Frame::id.
Definition at line 718 of file app-layer-frames.c.
References Flow_::alproto, AppLayerFramesGetContainer(), FrameGetLastOpenByType(), SCLogDebug, FramesContainer::toclient, and FramesContainer::toserver.

| Frame * AppLayerFrameNewByAbsoluteOffset | ( | Flow * | f, |
| const StreamSlice * | stream_slice, | ||
| const uint64_t | frame_start, | ||
| const int64_t | len, | ||
| int | dir, | ||
| uint8_t | frame_type | ||
| ) |
create new frame using the absolute offset from the start of the stream
Definition at line 604 of file app-layer-frames.c.
References Flow_::alparser, Flow_::alproto, AppLayerFramesSetupContainer(), DEBUG_VALIDATE_BUG_ON, len, offset, Flow_::proto, Flow_::protoctx, SCLogDebug, FramesContainer::toclient, and FramesContainer::toserver.

| Frame * AppLayerFrameNewByPointer | ( | Flow * | f, |
| const StreamSlice * | stream_slice, | ||
| const uint8_t * | frame_start, | ||
| const int64_t | len, | ||
| int | dir, | ||
| uint8_t | frame_type | ||
| ) |
create new frame using a pointer to start of the frame
Definition at line 463 of file app-layer-frames.c.
References Flow_::alparser, Flow_::alproto, AppLayerFramesSetupContainer(), DEBUG_VALIDATE_BUG_ON, FrameDebug, len, offset, Flow_::proto, Flow_::protoctx, SCLogDebug, FramesContainer::toclient, FramesContainer::toserver, and Frame::type.

| Frame * AppLayerFrameNewByRelativeOffset | ( | Flow * | f, |
| const StreamSlice * | stream_slice, | ||
| const uint32_t | frame_start_rel, | ||
| const int64_t | len, | ||
| int | dir, | ||
| uint8_t | frame_type | ||
| ) |
create new frame using a relative offset from the start of the stream slice
Definition at line 542 of file app-layer-frames.c.
References Flow_::alparser, Flow_::alproto, AppLayerFramesSetupContainer(), BUG_ON, TcpSession_::client, DEBUG_VALIDATE_BUG_ON, len, Flow_::proto, Flow_::protoctx, TcpSession_::server, STREAM_APP_PROGRESS, FramesContainer::toclient, FramesContainer::toserver, and Frame::type.

| void AppLayerFrameSetLength | ( | Frame * | frame, |
| int64_t | len | ||
| ) |
Definition at line 671 of file app-layer-frames.c.
References FrameDebug, len, and Frame::len.
Referenced by AppLayerFrameSetLengthById().

Definition at line 679 of file app-layer-frames.c.
References AppLayerFrameGetById(), AppLayerFrameSetLength(), and len.

| void AppLayerFrameSetTxId | ( | Frame * | r, |
| uint64_t | tx_id | ||
| ) |
Definition at line 685 of file app-layer-frames.c.
References Frame::flags, FRAME_FLAG_TX_ID_SET, FrameDebug, and Frame::tx_id.
Referenced by AppLayerFrameSetTxIdById().

Definition at line 694 of file app-layer-frames.c.
References AppLayerFrameGetById(), and AppLayerFrameSetTxId().

| FramesContainer * AppLayerFramesGetContainer | ( | Flow * | f | ) |
Definition at line 184 of file app-layer-parser.c.
References Flow_::alparser, and AppLayerParserState_::frames.
Referenced by AppLayerFrameDump(), AppLayerFrameGetById(), AppLayerFrameGetLastOpenByType(), AppLayerFramesSlide(), FlowNeedsReassembly(), and FramesPrune().

| FramesContainer * AppLayerFramesSetupContainer | ( | Flow * | f | ) |
Definition at line 191 of file app-layer-parser.c.
References Flow_::alparser, Flow_::alproto, DEBUG_VALIDATE_BUG_ON, AppLayerParserState_::frames, Flow_::proto, Flow_::protoctx, SCCalloc, FramesContainer::toclient, and FramesContainer::toserver.
Referenced by AppLayerFrameNewByAbsoluteOffset(), AppLayerFrameNewByPointer(), and AppLayerFrameNewByRelativeOffset().

| void AppLayerFramesSlide | ( | Flow * | f, |
| const uint32_t | slide, | ||
| const uint8_t | direction | ||
| ) |
Definition at line 408 of file app-layer-frames.c.
References AppLayerFramesGetContainer(), TcpSession_::client, Flow_::protoctx, TcpSession_::server, FramesContainer::toclient, and FramesContainer::toserver.
Referenced by StreamTcpPruneSession().


| void FrameConfigDeInit | ( | void | ) |
Definition at line 50 of file app-layer-frames.c.
References SCFree.
Referenced by AppLayerDeSetup().

| void FrameConfigEnable | ( | const AppProto | p, |
| const uint8_t | type | ||
| ) |
Definition at line 64 of file app-layer-frames.c.
References BIT_U64, SC_ATOMIC_OR, and type.
| void FrameConfigEnableAll | ( | void | ) |
Definition at line 55 of file app-layer-frames.c.
References g_alproto_max, and SC_ATOMIC_OR.
| void FrameConfigInit | ( | void | ) |
Definition at line 39 of file app-layer-frames.c.
References FatalError, g_alproto_max, SC_ATOMIC_INIT, SCCalloc, and unlikely.
Referenced by AppLayerSetup().

Definition at line 124 of file app-layer-frames.c.
References Frames::cnt, Frames::dframes, FrameDebug, FRAMES_STATIC_CNT, Frame::id, SCLogDebug, and Frames::sframes.
Referenced by AppLayerFrameGetById().

Definition at line 144 of file app-layer-frames.c.
References Frames::cnt, Frames::dframes, FrameDebug, FRAMES_STATIC_CNT, and Frames::sframes.
Definition at line 101 of file app-layer-frames.c.
References Frames::cnt, Frames::dframes, FrameDebug, FRAMES_STATIC_CNT, Frame::len, SCLogDebug, Frames::sframes, and Frame::type.
Referenced by AppLayerFrameGetLastOpenByType().

| void FramesFree | ( | Frames * | frames | ) |
Definition at line 453 of file app-layer-frames.c.
References DEBUG_VALIDATE_BUG_ON, Frames::dframes, and SCFree.
Definition at line 840 of file app-layer-frames.c.
References AppLayerFramesFreeContainer(), AppLayerFramesGetContainer(), TcpSession_::client, TcpSession_::flags, PKT_IS_PSEUDOPKT, PKT_IS_TOSERVER, Packet_::proto, Flow_::proto, Flow_::protoctx, SCLogDebug, TcpSession_::server, TcpSession_::state, STREAMTCP_FLAG_APP_LAYER_DISABLED, TCP_CLOSED, FramesContainer::toclient, and FramesContainer::toserver.
