---
name: "getaddrinfo"
section: "1"
platform: "linux"
package: "libruli-bin"
version: "0.36-3.1+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/srvsearch"
---

# getaddrinfo(1)

Sample programs for RULI Library (RFC 2782)

Part of [srvsearch(1)](/srvsearch/1.md).

## NAME

srvsearch, sync\_srvsearch, smtpsearch, sync\_smtpsearch, httpsearch, sync\_httpsearch, ruli-getaddrinfo, getaddrinfo\
 \- Sample programs for RULI Library (RFC 2782)

## SYNOPSIS

echo \_service.\_protocol.nongnu.org \| **getaddrinfo**\
 echo \_service.\_protocol.nongnu.org \| **ruli-getaddrinfo \[ options \]**\
 echo \_service.\_protocol.nongnu.org \| **srvsearch \[ options \]**\
 echo \_service.\_protocol.nongnu.org \| **sync\_srvsearch \[ options \]**\
 echo nongnu.org \| **smtpsearch \[ options \]**\
 echo nongnu.org \| **sync\_smtpsearch \[ options \]**\
 echo nongnu.org \| **httpsearch \[ options \]**\
 echo nongnu.org \| **sync\_httpsearch \[ options \]**\

## DESCRIPTION

This manual page documents briefly sample programs for the **[ruli(3)](/ruli/3.md)** library.

**ruli** is a library aimed at querying DNS SRV resource records.

## OPTIONS

- For http searches, one can force the port number by specifying it as the first option.

  - **search**

  Use the resolver search list defined in ´/etc/resolv.conf´.

- **need\_ra**

  Require RA (Recursion Available) bit in the name server answer.

- **noinet**

  Don´t fetch IPv4 addresses.

- **noinet6**

  Don´t fetch IPv6 addresses.

- **uri\_port**

  Assume the specified default port was forced by the user-supplied URI.

- **nowalk**

  Don´t search addresses missing from the name server answer.

- **nofall**

  Don´t launch fallback queries for addresses, if the SRV query fails.

- **nosort6**

  Don´t sort the address list to give preference to IPv6 addresses.

- **rfc3484**

  Enable RFC3484 destination address selection rules.

- **cname**

  Allow CNAME in SRV targets.

## EXAMPLES

echo \_sip.\_udp.nongnu.org \| getaddrinfo\
 echo \_telnet.\_tcp.nongnu.org \| ruli-getaddrinfo rfc3484\
 echo \_smtp.\_tcp.nongnu.org \| srvsearch search\
 echo \_smtp.\_tcp.nongnu.org \| sync\_srvsearch search noinet6\
 echo nongnu.org \| smtpsearch noinet\
 echo nongnu.org \| sync\_smtpsearch nowalk nofall\
 echo nongnu.org \| httpsearch noinet6\
 echo nongnu.org \| sync\_httpsearch 80\

## SEE ALSO

[ruli(3)](/ruli/3.md)

## AUTHOR

This manual page was written by Everton da Silva Marques \<evertonsm@yahoo.com.br\>.
