kohler/click — pull request #92 by pallas (2013-07-13 19:24:44+00:00)
Title: TCPRewriter: add perform_mapping handler

This handler takes in a flow as a space-separated

saddr sport daddr dport

and looks for a forward mapping for that flow. If found, it returns the rewritten flow in the same format. I went with this format for ease of parsing in userland.

This is useful when using a TCPRewriter to divert traffic to a proxy in userland. It allows the proxy to figure out the original destination for the flow, similar to SO_ORIGINAL_DST for Netfilter or SIOCGNATL for IP-Filter.