GitXplorerGitXplorer
s

rust-alookup

public
3 stars
1 forks
0 issues

Commits

List of commits on branch master.
Unverified
0d0a9dd451570fb64235dab288e065dbde66bf5e

release 0.2.0

sstbuehler committed 6 years ago
Unverified
f7b4106175a1745cd9ccb541293cdcab5f1b0c8e

add generate-completion option

sstbuehler committed 6 years ago
Unverified
efd4ceb744a25d8fa2fde3f45e536a16601b4d1b

update edition to 2018

sstbuehler committed 6 years ago
Unverified
267f54ba8ebf33712ec9e3bf0f3d1be1c9d9e495

update dependencies

sstbuehler committed 6 years ago
Unverified
6890dc2c02a210576b4a3056cad9fab5bc8ac4cc

mention sort option in readme

sstbuehler committed 6 years ago
Unverified
efc98d2d8f772cee079e72050eb231cf4526b20a

release 0.1.1

sstbuehler committed 6 years ago

README

The README file for this repository.

Travis Build Status crates.io MIT licensed

alookup

Lookup IPv4 and IPv6 addresses for a hostname. Only prints addresses on stdout (one per line), errors to stderr, and hard errors can be detected through inspecting the exit code.

It uses the resolv crate (specifically the query method), which uses libresolv.so which is typically configured via /etc/resolv.conf to do DNS resolution.

Install

Install from crates.io with cargo install alookup.

Using it

Examples

alookup mail.google.com

Usage

alookup [FLAGS] <NAME>

FLAGS:

    -4               Query only IPv4 records (A)
    -6               Query only IPv6 records (AAAA)
    -s, --sort       Sort (and deduplicate) addresses
    -h, --help       Prints help information
    -V, --version    Prints version information

ARGS:

    <NAME>    Name to lookup

Exit codes

  • 0: success (or NODATA). You might want to treat an empty address set (no output) as failure too (similar to NXDOMAIN).
  • 1: name not found (NXDOMAIN). If an empty address set is ok for you, you might want to ignore this exit code.
  • 2: SRVFAIL, timeouts, failed parsing response, generic resolver failure...
  • 3: failed parsing a specific answer record (might have printed partial result, but breaks on first broken record)

Other exit codes should be treated as failures too; a non-zero exit code always should show an error on stderr, and every time an error is printed to stderr there should be a non-zero exit code.