Permalink
Browse files

Switch to pkt from epcap_net

  • Loading branch information...
1 parent d72c7c4 commit 25a9764a305ed2eadd7094750faf6aad4882621f @msantos committed Dec 28, 2010
Showing with 6 additions and 6 deletions.
  1. +2 −2 rebar.config
  2. +4 −4 src/farp.erl
View
@@ -1,6 +1,6 @@
{deps, [
{procket, ".*", {git, "git://github.com/msantos/procket.git", "master"}},
- {epcap, ".*", {git, "git://github.com/msantos/epcap.git", "master"}},
+ {pkt, ".*", {git, "git://github.com/msantos/pkt.git", "master"}},
{herp, ".*", {git, "git://github.com/msantos/herp.git", "master"}}
]}.
-{erl_opts, [{i, "deps/epcap/include"}]}.
+{erl_opts, [{i, "deps/pkt/include"}]}.
View
@@ -33,7 +33,7 @@
-define(SERVER, ?MODULE).
--include("epcap_net.hrl").
+-include("pkt.hrl").
-export([start/0, start/2, stop/0, spoof/4]).
-export([start_link/2]).
@@ -161,7 +161,7 @@ sniff(Socket) ->
timer:sleep(10),
sniff(Socket);
{ok, Data} ->
- P = epcap_net:decapsulate(Data),
+ P = pkt:decapsulate(Data),
filter(P),
sniff(Socket);
Error ->
@@ -204,13 +204,13 @@ send_arp(Sha, Sip, Tha, Tip, #state{s = Socket, i = Ifindex}) ->
make_arp(Type, Sha, Sip, Tha, Tip) ->
- Ether = epcap_net:ether(#ether{
+ Ether = pkt:ether(#ether{
dhost = Tha,
shost = Sha,
type = ?ETH_P_ARP
}),
- Arp = epcap_net:arp(#arp{
+ Arp = pkt:arp(#arp{
op = Type,
sha = Sha,
sip = Sip,

0 comments on commit 25a9764

Please sign in to comment.