Hi,

I am programming a kind of bridge device, reading from one interface, and 
forwarding the frame through another interface. Also in the inverse way.
The frame capture using "pcap_loop" happens without problems (I print the frame 
contents as well as length for debugging purposes).

The problem is when I try to send the interface via the other interface. I use 
the following call for the pcap_sendpacket function:
pcap_sendpacket(iface2, pkt_data_iface1_2,sizeof(pkt_data_iface1_2));

iface2 is the outgoing interface
pkt_data_iface1_2 is the frame received on Interface 1 and being sent over 
Interface 2
sizeof(pkt_data_iface1_2) is the buffer size.

Only the first four bytes of the frame are sent. The device that uses wireshark 
to analyze the frames sent by my program, shows them as malformed.
I also tried for the size parameter sizeof(hear_iface1_2->caplen) or the 
pcap_inject function:  The result was the same.

My question is: does anybody know, why only the first four bytes are sent?


Thanks a lot for your help!

Best regards,
Fabio Valpondi
_______________________________________________
Winpcap-users mailing list
[email protected]
https://www.winpcap.org/mailman/listinfo/winpcap-users

Reply via email to