Skip to content

Commit

Permalink
Markdownify README
Browse files Browse the repository at this point in the history
  • Loading branch information
msantos committed Mar 30, 2012
1 parent 27c51ed commit 92446b1
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions README → README.md
@@ -1,28 +1,27 @@

herp re-writes ethernet headers, thereby acting as a user space bridge.
Right now, herp works on switched networks and forwards any packets that
have been sent to the host from ARP spoofing.

In the future, herp will probably become a real, although slow, bridge.


EXPORTS
# EXPORTS

start() -> {ok, PID}
start(Device) -> {ok, PID}
start() -> {ok, PID}
start(Device) -> {ok, PID}

Types Device = string()
Types Device = string()

Device is the network interface name.
Device is the network interface name.


HOW TO USE IT
# HOW TO USE IT

> herp:start(). % start up the bridge
> farp:start().
> herp:start(). % start up the bridge
> farp:start().


TODO
# TODO

* test bridging between networks

Expand All @@ -33,13 +32,13 @@ the gateway may respond directly to the target if the gateway's ARP
cache still holds the valid MAC address of the target. Force the gateway
to respond to the bridge by:

- arp'ing an unused IP address with the bridge's MAC address
* arp'ing an unused IP address with the bridge's MAC address

- mapping the fake IP (and maybe a fake source port) to the target
* mapping the fake IP (and maybe a fake source port) to the target

- re-write the source IP and port header from the response to the
bridge's MAC address/gateway's IP address with the target's MAC/IP as
the destination
* re-write the source IP and port header from the response to the
bridge's MAC address/gateway's IP address with the target's MAC/IP as
the destination

The gateway will respond to the bridge's MAC address. The bridge OS
won't respond to the packets (e.g., send a RST) because the IP is not
Expand All @@ -49,4 +48,3 @@ target host and re-write the MAC and IP headers.
Instead of looking up the map in an ets table or a data structure, state
could even be kept by having each source IP/port spawn a new process
(a gen_fsm) registered with the source IP/port.

0 comments on commit 92446b1

Please sign in to comment.