iputils View the docs. IP2Long(ip string) uint32 Convert IP string to uint32. Long2IP(i uint32) string Convert uint32 to IP string.