[Winpcap-users] pushing captured data to windows pipe

Gianluca Varenni gianluca.varenni at cacetech.com
Mon Dec 3 16:38:58 GMT 2007


I need to double check, but I don't think it's possible to open a named pipe with winpcap/libpcap (as it uses the FILE* functions). But you can definitely write on stdout by using "-" as the name of the file.

Have a nice day
GV
  ----- Original Message ----- 
  From: Vito Arh 
  To: winpcap-users at winpcap.org 
  Sent: Friday, November 30, 2007 1:48 AM
  Subject: [Winpcap-users] pushing captured data to windows pipe


  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.



------------------------------------------------------------------------------
  Be a better sports nut! Let your teams follow you with Yahoo Mobile. Try it now.


------------------------------------------------------------------------------


  _______________________________________________
  Winpcap-users mailing list
  Winpcap-users at winpcap.org
  https://www.winpcap.org/mailman/listinfo/winpcap-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20071203/e4728b5f/attachment.html


More information about the Winpcap-users mailing list