[Winpcap-users] pcap_sendpacket() returns -1 and does not sendthe packet for rebuilt VLAN packet

Irshad Anver irshadanver at hotmail.com
Wed Sep 17 08:36:34 GMT 2008


Thank you very much. I tried a gigabit network card which can send jumbo packets of more than 1514 bytes and it works. 

From: gianluca.varenni at cacetech.comTo: winpcap-users at winpcap.orgSubject: Re: [Winpcap-users] pcap_sendpacket() returns -1 and does not sendthe packet for rebuilt VLAN packetDate: Thu, 4 Sep 2008 14:54:27 -0700



As far as I remember, the normal miniport drivers for the network card limit the maximum packet size to 1514 bytes, because VLAN is usually managed by the miniport driver itself. So there's no easy way to send VLAN tagged frames whose size is greater that 1510. An idea that comes to my mind is trying to use gigagit cards, whose maximum frame size is greater that 1514. But in this case the maximum frame size should be greater than 1514 only if the negotiated speed is 1Gbps...
 
Have a nice day
GV

----- Original Message ----- 
From: Irshad Anver 
To: winpcap-users at winpcap.org 
Sent: Sunday, August 31, 2008 3:02 AM
Subject: RE: [Winpcap-users] pcap_sendpacket() returns -1 and does not sendthe packet for rebuilt VLAN packet
Thanks for a reply. The original packet size is 1514, but after I add the VLAN Id the packet size is 1518. But WinPCap refuse to send the packet. How do I send VLAN packets through WinPCap?

From: gianluca.varenni at cacetech.comTo: winpcap-users at winpcap.orgSubject: Re: [Winpcap-users] pcap_sendpacket() returns -1 and does not send the packet for rebuilt VLAN packetDate: Fri, 29 Aug 2008 15:21:32 -0700


What is the size of the packets that are not transmitted?
 
Have a nice day
GV

----- Original Message ----- 
From: Irshad Anver 
To: winpcap-users at winpcap.org 
Sent: Monday, August 25, 2008 9:03 AM
Subject: [Winpcap-users] pcap_sendpacket() returns -1 and does not send the packet for rebuilt VLAN packet
Dear Sir, 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. Thank you in advance. Regards,Irshad

Find out how to make Messenger your very own TV! Try it Now! 


_______________________________________________Winpcap-users mailing listWinpcap-users at winpcap.orghttps://www.winpcap.org/mailman/listinfo/winpcap-users

Win £3000 to spend on whatever you want at Uni! Click here to WIN! 



_______________________________________________Winpcap-users mailing listWinpcap-users at winpcap.orghttps://www.winpcap.org/mailman/listinfo/winpcap-users
_________________________________________________________________
Make a mini you and download it into Windows Live Messenger
http://clk.atdmt.com/UKM/go/111354029/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20080917/ee250bfe/attachment.htm


More information about the Winpcap-users mailing list