def get_gateway(self): p = sr1(IP(dst="www.google.com", ttl=0) / ICMP() / "X", verbose=0) return p.src