---
name: "authKey"
section: "3"
platform: "linux"
package: "libbrlapi-dev"
version: "3.4.1-4"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/brlapi_settings_t"
---

# authKey(3)

Settings structure for BrlAPI connection.

Part of [brlapi\_settings\_t(3)](/brlapi_settings_t/3.md).

## NAME

brlapi\_settings\_t - Settings structure for *BrlAPI* connection.

## SYNOPSIS

`#include <brlapi.h>`

### Data Fields

char \* **authKey**\
 char \* **hostName**\

## Detailed Description

This structure holds every parameter needed to connect to *BrlAPI:* in which file the authentication key can be found and to which computer to connect.

**Examples:**.RS 4

```
 brlapi_settings_t settings;
 settings.authKey='/etc/brlapi.key';
 settings.hostName='foo';
```

*libbrlapi* will read authentication key from file `/etc/brlapi`.key and connect to the machine called 'foo', on the default TCP port.

```
 settings.hostName='10.1.0.2';
```

lets directly enter an IP address instead of a machine name.

```
 settings.hostName=':4321';
```

lets *libbrlapi* connect to the local computer, on TCP port 4321

**See also:**

**brlapi\_initializeConnection()** **brlapi\_loadAuthKey()**

## Field Documentation

### char\* brlapi\_settings\_t::authKey

To get authenticated, *libbrlapi* has to tell the *BrlAPI* server a secret key, for security reasons. This is the path to the file which holds it; it will hence have to be readable by the application.

Setting `NULL` defaults it to local installation setup or to the content of the BRLAPI\_AUTHNAME environment variable, if it exists.

### char\* brlapi\_settings\_t::hostName

this tells where the *BrlAPI* server resides: it might be listening on another computer, on any TCP port. It should look like 'foo:1234', which means TCP port number 1234 on computer called 'foo'.

**Note:**

Please check that resolving this name works before complaining

Settings `NULL` defaults it to localhost, using the local installation's default TCP port, or to the content of the BRLAPI\_HOSTNAME environment variable, if it exists.

## Author

Generated automatically by Doxygen for BrlAPI from the source code.
