First time here? Check out the FAQ!
THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.
0

Do we need a pcap header format to display captured packets via named pipes on Wireshark?

I have a C code that creates a socket to receive packets from the COM port on Windows. I have created a named pipe in a similar manner. Now, do I need to add a pcap header to the read bytes to display them on Wireshark or is there any other possibility?

I'm a beginner and any insight on this is much appreciated. Thank you.

stanumes's avatar
1
stanumes
asked 2019-05-12 12:27:10 +0000
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

2 Answers

0
Jaap's avatar
13.7k
Jaap
answered 2019-05-12 14:16:41 +0000
edit flag offensive 0 remove flag delete link

Comments

Could you please explain/provide a reference regarding how I can add the header to my named pipe C code?

Thanks!

stanumes's avatar stanumes (2019-05-12 15:20:35 +0000) edit

I kinda did, have you seen the linked Wiki page? It shows the structures which go in front of the stream and in front of each packet.

Jaap's avatar Jaap (2019-05-13 05:53:33 +0000) edit

Too sneaky ;-)

Jasper's avatar Jasper (2019-05-13 10:00:43 +0000) edit
add a comment see more comments
0

Wireshark supports external capture programs via the extcap interface. Wireshark does support capturing from any source over a pipe (sending pcap data over the pipe), extcap allows the Wireshark GUI to control the external capture program.

grahamb's avatar
23.8k
grahamb
answered 2019-05-12 17:04:38 +0000
edit flag offensive 0 remove flag delete link

Comments

Which means I have to add the named pipe under extcap folder?

stanumes's avatar stanumes (2019-05-13 13:25:21 +0000) edit

See the Wiki page on capture pipes here. The extcap directory is for extcap interfaces, for other pipes the binary can be anywhere. The pipe doesn't live on the filesystem.

grahamb's avatar grahamb (2019-05-13 14:53:02 +0000) edit
add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer