def send_one_ping(mySocket, destIP, myID, mySeqNumber, packet_size):
<EOL>myChecksum = <NUM_LIT:0><EOL>header = struct.pack(<EOL>"<STR_LIT>", ICMP_ECHO, <NUM_LIT:0>, myChecksum, myID, mySeqNumber<EOL>)<EOL>padBytes = []<EOL>startVal = <NUM_LIT><EOL>if sys.version[:<NUM_LIT:1>] == '<STR_LIT:2>':<EOL><INDENT>bytes = struct.calcsize("<STR_LIT:d>")<EOL>data = ((packet_size - <NUM_LIT:8>) - bytes) * "<STR_LIT>"<EOL>data = struct.pack("<STR_LIT:d>", default_timer()) + data<EOL><DEDENT>else:<EOL><INDENT>for i in range(startVal, startVal + (packet_size - <NUM_LIT:8>)):<EOL><INDENT>padBytes += [(i & <NUM_LIT>)]  <EOL><DEDENT>data = bytearray(padBytes)<EOL><DEDENT>myChecksum = checksum(header + data)  <EOL>header = struct.pack(<EOL>"<STR_LIT>", ICMP_ECHO, <NUM_LIT:0>, myChecksum, myID, mySeqNumber<EOL>)<EOL>packet = header + data<EOL>sendTime = default_timer()<EOL>try:<EOL><INDENT>mySocket.sendto(packet, (destIP, <NUM_LIT:1>))<EOL><DEDENT>except socket.error as e:<EOL><INDENT>print("<STR_LIT>" % (e.args[<NUM_LIT:1>]))<EOL>return<EOL><DEDENT>return sendTime<EOL>
Send one ping to the given >destIP<.