Ethereal-dev: [Ethereal-dev] pcap_next_ex patch

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Gisle Vanem <giva@xxxxxxxxx>
Date: Wed, 25 May 2005 08:16:29 +0200
The latest libpcap (CVS version) defines this function with
'const u_char **' as last argument. Hence this patch is needed:

--- SVN-Latest\capture-wpcap.c  Wed May 25 07:09:10 2005
+++ capture-wpcap.c     Wed May 25 07:49:28 2005
@@ -78,7 +78,7 @@
#endif
static const char *(*p_pcap_lib_version) (void);
static int     (*p_pcap_setbuff) (pcap_t *, int dim);
-static int     (*p_pcap_next_ex) (pcap_t *, struct pcap_pkthdr **pkt_header, u_char **pkt_data);
+static int     (*p_pcap_next_ex) (pcap_t *, struct pcap_pkthdr **pkt_header, const u_char **pkt_data);

typedef struct {
       const char      *name;
@@ -423,7 +423,7 @@
}

/* next_ex is win32 specific! */
-int pcap_next_ex (pcap_t *a, struct pcap_pkthdr **b, u_char **c)
+int pcap_next_ex (pcap_t *a, struct pcap_pkthdr **b, const u_char **c)
{
       g_assert(has_wpcap);
       return p_pcap_next_ex(a, b, c);

--gv