Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • pike pike
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 104
    • Issues 104
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • pikelang
  • pikepike
  • Issues
  • #3992
Closed
Open
Issue created Sep 15, 2005 by Peter Bortas@zinoOwner

Protocols.DNS.client() not functional on Windows

Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=3992

Reported by Anders Johansson anders@roxen.com

All syncronous operations with Protocols.DNS.client is broken on windows. The following program only returns the expected result from the second part when using the async_client (which by the way is undocumented). This was tested on both Windows 2000 and 2003.

void got_result(string from, string to, mixed ... extra)
{
  werror("Got result: %O, %O, %O\n", from, to, extra);
}
int main()
{
  Protocols.DNS.client con = Protocols.DNS.client();
  werror("Host: %O\n", con->gethostbyname("wwww.roxen.com"));
  werror("MX: %O\n", con->get_primary_mx("roxen.com"));
  werror("Sync: %O\n", con->do_sync_query(con->mkquery("pike.ida.liu.se",
						       Protocols.DNS.C_IN,
						       Protocols.DNS.T_A)));

  Protocols.DNS.async_client dns = Protocols.DNS.async_client();
  dns->host_to_ip("www.roxen.com", got_result);
  dns->get_mx("roxen.com", got_result);

  return -17;
}

When using Stdio.UDP directly this is the result:
C:\pike\pike\7.4.326\bin>pike
Pike v7.4 release 326 running Hilfe v3.5 (Incremental Pike Frontend)
> object udp = Stdio.UDP();
> string s =Protocols.DNS.protocol()->mkquery("www.roxen.com",
Protocols.DNS.C_IN, Protocols.DNS.T_A);
> udp->bind(0);
(1) Result: Stdio.UDP()
> udp->send("212.247.28.2", 53, s);
(2) Result: 31
> udp->wait(5);
udp->wait(): select() failed with errno 10038
Stdio.UDP: Stdio.UDP()->wait(5)
HilfeInput:1: HilfeInput()->___HilfeWrapper()
Assignee
Assign to
Time tracking