differentiation of packets

Sep 7, 2014 at 2:55 PM
hi everybody. i capture packets with a callback handler. First i want to know what class i have to use to differentiate packets: is it an ip or ethernet packet?
so if it is ip packet, that's a tcp, udp, icmp,, igmp, arp,..... packet? so help me quickly please.
Sep 7, 2014 at 4:39 PM
I noticed that on my captured packets, it's only my network packets. I want to capture packets over my network and get the internet address that send me packets.
How could i process?
Coordinator
Sep 13, 2014 at 7:13 AM
Hi Barack1234,

I assume you're on an Ethernet network.
You can differentiate what Ethernet packet it is by looking at the packet.Ethernet.EtherType.
If it is an IPv4 packet, you can differentiate what IPv4 packet it is by looking at the packet.Ethernet.IpV4.Protocol.

I hope this helps,

Boaz.
Sep 17, 2014 at 12:32 PM
Hi Brickner
thank you for your help. i think that this solution will help me