#!/usr/bin/env python import pytella # Hopefully all the functions I need. while 1: hosts = pytella.loadhosts() conn, addr = pytella.listen('', 6346)# Listen for a port. count = 0 finished = 0 while not finished: count = count +1 header, payload = pytella.recv(conn) guid, func, ttl, hops, pll = pytella.parseheader(header) if func == 'ping': print "Got ping." ttl = 0 hops = 0 for i in hosts: pytella.sendpong(conn, guid, ttl, hops, i) finished = 1 else: print "Got some other packet." pass if count == 4: finished = 1 conn.close() main()