Scroll to navigation

MDEX_PUT(3) Librecast Programmer's Manual MDEX_PUT(3)

NAME

mdex_put - insert an entry into a multicast index

LIBRARY

Librecast library (liblibrecast, -llibrecast)

SYNOPSIS

#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.

DESCRIPTION

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

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

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

SEE ALSO

mdex_init(3), mdex_free(3), mdex_get(3), mdex_del(3), lc_share(3)

2023-06-20 LIBRECAST