Ejemplo n.º 1
0
static gboolean gtkui_input_shim(gpointer data) {

   struct gtkui_input_data *gid = data;
   gtkui_input(gid->title, gid->input, gid->n, gid->callback);
   free(gid);
   return FALSE;
}
Ejemplo n.º 2
0
/*
 * display the write file menu
 */
static void gtkui_file_write(void)
{
#define FILE_LEN  40
   
   DEBUG_MSG("gtk_file_write");
   
   SAFE_CALLOC(GBL_OPTIONS->pcapfile_out, FILE_LEN, sizeof(char));

   gtkui_input("Output file :", GBL_OPTIONS->pcapfile_out, FILE_LEN, write_pcapfile);
}
Ejemplo n.º 3
0
/*
 * display the log dialog 
 */
void gtkui_log_info(void)
{
   DEBUG_MSG("gtk_log_info");

   /* make sure to free if already set */
   SAFE_FREE(logfile);
   SAFE_CALLOC(logfile, FILE_LEN, sizeof(char));

   gtkui_input("Log File :", logfile, FILE_LEN, log_info);
}
Ejemplo n.º 4
0
/*
 * display the pcap filter dialog
 */
static void gtkui_pcap_filter(void)
{
#define PCAP_FILTER_LEN  50
   
   DEBUG_MSG("gtk_pcap_filter");
   
   SAFE_CALLOC(GBL_PCAP->filter, PCAP_FILTER_LEN, sizeof(char));

   /* 
    * no callback, the filter is set but we have to return to
    * the interface for other user input
    */
   gtkui_input("Pcap filter :", GBL_PCAP->filter, PCAP_FILTER_LEN, NULL);
}
Ejemplo n.º 5
0
/*
 * set a different netmask than the system one 
 */
static void gtkui_set_netmask(void)
{
   struct in_addr net;
   
   DEBUG_MSG("gtkui_set_netmask");
  
   if (GBL_OPTIONS->netmask == NULL)
      SAFE_CALLOC(GBL_OPTIONS->netmask, IP_ASCII_ADDR_LEN, sizeof(char));

   /* 
    * no callback, the filter is set but we have to return to
    * the interface for other user input
    */
   gtkui_input("Netmask :", GBL_OPTIONS->netmask, IP_ASCII_ADDR_LEN, NULL);

   /* sanity check */
   if (strcmp(GBL_OPTIONS->netmask, "") && inet_aton(GBL_OPTIONS->netmask, &net) == 0)
      ui_error("Invalid netmask %s", GBL_OPTIONS->netmask);
            
   /* if no netmask was specified, free it */
   if (!strcmp(GBL_OPTIONS->netmask, ""))
      SAFE_FREE(GBL_OPTIONS->netmask);
}
Ejemplo n.º 6
0
/*
 * set the WEP key
 */
void gtkui_wep_key(void)
{
   DEBUG_MSG("gtk_wep_key");

   gtkui_input("WEP key :", wkey, WLEN, gtkui_set_wepkey);
}
Ejemplo n.º 7
0
/*
 * set the visualization regex 
 */
void gtkui_vis_regex(void)
{
   DEBUG_MSG("gtk_vis_regex");

   gtkui_input("Visualization regex :", vregex, RLEN, gtkui_set_regex);
}
Ejemplo n.º 8
0
/*
 * set the Wifi key
 */
void gtkui_wifi_key(void)
{
   DEBUG_MSG("gtk_wifi_key");

   gtkui_input("WiFi key :", wkey, WLEN, gtkui_set_wifikey);
}