On Fri, Jun 19, 2009 at 4:08 PM, Guy Harris <g...@alum.mit.edu> wrote:

>
> On Jun 18, 2009, at 4:43 PM, Joshua (Shiwei) Zhao wrote:
>
> > With Wireshark, I'm trying to modify it to send NDIS requests to a
> > wifi card driver on windows OS.
>
> Ideally, Wireshark shouldn't do that; all operations on capture
> devices should be done through libpcap/WinPcap.
>
> However, as not all the functionality that Wireshark can use is yet
> implemented by libpcap/WinPcap APIs, sometimes Wireshark has to
> implement that itself.  What is it you're trying to do?
>
> > To do this I need to call CreateFile() and pass a string of device
> > name to it.
>
> That's not necessarily the case.
>
> See, for example, gtk/capture_if_details_dlg_win32.c, which makes
> calls to wpcap_packet_request_uint() to fetch various statistics and
> other information about a network adapter.  It calls wpcap_packet_open
> () to get a lower-level handle on the device.
>
> Those routines are in capture_wpcap_packet.c, which provides access to
> the Packet Driver API in Winpcap; the routines from that file might be
> sufficient to do what you want.


Yeah, this seems to be what I'm looking for. I'll try it out.

Many thanks,
Joshua



>
> ___________________________________________________________________________
> 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-requ...@wireshark.org?subject=unsubscribe
>
___________________________________________________________________________
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-requ...@wireshark.org?subject=unsubscribe

Reply via email to