Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonish committed Jan 22, 2025
1 parent c585d52 commit 0a3cfe1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 34 deletions.
4 changes: 2 additions & 2 deletions rust/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ if HAVE_BINDGEN
-o src/_sys.rs \
--disable-header-comment \
--allowlist-type 'AppProto.*' \
--allowlist-type 'AppLayer.*' \
--rustified-enum AppLayerEventType \
--allowlist-type 'SCAppLayer.*' \
--rustified-enum SCAppLayerEventType \
--rustified-enum AppProtoEnum \
$(abs_top_srcdir)/src/bindgen.h \
-- \
Expand Down
40 changes: 8 additions & 32 deletions rust/src/_sys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,40 +43,16 @@ pub enum AppProtoEnum {
ALPROTO_MAX_STATIC = 39,
}
pub type AppProto = u16;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct AppLayerThreadCtx_ {
_unused: [u8; 0],
}
pub type AppLayerThreadCtx = AppLayerThreadCtx_;
#[doc = " \\brief Data structure to store app layer decoder events."]
pub type AppLayerDecoderEvents = AppLayerDecoderEvents_;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum AppLayerEventType {
pub enum SCAppLayerEventType {
APP_LAYER_EVENT_TYPE_TRANSACTION = 1,
APP_LAYER_EVENT_TYPE_PACKET = 2,
}
#[doc = " \\brief Data structure to store app layer decoder events."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct AppLayerDecoderEvents_ {
pub events: *mut u8,
pub cnt: u8,
pub events_buffer_size: u8,
pub event_last_logged: u8,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of AppLayerDecoderEvents_"][::std::mem::size_of::<AppLayerDecoderEvents_>() - 16usize];
["Alignment of AppLayerDecoderEvents_"]
[::std::mem::align_of::<AppLayerDecoderEvents_>() - 8usize];
["Offset of field: AppLayerDecoderEvents_::events"]
[::std::mem::offset_of!(AppLayerDecoderEvents_, events) - 0usize];
["Offset of field: AppLayerDecoderEvents_::cnt"]
[::std::mem::offset_of!(AppLayerDecoderEvents_, cnt) - 8usize];
["Offset of field: AppLayerDecoderEvents_::events_buffer_size"]
[::std::mem::offset_of!(AppLayerDecoderEvents_, events_buffer_size) - 9usize];
["Offset of field: AppLayerDecoderEvents_::event_last_logged"]
[::std::mem::offset_of!(AppLayerDecoderEvents_, event_last_logged) - 10usize];
};
pub type SCAppLayerStateGetEventInfoByIdFn = ::std::option::Option<
unsafe extern "C" fn(
event_id: u8,
event_name: *mut *const ::std::os::raw::c_char,
event_type: *mut SCAppLayerEventType,
) -> ::std::os::raw::c_int,
>;

0 comments on commit 0a3cfe1

Please sign in to comment.