---
name: "dmmp_context_new"
section: "3"
platform: "linux"
package: "multipath-tools"
version: "0.15.1-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/dmmp_context_new"
---

# dmmp\_context\_new(3)

Create struct dmmp\_context.

## NAME

dmmp\_context\_new - Create struct dmmp\_context.

## SYNOPSIS

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

## ARGUMENTS

- void

  no arguments

## DESCRIPTION

The default logging level (DMMP\_LOG\_PRIORITY\_DEFAULT) is DMMP\_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 **dmmp\_context\_log\_func\_set** to set your own log handler, check manpage [libdmmp.h(3)](/libdmmp.h/3.md) for detail.

## RETURN

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