Re: bpf packet capture and SOCK_STREAM socket redirects...
- From: Peter Jeremy <peterjeremy@xxxxxxxxxxxxxxxx>
- Date: Fri, 21 Mar 2008 17:35:17 +1100
On Thu, Mar 20, 2008 at 11:27:53AM +0000, Alireza Torabi wrote:
Imagine this:
| (1)
packets
| | (4)
[nic1] [nic2]
bpf SOCK_STREAM
| (2) |
[FreeBSD] (3)
1) all user traffic are being monitored
2) bpf on [nic] is capturing these packets
3) after processing we know a connection is about to be established from A to B
NOW:
4) I want to deliver this packet to the socket on [nic2]
and as this is a tcp socket it'll take care of it from there
(my code here for this sockets sends and arbitary data to A making it
think it came from B)
Have a look at divert(4). I suspect it comes closest to what you want.
--
Peter Jeremy
Please excuse any delays as the result of my ISP's inability to implement
an MTA that is either RFC2821-compliant or matches their claimed behaviour.
Attachment:
pgpugDm8y8cHF.pgp
Description: PGP signature
- Follow-Ups:
- Re: bpf packet capture and SOCK_STREAM socket redirects...
- From: Alireza Torabi
- Re: bpf packet capture and SOCK_STREAM socket redirects...
- References:
- bpf packet capture and SOCK_STREAM socket redirects...
- From: Alireza Torabi
- Re: bpf packet capture and SOCK_STREAM socket redirects...
- From: Vadim Goncharov
- Re: bpf packet capture and SOCK_STREAM socket redirects...
- From: Alireza Torabi
- Re: bpf packet capture and SOCK_STREAM socket redirects...
- From: Vadim Goncharov
- Re: bpf packet capture and SOCK_STREAM socket redirects...
- From: Alireza Torabi
- bpf packet capture and SOCK_STREAM socket redirects...
- Prev by Date: Re: [PATCH] kern/120958: no response to ICMP traffic on interface configured with a link-local address
- Next by Date: Samba PDC with VPN access
- Previous by thread: Re: bpf packet capture and SOCK_STREAM socket redirects...
- Next by thread: Re: bpf packet capture and SOCK_STREAM socket redirects...
- Index(es):
Relevant Pages
|