wirego_remote(rust): add support for Wirego implemented in Rust #37
wirego_remote(rust): add support for Wirego implemented in Rust #37NothNoth merged 19 commits intoquarkslab:mainfrom
Conversation
|
Hi ! Wow, that looks really great! To anwser your questions:
|
|
Feel free to ask any other questions and thanks again for your great work! |
|
Thank you! I have some questions about your answer:
So sending back the message with a single frame
So it's allowing Wireshark to perform two pass (or multipass) run while dissecting packets?
That's great then :D Now a few other questions from me, because I am curious about it:
|
Absolutely, just reply with a 0x00 !
Actually Wireshark will always perform a two pass when loading a pcap. When the pcap is loaded, all packets are processed. When you scroll on the Window, all displayed packets are re-processed so that the plugin may eventually update the results based on the complete context of the capture.
Currently there's none, but that would be cool yes!
Absolutely, when it will be a bit more "proof-read"
It can be anything, as long as there's no duplicate values (which would be reject by wirego)
Mmhh that's a good question, I'm not really sure. If I set a "protocol" value to HTTP for example, will it trigger the HTTP dissector? |
|
@NothNoth thank you again for answers! I have again some questions, answers, and ideas here, so here is a not-very-short message from me 😸 Part I - changesI have added a few tests and created a simple CI pipeline for Rust, so the package is now verified 😄
Part II - embedded protocols and calling external dissectorsNow, moving to my question and your question:
I'll use a few examples from the Wireshark to show what I mean, that will be way easier to implement. "Interaction" of eCPRI and ORAN FH-CUSThe WG4: Open Fronthaul Interfaces Workgroup specification of ORAN FH-CUS, more specifically O-RAN Control, User and Synchronization Plane Specification 17.01 (you can find the pdf on the page) says that eCPRI messages of type 0 (IQ Data) and 2 (Real-Time Control Data) can carry the payload of ORAN FH-CUS. That means, if you have some data and you are sure that in your protocol (eCPRI) is some data from the other protocol (ORAN FH-CUS), you may call the All of that can be found in the eCPRI dissector implementation - I will not give you particular lines, since that code may change in basically any day. The possibilty of extending dissectorsSome protocols, such as GTP (TS 29.281), have the "reserved fields" for vendor specific usage, i.e. values 1, 2, 3 are defined by the GTP, but you can do anything you want with "reserved" values 10, 11, 12. To implement that, Wireshark lets you call the As above, you may find the GTP dissector implementation here. The questionNow, coming to the final part - is it possible to do it with the current implementation of Wirego, or it is something that is not implemented yet? Do you have plans of adding support for that? It is not something that I really need, but I am curious about it 😄 Part III - some improvements
Part IV - merging changesThere are still a few TODOs in the code, but I am getting in some kind of loop to improve everything at once, which makes the MR bigger and bigger. Could you please review the change, so I can merge what we have here, and I'll proceed with further improvements later on? Thank you! |
|
Hi @whiskeyo ! Here are a few answers to your questions/remarks: Part 1 : Part 2: Part 3: Part 4: Thanks again! |
|
Hi @whiskeyo ! I'm currently looking for someone at Quarkslab more fluent than me in Rust for the review :) One additional question: I'll be talking about Wirego in a few weeks at SSTIC 25 (https://www.sstic.org/2025/news/) and Pass The Salt (https://2025.pass-the-salt.org/). Do you mind if I cite your name for the Rust contribution? |
|
Hi @NothNoth 😀 That's good to know! My knowledge is Rust isn't very big too, so getting a review from experienced Rust dev will be a pleasure to get. When it comes to the conference and citing my name - go for it, I'm glad to be included there. |
wirego_remote/rust/wirego/README.md
Outdated
|
|
||
| - `get_name` should return the protocol name, e.g. "eCPRI 2.0" | ||
| - `get_filter` should return the protocol filter, e.g. "ecpri" | ||
| - `get_fields` should return all fields that can be dissected by Wireshark |
There was a problem hiding this comment.
should return all fields that may be returned by your Wireshark plugin
| fn get_fields(&self) -> Vec<wirego::types::WiresharkField> { | ||
| vec![ | ||
| wirego::types::WiresharkField { | ||
| wirego_field_id: 1, |
There was a problem hiding this comment.
Instead of using "1" here (and 2,3,4...) can you define an enum instead so that you can reuse it later during dissect?
wirego_remote/rust/wirego/tests/integration_with_wirego_bridge.rs
Outdated
Show resolved
Hide resolved
|
Hi! I just finished the review. Thanks! |
|
Hi @NothNoth, thank you! I'll try to do it today or tomorrow, depending on how well I feel :) |
|
Hey @NothNoth! I believe that I fixed all issues that you've pointed out. I am not sure what way of working you prefer in case of comment reviews, thus I left all of them unresolved and in some of them I added my own comments. If you agree with these changes, LMK if I should close these threads or you'll do it :) Thank you! |
|
That's merged! |
This MR is still WIP, but I am actively working to finish the implementation. Currently the
minimalexample based on the Python one, using the PCAP available in the Python example, shows the same results (at least I hope it does, the screenshot below shows it):TODOs:
zeromq::RepSocketafter the main loop is finishedCargo.tomlfrom unused librariesLimitations:
zeromqdoes not yet support the UDP, thus the library will not have the same functionality as you've implemented in Go or Python, but in case it is added in future - we shouldn't need lots of changes.Once the MR is ready, I'll remove the [DRAFT] from its name :) I just need a bit of help from your side to fully understand how the Wirego Remote should work.