Client object identifier in BIND 9 query logs

Solution 1:

According to Tony Finch's reply to bind-users mailing list in August 2019:

It's the address in memory of the data structure BIND uses to hold its working state for the query.

I'm surprised this seems the only place this is actually explained. The naming seems rather misleading as, based on this, it's not about the client nor object identifiers OID (per ITU-T X.660 | ISO/IEC 9834-1).

The explanation seems credible, as it's coherent with both the format and behaviour of the value. This logging comes from ISC's lib/ns/client.c i.e. the client object (Thanks, Patrick Mevzek!):

2715    isc_log_write(ns_lctx, category, module, level,
2716              "client @%p %s%s%s%s%s%s%s%s: %s", client, peerbuf, sep1,
2717              signer, sep2, qname, sep3, sep4, viewname, msgbuf);

Here, the %p indeed is the memory address (pointer) of the client, as it's written in C, and the "client @%p %s%s%s%s%s%s%s%s: %s" is a printf format string, where the % placeholder has:

The syntax for a format placeholder is

%[parameter][flags][width][.precision][length]type

Type field

  • s: null-terminated string.
  • p: void * (pointer to void) in an implementation-defined format.

Instead, the BIND 9 Administrator Reference Manual COULD simply say something like:

The query log entry first reports the memory address of the data scructure used to hold the working state for the query, in @0x<hexadecimal-number> format.

Well, the whole paragraph could also be formatted as a list instead of a story...