[prev in list] [next in list] [prev in thread] [next in thread] 

List:       winpcap-users
Subject:    RE: [Winpcap-users] pcap_sendpacket() returns -1 and does not send
From:       Irshad Anver <irshadanver () hotmail ! com>
Date:       2008-08-31 10:02:06
Message-ID: BAY111-W4914E5D99DC208231F0125A45D0 () phx ! gbl
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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@cacetech.comTo: winpcap-users@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@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@winpcap.orghttps://www.winpcap.org/mailman/listinfo/winpcap-users \
_________________________________________________________________ Win New York \
holidays with Kellogg’s & Live Search  \
http://clk.atdmt.com/UKM/go/107571440/direct/01/


[Attachment #5 (text/html)]

<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
Thanks for a reply.<BR>
&nbsp;<BR>
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?<BR><BR>

<HR>
<BR>
From: gianluca.varenni@cacetech.com<BR>To: winpcap-users@winpcap.org<BR>Subject: Re: \
[Winpcap-users] pcap_sendpacket() returns -1 and does not send the packet for rebuilt \
VLAN packet<BR>Date: Fri, 29 Aug 2008 15:21:32 -0700<BR><BR><BR> <META \
content="Microsoft SafeHTML" name=Generator> <STYLE>
.ExternalClass .EC_hmmessage P
{padding-right:0px;padding-left:0px;padding-bottom:0px;padding-top:0px;}
.ExternalClass BODY.EC_hmmessage
{font-size:10pt;font-family:Tahoma;}
</STYLE>

<DIV><FONT face="Courier New">What is the size of the packets that are not \
transmitted?</FONT></DIV> <DIV><FONT face="Courier New"></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New">Have a nice day</FONT></DIV>
<DIV><FONT face="Courier New">GV</FONT></DIV>
<BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; \
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style="FONT: 10pt \
arial">----- Original Message ----- </DIV> <DIV style="BACKGROUND: #e4e4e4; FONT: \
10pt arial; font-color: black"><B>From:</B> <A title=irshadanver@hotmail.com \
href="mailto:irshadanver@hotmail.com">Irshad Anver</A> </DIV> <DIV style="FONT: 10pt \
arial"><B>To:</B> <A title=winpcap-users@winpcap.org \
href="mailto:winpcap-users@winpcap.org">winpcap-users@winpcap.org</A> </DIV> <DIV \
style="FONT: 10pt arial"><B>Sent:</B> Monday, August 25, 2008 9:03 AM</DIV> <DIV \
style="FONT: 10pt arial"><B>Subject:</B> [Winpcap-users] pcap_sendpacket() returns -1 \
and does not send the packet for rebuilt VLAN packet</DIV> <DIV><BR></DIV>Dear \
Sir,<BR>&nbsp;<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>&nbsp;<BR>Thank you in advance.<BR>&nbsp;<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=_blank>Try it Now!</A> \


<HR>

<P><BR>_______________________________________________<BR>Winpcap-users mailing \
list<BR>Winpcap-users@winpcap.org<BR>https://www.winpcap.org/mailman/listinfo/winpcap-users<BR></BLOCKQUOTE><br \
/><hr />Win £3000 to spend on whatever you want at Uni! <a \
href='http://clk.atdmt.com/UKM/go/101719803/direct/01/' target='_new'>Click here to \
WIN!</a></body> </html>



_______________________________________________
Winpcap-users mailing list
Winpcap-users@winpcap.org
https://www.winpcap.org/mailman/listinfo/winpcap-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic