From e9bc96b15e8317b1fea2991e4ffd18caf91da1f7 Mon Sep 17 00:00:00 2001 From: Nick Hurley Date: Fri, 22 Feb 2013 10:12:57 -0800 Subject: [PATCH] Program to set static ARP entries on windows This will hopefully negate some of the spikyness in the windows tests --- windows/srarp.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 windows/srarp.py diff --git a/windows/srarp.py b/windows/srarp.py new file mode 100644 index 0000000..9b3799f --- /dev/null +++ b/windows/srarp.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python + +import subprocess + +ip_mappings = { + '172.17.0.1': '2C:76:8A:D0:CE:89', # Broadband + '172.18.0.1': '2C:76:8A:D0:CA:D9', # UMTS + '172.19.0.1': '2C:76:8A:D0:CE:B9', # GSM +} + +for ip, mac in ip_mappings.items(): + p = subprocess.Popen(['arp', '-s', ip, mac], stdout=subprocess.PIPE, + stderr=subprocess.STDOUT) + p.wait()