mirror of
https://github.com/xdp-project/bpf-examples.git
synced 2024-05-06 15:54:53 +00:00
pping: Refactor event handling code
Refactor code for how events are handled in the user space application. Preparation for adding an additional event type which should not be handled by the normal functions for printing RTT and flow events. Signed-off-by: Simon Sundberg <simon.sundberg@kau.se>
This commit is contained in:
@@ -93,10 +93,15 @@ struct packet_id {
|
||||
};
|
||||
|
||||
/*
|
||||
* An RTT event message that can be passed from the bpf-programs to user-space.
|
||||
* Events that can be passed from the BPF-programs to the user space
|
||||
* application.
|
||||
* The initial event_type memeber is used to allow multiplexing between
|
||||
* different event types in a single perf buffer. Memebers up to and including
|
||||
* flow are identical to other event types.
|
||||
* flow are identical for all event types.
|
||||
*/
|
||||
|
||||
/*
|
||||
* An RTT event message passed when an RTT has been calculated
|
||||
* Uses explicit padding instead of packing based on recommendations in cilium's
|
||||
* BPF reference documentation at https://docs.cilium.io/en/stable/bpf/#llvm.
|
||||
*/
|
||||
@@ -116,10 +121,7 @@ struct rtt_event {
|
||||
};
|
||||
|
||||
/*
|
||||
* A flow event message that can be passed from the bpf-programs to user-space.
|
||||
* The initial event_type memeber is used to allow multiplexing between
|
||||
* different event types in a single perf buffer. Memebers up to and including
|
||||
* flow are identical to other event types.
|
||||
* A flow event message passed when a flow has changed state (opened/closed)
|
||||
*/
|
||||
struct flow_event {
|
||||
__u64 event_type;
|
||||
|
||||
Reference in New Issue
Block a user