Used in a Sentence

getnameinfo

How to use getnameinfo in a sentence. Live example sentences for getnameinfo pulled from indexed public discussions.

Editorial note

How the resolver is configured is its internal issue; apps should just use getnameinfo().

Examples13
Definitions0
Parts of speech1

Quick take

How the resolver is configured is its internal issue; apps should just use getnameinfo().

Example sentences

1

How the resolver is configured is its internal issue; apps should just use getnameinfo().

2

This is why it's a good idea to use getaddrinfo and getnameinfo for IP address validation and normalization.

3

Again, a guess but it is possible that getnameinfo() is not necessarily processing the record correctly (for whatever reason).

4

In other cases, like getnameinfo, the stack-allocated buffer is way too large!

5

In C you can do it via getnameinfo(getaddrinfo()) or inet_ntop(inet_pton()).

6

See inet_ntop(3) and getnameinfo(3) (as a bonus, these functions work identically to both IPv4 and IPv6, the application becomes agnostic to the address class being used).

7

All of the socket API functions accept sockaddr*, and if you need to get the IP or port out then you use getnameinfo(), which also takes sockaddr*.

8

It has been obsoleted in favour of getnameinfo.

9

Applications should use getaddrinfo(3), getnameinfo(3), and gai_strerror(3) instead.

10

For majority of applications, supporting IPv6 boils down to using getaddrinfo()/getnameinfo() instead of gethostbyname()/gethostbyaddr(), which results in code that supports both IPv4 and IPv6 and is simpler than the IPv4-only original.

11

From the libuv design doc, the overview is: * Filesystem operations * DNS functions (getaddrinfo and getnameinfo) * User specified code via uv_queue_work() I wonder whether this is really the best solution of if some combination of a thread pool and native async disk IO primitives could perform better.

Quote examples

1

In that code, the only thing that can set the "strport" value that is used in the log is a call to getnameinfo().

2

Despite the "IPv4 only" comment, both structure pack with `getnameinfo()` so both appear IPv6-capable.

Frequently asked questions

Short answers drawn from the clearest meanings and examples for this word.

How do you use getnameinfo in a sentence?

How the resolver is configured is its internal issue; apps should just use getnameinfo().