>> error = getaddrinfo(0, "0", &hints, &res); Martin> Is this really the same call that runs in Python? I thought it Martin> should have "" as the first argument instead of 0. In this case, yes. There are other calls to getaddrinfo in socketmodule.c which have non-NULL first args, but the first one in setipaddr() which is causing all the fuss has NULL as the first argument. Skip