[Winpcap-users] using pcap_sendqueue_transmit() with sync TRUE to send packets as per timestamp

sd_boy1980 at yahoo.com sd_boy1980 at yahoo.com
Thu Jun 29 08:58:18 GMT 2006

  After receing packets using pcap_next_ex(), i am trying to add delay to certain packets.
  I am doing so, by adding the amount of delay (x secs) to the timestamp  in the header. Then i use pcap_sendqueue to queue the packet and then  pcap_sendueue_transmit to transmit it with sync set to TRUE.
  But i observe that the packet is sent immediately without delay..
  I even increased the timestamp value by 10 seconds, but still the transmit function ended up sending the packet immediately..
  // code to update the timestamp 
  pQueue = pcap_sendqueue_alloc(10000);
      if(pcap_sendqueue_queue(pQueue,header,pkt_data) == -1)
          printf("Warning: Packet Buffer very small, not all packets will be sent\n");
      if((res = pcap_sendqueue_transmit(pAdapter_Write,pQueue, TRUE)) < pQueue->len)
          printf("An error occurred  sending the packets: %s. Only %d bytes were sent\n", error, res);
      printf("\nQueue len=%d\n",pQueue->len);
  Any input on this will be useful.
  Thank you very much.
Do you Yahoo!?
 Everyone is raving about the  all-new Yahoo! Mail Beta.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20060629/9062e48e/attachment.htm

More information about the Winpcap-users mailing list