gln
gln

Reputation: 1031

C++ Retrieve the IP from a name from the DNS - LINUX

In my C++ Linux application: how can I get the IP referring to a name from a DNS?

Please attach code sample.

10x

Upvotes: 1

Views: 2950

Answers (2)

Shinnok
Shinnok

Reputation: 6389

Use getaddrinfo(). Documentation and examples here and here.

Upvotes: 4

With the function gethostbyname.

Please, search in google.

Upvotes: 0

Related Questions