def ping(dst, count, inter=<NUM_LIT>, maxwait=<NUM_LIT:1000>, size=<NUM_LIT:64>):
def _then(result, p):<EOL><INDENT>p.stopListening()<EOL>return result<EOL><DEDENT>d = defer.Deferred()<EOL>p = ICMPPort(<NUM_LIT:0>, ICMPPing(d, dst, count, inter, maxwait, size), "<STR_LIT>", <NUM_LIT>, reactor)<EOL>p.startListening()<EOL>return d.addCallback(_then, p)<EOL>
Sends ICMP echo requests to destination `dst` `count` times.
    Returns a deferred which fires when responses are finished.