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

save as Pcapng files #145 #148

Merged
merged 21 commits into from
Aug 3, 2022
Merged

save as Pcapng files #145 #148

merged 21 commits into from
Aug 3, 2022

Conversation

cfc4n
Copy link
Member

@cfc4n cfc4n commented Jul 30, 2022

No description provided.

cfc4n added 12 commits July 21, 2022 00:23
Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
� Conflicts:
�	user/probe_openssl.go
and change short name -w to -l of global flags.

Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
longflag: write, ifname.
Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
@cfc4n cfc4n linked an issue Jul 30, 2022 that may be closed by this pull request
@cfc4n cfc4n added the enhancement New feature or request label Jul 30, 2022
@cfc4n cfc4n requested review from chriskaliX and xjas July 30, 2022 16:54
@cfc4n cfc4n mentioned this pull request Aug 1, 2022
Copy link
Contributor

@chriskaliX chriskaliX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

cfc4n added 7 commits August 2, 2022 20:56
Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
add go-bindata to go.sum for Makefile script.

Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
// make sure data_len is not negative
event->data_len = data_len;

bpf_probe_read_kernel(event->data, sizeof(event->data), &data_start);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to read skb->data, just specify the skb->len in flags of bpf_perf_event_output.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

__u64 len = data_end - data;
flags = (len << 32) | BPF_F_CURRENT_CPU;
bpf_perf_event_output(ctx, &events, flags, &event, sizeof(event));

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good advice,thanks.

cfc4n added 2 commits August 3, 2022 20:52
Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
@cfc4n cfc4n merged commit 620e7f6 into master Aug 3, 2022
@cfc4n cfc4n deleted the pcapng-files branch August 3, 2022 13:43
fengjixuchui referenced this pull request in fengjixuchui/ecapture Aug 6, 2022
Merge pull request ehids#148 from ehids/pcapng-files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

save as .pcapng files.
3 participants