iscsi\_context\_new(3) API Manual iscsi\_context\_new(3)

# [NAME](#NAME)

iscsi\_context\_new - Create struct iscsi\_context.

# [SYNOPSIS](#SYNOPSIS)

**struct iscsi\_context * iscsi\_context\_new** **(void);**

# [ARGUMENTS](#ARGUMENTS)

[void](#void)

no arguments

# [DESCRIPTION](#DESCRIPTION)

The default logging level (LIBISCSI\_LOG\_PRIORITY\_DEFAULT) is LIBISCSI\_LOG\_PRIORITY\_WARNING which means only warning and error message will be forward to log handler function. The default log handler function will print log message to STDERR, to change so, please use **iscsi\_context\_log\_func\_set** to set your own log handler, check manpage [libopeniscsiusr.h(3)](/man/enterprise-packages/open-iscsi/libopeniscsiusr.h.3) for detail.

# [RETURN](#RETURN)

Pointer of 'struct iscsi\_context'. Should be freed by **iscsi\_context\_free**.

iscsi\_context\_new October 2026

---

Document: iscsi_context_new(3) from open-iscsi 2.1.13-r2 (Chainguard OS)
Source: https://github.com/open-iscsi/open-iscsi
