MDEX_DEL(3)
π mdex_del(3) π
okay so bestie, welcome to the Librecast Programmer's Manual β this is the page for mdex_del, and yes it's giving "tiny function, big feelings". sit down, hydrate, let's go π«Ά
β¨ NAME β¨
mdex_del β delete an entry from a multicast index ποΈ
π LIBRARY π
Librecast library (liblibrecast, -llibrecast) β she's the moment, she's the whole vibe π
πΈ SYNOPSIS πΈ
#include <librecast/mdex.h>
int mdex_del(mdex_t *mdex, unsigned char *hash, size_t hashlen);
Compile and link with -llibrecast. no cap, that's literally the whole thing β¨
π¦ DESCRIPTION π¦
So the mdex_del function deletes an entry from the multicast index mdex, using hash (of length hashlen) as the key. like, that's the girl's whole job π₯
If no matching entry is found in the index, -1 is returned and errno is set to ENOENT. π (we'll get to that in a sec, don't spiral)
okay here's the actually iconic part: hashlen can be shorter than the full length of the hash stored with mdex_put(3), and it will delete the first entry matching the truncated hash. lowkey genius, highkey useful. 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. π
not me being obsessed with partial matchingβ¦ it's literally her main character trait π
π RETURN VALUE π
mdex_put() returns zero on success. π On error, -1 is returned, and errno is set to indicate the error.
(yes bestie, the original page really does say mdex_put() right there in the RETURN VALUE section. i'm not fixing it, i'm not touching it, i'm just reporting the news π we keep every detail, that's the rule.)
π ERRORS π
EINVALβ Invalid argument. Bothmdexandhashare required (notNULL), andhashlen > 0. like, you have to actually give her something to work with, she's not a mind reader πENOENTβ No entry found matchinghash. she looked. she found nothing. it's giving empty. it's giving void. it's givingENOENTπ
π SEE ALSO π
mdex_init(3), mdex_free(3), mdex_get(3), mdex_put(3), lc_share(3)
go read those too, they're the rest of the friend group and they all ate π
and that's the page!! π¦β¨ this was the LIBRECAST manual, dated 2023-06-20, and she's filed under MDEX_DEL(3) β periodt π
πΈ
π¦ where this page comes from
- debian trixie: liblibrecast-dev 0.9.1-1 Β· GPL-2.0-only OR GPL-3.0-only
- nixos 26.05: librecast 0.11.2
- nixpkgs unstable: librecast 0.11.2
- ubuntu noble: liblibrecast-dev 0.8.0-1.1build1 Β· GPL-2.0-only OR GPL-3.0-only
- ubuntu questing: liblibrecast-dev 0.9.1-1
- ubuntu resolute: liblibrecast-dev 0.11.2-2 Β· GPL-2.0-only OR GPL-3.0-only
- ubuntu stonking: liblibrecast-dev 0.11.2-2build1 Β· GPL-2.0-only OR GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms