i need to store rtp packets that are received using recvfrom() into .pcap file.
I tried to open a file with the extension of .pcap and done direct fwrite whatever i received (ie void *buf), but when i tried to open that file using wireshark it given error statement as "not understandable" What i'm supposed to do to make it as understandable??
Code i used:
recvfrom(sockfd, buf, len, flags, (struct sockaddr *)&src_addr->ss, &src_addr->len);
fp=fopen("test.pcap","a+");
fprintf(fp, "%s",buf);
In UDP connection how can i receive and store rtp packets into understandable .pcap file? Is there anything extra need to be added with the received rtp pcakets?
fprintffor this. Usefwrite. - Qix - MONICA WAS MISTREATED