---
name: "mongoc_host_list_t"
section: "3"
platform: "linux"
package: "libmongoc-doc"
version: "1.30.4-1+deb13u3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/mongoc_host_list_t"
---

# mongoc\_host\_list\_t(3)

## SYNOPSIS

```
typedef struct {
   mongoc_host_list_t *next;
   char host[BSON_HOST_NAME_MAX + 1];
   char host_and_port[BSON_HOST_NAME_MAX + 7];
   uint16_t port;
   int family;
   void *padding[4];
} mongoc_host_list_t;
```

## DESCRIPTION

The host and port of a MongoDB server. Can be part of a linked list: for example the return value of *mongoc\_uri\_get\_hosts()* when multiple hosts are provided in the MongoDB URI.

**SEE ALSO:**

```
mongoc_uri_get_hosts() and mongoc_cursor_get_host().
```

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
