}
GList *
-get_pcap_linktype_list(const char *devname, char **err_str)
+get_pcap_linktype_list(char *devname, char **err_str)
{
GList *linktype_list = NULL;
pcap_t *pch;
char *description; /* descriptive name from wiretap e.g. "Ethernet", NULL if unknown */
} data_link_info_t;
-GList *get_pcap_linktype_list(const char *devname, char **err_str);
+GList *get_pcap_linktype_list(char *devname, char **err_str);
void free_pcap_linktype_list(GList *linktype_list);
/* get/set the link type of an interface */
/* init the capture filter */
-initfilter_status_t capture_loop_init_filter(pcap_t *pcap_h, gboolean from_cap_pipe, const gchar * iface, gchar * cfilter) {
+initfilter_status_t capture_loop_init_filter(pcap_t *pcap_h, gboolean from_cap_pipe, gchar * iface, gchar * cfilter) {
bpf_u_int32 netnum, netmask;
gchar lookup_net_err_str[PCAP_ERRBUF_SIZE];
struct bpf_program fcode;
} initfilter_status_t;
extern initfilter_status_t
-capture_loop_init_filter(pcap_t *pcap_h, gboolean from_cap_pipe, const gchar * iface, gchar * cfilter);
+capture_loop_init_filter(pcap_t *pcap_h, gboolean from_cap_pipe, gchar * iface, gchar * cfilter);
int
capture_loop_dispatch(capture_options *capture_opts _U_, loop_data *ld,
{
gchar *entry_text;
gchar *if_text;
- const gchar *if_name;
+ gchar *if_name;
GList *if_list;
GList *if_entry;
if_info_t *if_info;
dl_hdr_menu= lt_menu;
entry_text = g_strdup(gtk_entry_get_text(GTK_ENTRY(entry)));
if_text = g_strstrip(entry_text);
- if_name = get_if_name(if_text);
+ if_name = g_strdup(get_if_name(if_text));
#ifdef HAVE_AIRPCAP
/* is it an airpcap interface??? */
}
}
g_free(entry_text);
+ g_free(if_name);
num_supported_link_types = 0;
for (lt_entry = lt_list; lt_entry != NULL; lt_entry = g_list_next(lt_entry)) {
data_link_info = lt_entry->data;