mdex_put(3)

mdex_put3

Insert an entry into a multicast index

Usage

#include <librecast/mdex.h>

int mdex_put(mdex_t *mdex, unsigned char *hash, size_t hashlen, mdex_entry_t *entry);

Compile and link with -llibrecast.

Library

Librecast library (liblibrecast, -llibrecast)

Overview

The mdex_put function stores the value of entry in the multicast index mdex, using hash (of length hashlen) as the key.

entry may be NULL, and an entry will still be created.

Return value

mdex_put() returns zero on success. On error, -1 is returned, and errno is set to indicate the error.

Errors

EINVAL

Invalid argument. Both mdex and hash are required (not NULL), and hashlen > 0.

ENOMEM Not enough space/cannot allocate memory (POSIX.1-2001).

From liblibrecast-dev 0.9.1-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.