<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
Dear Sir,<BR>
<BR>
I have a problem and searched the Internet and could not find a solution. pcap_sendpacket() returns -1 and does not send the packet. In my application I have two NICs the first one is the Internet NIC and the second one is the client NIC. Whenever I receive a packet in the client NIC I modify the ip and send the same packet through the Internet NIC. When I receive the packet from the Internet NIC we send the packet to the correct client through client NIC. I also use ARP spoofing to enable any client IP address to access the Internet. This is a sort of network bridging application and it worked well till I tried to send VLAN packets. For VLAN I connected the Client NIC to the trunk port of the switch to receive VLAN Tag information. Now when I receive VLAN packets in client NIC, I note the VLAN tag then I remove the VLAN tag and modifiy the ip address and send the same through the Internet NIC. When I receive the reply from the Internet NIC I send the packet to the client by adding the correct VLAN tag. I use a local array of 2000 bytes to rebuild the packet with VLAN tag. First copy the client IP addresses and the VLAN tag and then copy the rest of the packet from the receievd packet from the Internet NIC. But after some packets Winpcap returns -1 and refuse to send packet through the client NIC. I could not find any answer and the reason. Please provid me with a solution.<BR>
<BR>
Thank you in advance.<BR>
<BR>
Regards,<BR>
Irshad<BR><br /><hr />Find out how to make Messenger your very own TV! <a href='http://clk.atdmt.com/UKM/go/101719648/direct/01/' target='_new'>Try it Now!</a></body>
</html>