socket.inet_aton()

socket.inet_aton(string) → packed 32-bit IP representation

Convert an IP address in string format (123.45.67.89) to the 32-bit packed binary format used in low-level network functions.