lxi\_connect(3) C Library Functions lxi\_connect(3)

# [NAME](#NAME)

lxi\_connect - connect to LXI device

# [SYNOPSIS](#SYNOPSIS)

**#include &lt;lxi.h&gt;**

**int lxi\_connect(char \*address, int port, char \*name, int timeout, lxi\_protocol\_t protocol);**

# [DESCRIPTION](#DESCRIPTION)

The **lxi\_connect()** function connects to a LXI device with *name* at IP address pointed to by *address*

If *name* is NULL then the default name "inst0" will be used.

*protocol* is either VXI11 or RAW.

If *protocol* is RAW then *port* will be used as destination port.

The *timeout* is in milliseconds.

# [RETURN VALUE](#RETURN_VALUE)

Upon successful completion **lxi\_connect()** returns a new connection handle, or **LXI\_ERROR** if an error occurred.

# [SEE ALSO](#SEE_ALSO)

[**lxi\_send**(3)](/man/enterprise-packages/liblxi/lxi_send.3), [**lxi\_receive**(3)](/man/enterprise-packages/liblxi/lxi_receive.3), [**lxi\_disconnect**(3)](/man/enterprise-packages/liblxi/lxi_disconnect.3),

2024-11-08 liblxi 1.22

---

Document: lxi_connect(3) from liblxi 1.22-r4 (Chainguard OS)
Source: https://github.com/lxi-tools/liblxi
