Skip to content

Conversation

@catenacyber
Copy link
Contributor

Link to ticket: https://redmine.openinfosecfoundation.org/issues/
https://redmine.openinfosecfoundation.org/issues/7762

Describe changes:

  • rust: bindgen SCAppLayerRegisterParser : final round !

#14660 without changes to rust/sys/src/lib.rs

@jasonish what do you think ?

I removed the From trait for AppLayerResult and used AppLayerResult directly

And I used a wrapper for AppLayerTxData, makes a bigger diff... is it cleaner in the end ?

As will be needed such as AppLayerTxData
and bindgen it to rust.

Will make easier the bindgen of RustParser structure which uses
a callback which uses AppLayerGetFileState
and bindgen it to rust, and use default trait instead of new

Will make easier the bindgen of RustParser structure which uses
a callback which uses AppLayerStateData
and bindgen it to rust

Will make easier the bindgen of RustParser structure which uses
a callback which uses AppLayerGetTxIterTuple
and bindgen it to rust

Will make easier the bindgen of RustParser structure which uses
a callback which uses StreamSlice
and bindgen it to rust

Will make easier the bindgen of RustParser structure which uses
a callback which uses AppLayerResult

Keep From<> impl in sys crate that defines it
and bindgen it to rust

Will make easier the bindgen of RustParser structure which uses
a callback which uses AppLayerTxData

Move also the free function to C SCAppLayerTxDataCleanup
As suricata-sys crate defines AppLayerTxData for rust,
It must itself implement the Drop trait, and thus,
We need to define a feature surest
--disable-header-comment \
--default-enum-style rust \
--with-derive-default \
--with-derive-eq \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These generated Eq, if a struct char pointers, they won't look inside right? Its just looking at the value of the pointer itself?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume so yes

@jasonish
Copy link
Member

I removed the From trait for AppLayerResult and used AppLayerResult directly

And I used a wrapper for AppLayerTxData, makes a bigger diff... is it cleaner in the end ?

Yes, I think so for now.

Copy link
Member

@jasonish jasonish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI issues?

@catenacyber
Copy link
Contributor Author

Replaced by #14667

@ct0br0
Copy link

ct0br0 commented Jan 21, 2026

CI issues?

the ips drops looks valid. the ether/wrong packet stuff should be cleaned up after 14667 runs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants