> i need to reset the tcp connection manually , if one request come from
> ipLayer.SrcIP
> = then i need to sent the reset connection packet

I could be wrong, but I don't think the sockets API makes this
possible -- RST segments are normally only sent by the kernel upon
receiving a segment that doesn't match the current state of the

Since Go uses the kernel sockets support, there's probably nothing that
can be done about this with Go.

You'll need to work at a lower layer:

  - the firewall code is normally able to send RST segments; under
    Linux, you can achieve that with

       iptables ... -p tcp ... -j REJECT --reject-with tcp-reset

  - you could probably use raw sockets to inject RST segments, but that
    would require building your own TCP header and running your program
    as root.  It's probably easier to interface with the firewall.

As Jesper said, it would be helfpul if you told us what you're trying to

-- Juliusz

You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to