I am trying to read packets from a pcap file using PcapDotNet. This file contains captured RTP packets as below.
In my code I have to extract G711 and H264 packets and write to different files. How can I find this information?
private static void DispatcherHandler(Packet packet)
{
UdpDatagram udp = null;
udp = packet.IpV4.Udp;
Datagram datagram = udp.Payload;
if (!nProto.ContainsKey(packet.IpV4.Protocol))
nProto.Add(packet.IpV4.Protocol, 1);
else
nProto [packet.IpV4.Protocol]++;
String sourceIP = packet.Ethernet.IpV4.Source.ToString();
String destIP = packet.Ethernet.IpV4.Destination.ToString();
String srcPort = udp.SourcePort.ToString();
String destPort = udp.DestinationPort.ToString();
String info = ?
Console.WriteLine();
}