A stats_ex_op function takes two arguments, the second of which points
to a variable that should be set to the size of the stat structure.
Fix a comment while we're at it.
*
* Parameters and return values are exactly the same of the pcap_stats_ex().
*/
-static struct pcap_stat *pcap_stats_ex_remote(pcap_t *p)
+static struct pcap_stat *pcap_stats_ex_remote(pcap_t *p, int *pcap_stat_size)
{
- /* '0' (third param) means 'standard pcap_stats()' */
+ *pcap_stat_size = sizeof (p->stat);
+
+ /* PCAP_STATS_EX (third param) means 'extended pcap_stats()' */
return (rpcap_stats_remote(p, &(p->stat), PCAP_STATS_EX));
}
#endif