dn_find() — Resolver domain name find

Standards

Standards / Extensions C or C++ Dependencies

BSD 4.3

both OS/390 V2R8

Format

#define _XOPEN_SOURCE_EXTENDED 1
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>

int dn_find(u_char *exp_dn, u_char *msg, u_char **dnptrs, u_char **lastdnptr);

General description

The dn_find() function will search for the expanded name exp_dn in the list of previously compressed names dnptrs.

dnptrs is the pointer to the first name in the list, not the pointer to the start of the message. The limit to the array is specified by lastdnptr.

Note: The dn_find() function has a dependency on the level of the Enhanced ASCII Extensions. See Enhanced ASCII support for details.

Returned value

If successful, dn_find() returns the offset of the expanded name exp_dn found in the message.

If unsuccessful, dn_find() returns -1 to report the error, when the name was not found before the end of the list was reached.

There are no documented errno values.

Related information