Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fs2-protocols - pcapng #2740

Merged
merged 20 commits into from
Nov 19, 2022
Merged

fs2-protocols - pcapng #2740

merged 20 commits into from
Nov 19, 2022

Conversation

nikiforo
Copy link
Contributor

@nikiforo nikiforo commented Dec 4, 2021

No description provided.

@mpilquist
Copy link
Member

Looking good!

Some high level comments:

  • Is there a way to abstract over pcap and pcapng if you just want to decode captures?
  • Note use of Shapeless will mean those files are Scala 2 only and will need reimplementations for Scala 3 using tuples, match types, etc.

@nikiforo
Copy link
Contributor Author

nikiforo commented Dec 6, 2021

  • Is there a way to abstract over pcap and pcapng if you just want to decode captures?

I think there is. However, I think this functionality should be not in the main but in the test folder. Both pcap & pcapng are in the same subproject and share test folder.

  • Note use of Shapeless will mean those files are Scala 2 only and will need reimplementations for Scala 3 using tuples, match types, etc.

What are the options assuming that I want to define common block structure? I think I can put HList-based implementation to scala-2 folder, tuple-based to scala-3?

@nikiforo
Copy link
Contributor Author

nikiforo commented Dec 6, 2021

  • Note use of Shapeless will mean those files are Scala 2 only and will need reimplementations for Scala 3 using tuples, match types, etc.

I think I should look at scodec. It should have been ported to scala-3, thus it already abstracts over shapeless 2/3.

@mpilquist
Copy link
Member

Yeah, scodec uses HLists on Scala 2 and tuples on Scala 3. There's a little bit of trickery to get the same source cross compiling on both: https://github.com/scodec/scodec/blob/7724ae7efed0ea9e32063b56cf81bd3ffeb381f0/shared/src/main/scala/scodec/compat.scala

@nikiforo nikiforo force-pushed the pcapng branch 2 times, most recently from a97af5b to 97b14f3 Compare December 7, 2021 18:05
@mpilquist
Copy link
Member

@nikiforo Any way I can help get this one over the finish line?

@nikiforo nikiforo force-pushed the pcapng branch 4 times, most recently from a54fcb4 to 8d55e61 Compare August 23, 2022 17:20
@nikiforo nikiforo marked this pull request as ready for review August 23, 2022 17:36
@nikiforo nikiforo changed the title [WIP] fs2-protocols - pcapng fs2-protocols - pcapng Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants