|
-
May 2nd, 2007, 12:07 PM
#1
Thread Starter
New Member
Tcp Rst
I trying to send a TCP RST using VB6 or VB.NET sockets.
Could you tell me how.
Thanks In Advance.
Alfredo
-
May 2nd, 2007, 12:10 PM
#2
-
May 3rd, 2007, 11:34 PM
#3
Re: Tcp Rst
RST? Sorry i am unfamiliar with that abbreviation.
-
May 4th, 2007, 03:47 PM
#4
Re: Tcp Rst
In TCP the RST (reset) packet is normally used for just a few things. One of these might be to deny a connection request. It is also possible for a Winsock TCP connection to result in an sckReset error under some circumstances, such as when using TCP KeepAlives - but this is another thing entirely as far as I know.
I don't think TCP's low-level functions are available to a Winsock-based application. Thus there is no way to "send RST" using the Winsock API or the Winsock control.
In a VB program you might get a connection request, examine the source (Remote) IP address, and decide to deny the connection. I have not seen any mechanism to do this "denial" directly however. If there is one I'd be glad to hear about it.
Instead I find I generally must accept the connection request and then immediately close it.
A Winsock2 API application might use the WSAAccept() function passing in a smart "condition function" callback. For connection requests failing the test conditions the callback can tell WSAAccept() to reject the incoming connection.
This is the only mechanism I'm aware of for programmatically instructing the TCP/IP stack to send RST. I can't see any way to make it work with the Winsock control.
As far as VB.Net goes I won't make any claims. It may have a way to do this for some of its socket classes.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|