---
name: "firedns_getip4"
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_getip4"
---

# firedns\_getip4(3)

Create a query to resolve a hostname to an IPv4 address

## NAME

firedns\_getip4 - Create a query to resolve a hostname to an IPv4 address

## SYNOPSIS

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

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

## DESCRIPTION

firedns\_getip4() creates and sends a request to resolve *name* to an IPv4 address.  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)
