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

How to modify and collect custom protocols? #56

Open
tongchenqiang opened this issue Jul 13, 2023 · 4 comments
Open

How to modify and collect custom protocols? #56

tongchenqiang opened this issue Jul 13, 2023 · 4 comments

Comments

@tongchenqiang
Copy link

Hello, I have installed host sflow in Centos6 and I would like to use it to collect custom protocols. The first 14 bytes of the custom protocol packet structure are the source MAC address and destination MAC address, as well as the 2 bytes protocol label. Next, there are 44 bytes of other content, followed by 20 bytes of content containing the source IP and destination IP. When I use the flow render app and choose ipsource and ipdestination, I cannot see the content. How should I modify the source code?

@sflow
Copy link
Owner

sflow commented Jul 13, 2023

It sounds like you just need an sFlow collector that will decode these packets. I am not familiar with the "flow render" app. Which tool is that? (Are you referring to the "browse-flows" app in sFlow-RT?)

If you capture some of the sFlow datagrams to a .pcap file and then open the .pcap file in Wireshark it should decode the sampled headers for you. That would tell you what needs to happen in the sFlow collector you are using. Please share details here.

@tongchenqiang
Copy link
Author

Sorry, it should be the "flow-trend" app in Sflow-Rt. I want to know how to capture some of the sFlow datagrams to a .pcap file?Can you help me?Thank you!

@sflow
Copy link
Owner

sflow commented Jul 13, 2023

Something like:

sudo tcpdump -i any -s 0 -c 10 -w sflow.pcap udp port 6343

@tongchenqiang
Copy link
Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants