You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.
Looking at the implementation of bpf_trace_printk in redbpf-probes it would seem you can't provide formatting and arguments to it in the same way you can when using libbpf in C. I have a couple of questions relevant to this:
how does the bpf_trace_printk function in redbpf-probes/src/helpers.rs actually work, at a more fundamental level? It appears to map to the underlying libbpf library, but it's not clear how?
is it currently possible, or would it be feasible to add the formatting that's available in libbpf?
The main reason I ask is because I would like to be able to do some debug logging where I print IP addresses and ports. I currently do this by appending (and unicode converting) to a &[u8] manually and it would be much simpler if I could just use the formatting directives available in libbpf.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Looking at the implementation of
bpf_trace_printk
inredbpf-probes
it would seem you can't provide formatting and arguments to it in the same way you can when usinglibbpf
in C. I have a couple of questions relevant to this:bpf_trace_printk
function inredbpf-probes/src/helpers.rs
actually work, at a more fundamental level? It appears to map to the underlyinglibbpf
library, but it's not clear how?libbpf
?The main reason I ask is because I would like to be able to do some debug logging where I print IP addresses and ports. I currently do this by appending (and unicode converting) to a
&[u8]
manually and it would be much simpler if I could just use the formatting directives available inlibbpf
.Thank you!
Beta Was this translation helpful? Give feedback.
All reactions