[Winpcap-users] pushing captured data to windows pipe

Vito Arh vitoarh at yahoo.com
Fri Nov 30 09:48:23 GMT 2007


Hello. I am trying to open pipe and send data to pipe (for later import in wireshark via wireshark -k -i  \\.\pipe\DLC_s ).
I do it this way:
hPipe = CreateNamedPipe( \\.\pipe\DLC_s, PIPE_ACCESS_OUTBOUND, PIPE_NOWAIT, PIPE_UNLIMITED_INSTANCES, 256, 256, 1000, NULL);

ConnectNamedPipe(hPipe, NULL);

dumpfile = (unsigned char*) pcap_dump_open(adhandle, argv[5]);

            if(dumpfile==NULL)
            {
                fprintf(stderr,"\nError opening output file\n");
                return -1;
            }
            printf("Dump file opened!\n");

The problem is that I cannot open file with pcap_dump_open. If I try opening with FILE *output it does without errors. This function pcap_dump_open returns NULL pointer.
How should I do that?
The problem is that I try to sniff some interface which wireshark cannot recognise (on COM port).
Thanks for help!
Vito.




      ____________________________________________________________________________________
Get easy, one-click access to your favorites. 
Make Yahoo! your homepage.
http://www.yahoo.com/r/hs 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20071130/35fe0d0a/attachment.htm


More information about the Winpcap-users mailing list