.TH MDEX_DEL 3 2023-06-20 "LIBRECAST" "Librecast Programmer's Manual" .SH NAME mdex_del \- delete an entry from a multicast index .SH LIBRARY Librecast library .RI ( liblibrecast ", " \-llibrecast ) .SH SYNOPSIS .nf .B #include .PP .BI "int mdex_del(mdex_t " *mdex ", unsigned char " *hash ", size_t " hashlen ");" .fi .PP Compile and link with \fI\-llibrecast\fP. .SH DESCRIPTION The .BR mdex_del function deletes an entry from the multicast index .IR mdex using .IR hash (of length .IR hashlen ) as the key. If no matching entry is found in the index, -1 is returned and errno is set to .BR ENOENT . .PP .IR hashlen can be shorter than the full length of the hash stored with .BR mdex_put (3) and will delete the first entry matching the truncated hash. This allows us to store the full 32 byte hash in the index, but still match against the truncated hash derived from, say, the 14 bytes of an IPv6 multicast group address. .SH RETURN VALUE .BR mdex_put () returns zero on success. On error, \-1 is returned, and .I errno is set to indicate the error. .SH ERRORS .TP .BR EINVAL Invalid argument. Both .IR mdex and .IR hash are required (not NULL), and .IR hashlen > 0. .PP .BR ENOENT No entry found matching .IR hash . .SH SEE ALSO .BR mdex_init (3), .BR mdex_free (3), .BR mdex_get (3), .BR mdex_put (3), .BR lc_share (3)