bifrost icon indicating copy to clipboard operation
bifrost copied to clipboard

UDP packet capture plugin

Open telegraphic opened this issue 2 years ago • 2 comments

I've just created a repository on bf-plugins/bf_udpcap that builds the UDP capture code. The hope is to make it easy to add new packet formats.

Still plenty left to do -- so far it compiles into a shared object.

I have opened this issue to use as documentation and for discussion.

telegraphic avatar Jan 17 '23 03:01 telegraphic

I went to look at that repo today and I'm getting a 404.

jaycedowell avatar Feb 14 '23 14:02 jaycedowell

I've been thinking about this the last couple of weeks. A few thoughts:

  • I think plugins are a good idea for packet capture since there will always be some other format people want to use.
  • I also think that making the formats included with stock Bifrost configurable at build time is a good idea because not everyone will want every format. This is kind of what DSPSR does with its backends.default file.
  • I don't think what's in ibverb-support currently is great for plugins. For bf_udpcap-style plugins it's probably ok because you introduce a new set of classes/blocks for each new format. For something like a dynamic plugin system where the modes are exposed through the same class/block there are problems.

On that last point the problem I see is in ibverb-support is with the "callback manager" class. It's easy to drop in a few files to define a new format and compile them but adding the callback requires a change to that manager class. I started trying an idea on ibverb-support-alt but that hasn't yielded anything useful.

There is also the bigger picture question of separate vs dynamic plugins that I'm not sure about. I like the concept of dynamic plugins where there is one class/block that manages everything but that may be harder to achieve. Separate plugins are probably easier to implement but then there are lots of classes/blocks to create. Maybe that isn't so much of an issue since the different file formats that are supported now are different blocks.

jaycedowell avatar Jun 14 '23 17:06 jaycedowell