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?
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"}}}-
In my scenario is I have
In this case I know before hand the packet is of type Thanks in advance |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
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.