Some more fine grained solutions, but along the same line of disrupting the connection around the IP layer:
1) In the past I've removed the default router, but this only worked because the remote system was on a different subnet. Obviously this is a shotgun approach :-)
2) You could add a host route to the server with "-blackhole" to discard the packets, something like: "route add -host -blackhole <IPaddr> <Laddr>" (where IPaddr is the remote IP address, and Laddr is the IP address of your local network interface).
3) An ipfilter(5) rule to drop the specific remote IP address and port number.
Hope that helps as a starting point. Brian Gordon Ross wrote:
I'm designing a test for a program that does automatic reconnect when a connection goes away. [The program is smbiod(1M)]. I want the connection to go away, ideally in a way that "looks" similar to receiving a FIN from the server. I had a thought to just "ifconfig down" the network I/F, but that seems crude. Anyone here know of a more elegant way to inject this error into a specific connection from this process? I'm intentionally avoiding the more obvious method of doing something on the serve side to make it drop the connection. Thanks, Gordon
-- Brian Ruthven Solaris Revenue Product Engineering Sun Microsystems UK Sparc House, Guillemont Park, Camberley, GU17 9QG _______________________________________________ networking-discuss mailing list networking-discuss@opensolaris.org