wireshark-dev June 2010 archive
Main Archive Page > Month Archives  > wireshark-dev archives
wireshark-dev: Re: [Wireshark-dev] What to do after changing MAC

Re: [Wireshark-dev] What to do after changing MAC resolution ? Presumedly redraw ...

From: Gerald Combs <gerald_at_nospam>
Date: Tue Jun 29 2010 - 23:00:10 GMT
To: Developer support list for Wireshark <wireshark-dev@wireshark.org>

Bill Meier wrote:
> I'm working on fixing
> bug #4900: "MAC Address Name Resolution Not Working Properly".
>
> So far: I've fixed the code so that when 'Mac layer name resolution' is
> changed via
> 'View ! Name Resolution ! Enable for MAC Layer'
> or
> 'Edit ! Preferences ! Name Resolution'
> the right thing happens the next time a file is reloaded (or a new file
> is read or a complete redissecttion is done).
>
> Now I'd like to have the right thing happen directly when the option is
> changed.
>
> I'm assuming that redissecting the complete capture is not needed
> when the MAC name resolution option is changed.
>
> To redraw:
> I see that I can call proto_tree_draw(...) for the packet-details pane.
>
> How do I redraw the packet_list pane ?
> new_packet_list_recreate_visible_rows() for "new_packet_list" ??
> ?? for "old-packet-list" ??
>
>
> I expect that the same thing would be done for a change for both
> 'View Name Resolution ! ...' and
> 'Edit ! Preferences ! Name Resolution ! ...'

gtk/main.c:resolv_update_cb has:

  if (host_name_lookup_process(NULL)) {
    if (pkt_scrollw->window)
        gdk_window_invalidate_rect(pkt_scrollw->window, NULL, TRUE);
    if (tv_scrollw->window)
        gdk_window_invalidate_rect(tv_scrollw->window, NULL, TRUE);
  }

You should be able to call gdk_window_invalidate_rect directly or set
new_resolved_objects in addr_resolv.c, which would trigger the redraw
when resolv_update_cb is called.
___________________________________________________________________________
Sent via: Wireshark-dev mailing list <wireshark-dev@wireshark.org>
Archives: http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@wireshark.org?subject=unsubscribe