---
name: "iscsi_context_new"
section: "3"
platform: "linux"
package: "open-iscsi"
version: "2.1.13-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/iscsi_context_new"
---

# iscsi\_context\_new(3)

Create struct iscsi\_context.

## NAME

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

## SYNOPSIS

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

## ARGUMENTS

- void

  no arguments

## 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)](/libopeniscsiusr.h/3.md) for detail.

## RETURN

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