Static vs. dynamic hooks #76
Answered
by
xfoukas
cjdoucette
asked this question in
Q&A
|
I'm looking to use jbpf in an application where the set of hooks is not known at compile-time, as new hooks and codelets can be added at any time. However, I noticed that the hook abstraction is modeled as a function built into the binary. Is there any issue with creating new |
Answered by
xfoukas
Apr 11, 2025
Replies: 1 comment 4 replies
|
Can you please give a few more details or some sample code about what you are trying to do? Do you mean instrumenting the code in the same way as uprobes do in Linux? |
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for the clarifications. I understand your use case better now.
jbpf allows several codelets to be loaded on a single hook. However, from your description I understand that you don't want the other tenants to have any visibility into the traffic of others, right?
One way I can think that you could implement this functionality without making any modifications to the existing code, would be the following:
Add N statically pre-compiled hooks in a switch statement, where N is the max number of tenants the middlebox can support. The codelets of users can be loaded in those hooks.
Add a single control hook to capture the incoming packets, and emit a routing decision, about which hook …