---
name: "firedns_getmxlist"
section: "3"
platform: "linux"
package: "libfiredns-dev"
version: "0.9.12+dfsg-1"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/firedns_getmxlist"
---

# firedns\_getmxlist(3)

Create a query to resolve a hostname's MX record list

## NAME

firedns\_getmxlist - Create a query to resolve a hostname's MX record list

## SYNOPSIS

**#include \<firedns.h\>**\
 **-lfiredns**

**int firedns\_getmxlist(const char \* const** *name***)**

## DESCRIPTION

firedns\_getmxlist() creates and sends a request to resolve the MX records of *name*. It returns a file descriptor that should be [*select*(2)](/select/2.md)'ed upon (read set).  When the file descriptor shows ready for reading call [*firedns\_getresult*(3)](/firedns_getresult/3.md) to retrieve the results.

## RETURN VALUE

Returns an integer file descriptor that can be used the same as any other file descriptor.  Returns *-1* on error.

## AUTHOR

Ian Gulliver \<ian@penguinhosting.net\>

## SEE ALSO

[**libfiredns**(3)](/libfiredns/3.md), [**firedns\_getresult**(3)](/firedns_getresult/3.md), [**select**(2)](/select/2.md)
