Enip rust 3958 v9#10072
Closed
catenacyber wants to merge 2 commits into
Closed
Conversation
So that we can write enip.revision: 0x203
Ticket: 3958
- transactions are now bidirectional
- there is a logger
- gap support is improved with probing for resync
- frames support
- app-layer events
- enip_command keyword accepts now string enumeration as values.
- add enip.status keyword
- add keywords :
enip.product_name, enip.protocol_version, enip.revision,
enip.identity_status, enip.state, enip.serial, enip.product_code,
enip.device_type, enip.vendor_id, enip.capabilities,
enip.cip_attribute, enip.cip_class, enip.cip_instance,
enip.cip_status, enip.cip_extendedstatus
Closed
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #10072 +/- ##
==========================================
- Coverage 82.39% 81.87% -0.52%
==========================================
Files 972 991 +19
Lines 271406 273817 +2411
==========================================
+ Hits 223624 224188 +564
- Misses 47782 49629 +1847
Flags with carried forward coverage won't be shown. Click here to find out more. |
|
WARNING:
Pipeline 17157 |
jasonish
reviewed
Dec 20, 2023
| pub unsafe extern "C" fn rs_enip_parse_command( | ||
| raw: *const std::os::raw::c_char, value: *mut u16, | ||
| ) -> bool { | ||
| let raw2: &CStr = CStr::from_ptr(raw); //unsafe |
Member
There was a problem hiding this comment.
Nothing wrong here, but in Rust its pretty normal to shadow the previous variable.
jasonish
reviewed
Dec 20, 2023
| } | ||
|
|
||
| #[no_mangle] | ||
| pub unsafe extern "C" fn rs_enip_get_serial( |
Member
There was a problem hiding this comment.
I think we should start naming these like C functions.. ie) https://github.com/OISF/suricata/blob/master/rust/src/dns/dns.rs#L883
jasonish
reviewed
Dec 20, 2023
|
|
||
| #[no_mangle] | ||
| pub unsafe extern "C" fn rs_enip_get_serial( | ||
| tx: *mut std::os::raw::c_void, value: *mut u32, |
Member
There was a problem hiding this comment.
If we're not checking these for NULL, we can get rid of the cast by tx: &mut EnipTransaction. See: https://github.com/OISF/suricata/blob/master/rust/src/dns/dns.rs#L884
Closed
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to redmine ticket:
https://redmine.openinfosecfoundation.org/issues/3958
Describe changes:
Alon the way, also
#10048 with needed rebase (DetectAppLayerMpmRegister2 renamed to DetectAppLayerMpmRegister) and auto squash
Provide values to any of the below to override the defaults.
OISF/suricata-verify#1521
Does the first commit deserve its own redmine ticket ?
And the one in 4a49352 also ?