Skip to content
\n

In this case I know before hand the packet is of type EthernetPacket, hence I can use the Extract method confidently. is there a way of telling the packet type so that I can call the Extract method more dynamically/conditionally depending packet type?

\n

Thanks in advance

","upvoteCount":1,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"

LinkLayer will tell what the first layer is, after that each protocol will have its own way for telling what the next protocol is, for example in ethernet the field ethertype tells you what the next protocol is.

","upvoteCount":1,"url":"https://github.com/dotpcap/sharppcap/discussions/330#discussioncomment-1405185"}}}

Is there a way to identify the packet type? #330

Answered by kayoub5
tbazen asked this question in Q&A
Discussion options

You must be logged in to vote

LinkLayer will tell what the first layer is, after that each protocol will have its own way for telling what the next protocol is, for example in ethernet the field ethertype tells you what the next protocol is.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tbazen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants