CPG_Z...OINED(3)
πΈ CPG_Z...OINED(3) πΈ
okay bestie, welcome to the Corosync Cluster Engine Programmer's Manual π this page is literally called CPG_Z...OINED(3) and it's giving "zero copy multicast, but make it a whole vibe." sit down, grab a boba, we're doing this π§β¨
β¨ NAME β¨
cpg_mcast_joined β multicasts a zero copy buffer to all groups joined to a handle π¦
(no cap, that's the whole name section. short and iconic. periodt.)
π SYNOPSIS π
#include <sys/uio.h> #include <corosync/cpg.h>
int cpg_zcb_mcast_joined(cpg_handle_t handle, cpg_guarantee_t guarantee,
const void *buffer,int msg_len );
like. look at her. the signature. the little msg_len with no space before it. she's chaotic but she's ours π
π DESCRIPTION π
so cpg_zcb_mcast_joined will multicast a zero copy buffer message to literally every process that has been joined up using cpg_join(3) for the same group name. that's the whole point, bestie. any messages sent to any of the groups joined to the parameter handle get delivered to all subscribed processes in the system. every single one. no stragglers. π₯
the guarantee argument is you requesting a delivery guarantee for the message you're sending. iconic of you. the cpg_guarantee_t type is defined by:
typedef enum {
CPG_TYPE_UNORDERED, /* not implemented */
CPG_TYPE_FIFO, /* same as agreed */
CPG_TYPE_AGREED, /* implemented */
CPG_TYPE_SAFE /* not implemented */
} cpg_guarantee_t;
and the meanings of the cpg_guarantee_t typedef are, bestie, listen up:
CPG_TYPE_UNORDEREDβ messages are guaranteed to be delivered, but with no particular order. it's giving "we'll get there when we get there." this mode is unimplemented in the CPG library, so don't come crying to me. πCPG_TYPE_FIFOβ messages are guaranteed to be delivered in first sent first delivery order. in fact, this guarantee is equivalent to theCPG_TYPE_AGREEDguarantee. they're the same picture, literally. πCPG_TYPE_AGREEDβ all processors must agree on the order of delivery. if a message is sent from two or more processes at about the same time, the delivery will occur in the same order to all processes. synchronized queens only. πCPG_TYPE_SAFEβ all processes must agree on the order of delivery, and further, all processes must have a copy of the message before any delivery takes place. this mode is unimplemented in the CPG library. so again, not a thing yet. π
the msg argument describes the zero copy buffer which is used to transmit a message. this buffer must be allocated by cpg_zcb_alloc(3) β do not just vibe-check your way into a random pointer, i'm begging. π«Ά
the msg_len argument describes the number of bytes to be transmitted in the zero copy buffer.
π RETURN VALUE π
this call returns the CS_OK value if successful. otherwise? an error is returned. that's it, that's the tea. β
π ERRORS π
the errors are undocumented. yeah. that's the whole section. we know. we're all thinking it. π§
π SEE ALSO π
cpg_overview(3), cpg_initialize(3), cpg_finalize(3), cpg_fd_get(3), cpg_dispatch(3), cpg_join(3), cpg_leave(3), cpg_mcast_joined(3), cpg_membership_get(3) cpg_zcb_alloc(3) cpg_zcb_free(3) cpg_zcb_mcast_joined(3) cpg_context_get(3) cpg_context_set(3) cpg_local_get(3)
and then, just chillin' here at the bottom like they were dropped in at the last minute (because they were), the error codes:
CS_ERR_TRY_AGAINβ Resource temporarily unavailableCS_ERR_INVALID_PARAMβ Invalid argumentCS_ERR_ACCESSβ Permission deniedCS_ERR_LIBRARYβ The connection failedCS_ERR_INTERRUPTβ System call interrupted by a signalCS_ERR_NOT_SUPPORTEDβ The requested protocol/functionality not supportedCS_ERR_MESSAGE_ERRORβ Incorrect auth message receivedCS_ERR_NO_MEMORYβ Not enough memory to complete the requested task
and that's the page, bestie!! π«Ά this was the corosync Man Page, dated 2004-08-31 β yes she's a vintage queen and she ate β mwah, stay zero-copy, stay agreed-order, and go allocate that buffer properly πβ¨π
π¦ where this page comes from
- debian bookworm: libcpg-dev 3.1.7-1+deb12u2 Β· BSD-3-Clause
- debian trixie: libcpg-dev 3.1.9-2+deb13u1 Β· BSD-3-Clause
- epel 9: corosynclib-devel 3.1.10-0.2.el9.1 Β· BSD-3-Clause
- fedora 43: corosynclib-devel 3.1.10-3.fc43 Β· BSD-3-Clause
- fedora 43: corosynclib-devel 3.1.10-3.fc43 Β· BSD-3-Clause
- fedora 43: corosynclib-devel 3.1.9-5.fc43 Β· BSD-3-Clause
- fedora 43: corosynclib-devel 3.1.9-5.fc43 Β· BSD-3-Clause
- fedora 44: corosynclib-devel 3.1.10-4.fc44 Β· BSD-3-Clause
- fedora 44: corosynclib-devel 3.1.10-4.fc44 Β· BSD-3-Clause
- fedora 44: corosynclib-devel 3.1.10-6.fc44 Β· BSD-3-Clause
- fedora 44: corosynclib-devel 3.1.10-6.fc44 Β· BSD-3-Clause
- nixos 26.05: corosync 3.1.9
- nixpkgs unstable: corosync 3.1.9
- opensuse-leap 16.0: corosync-devel 3.1.9-160000.4.1 Β· BSD-3-Clause
- opensuse-leap 16.0: corosync-devel 3.1.9-160000.4.1 Β· BSD-3-Clause
- opensuse-leap 16.0: corosync-devel 3.1.9-160000.4.1 Β· BSD-3-Clause
- opensuse-leap 16.0: corosync-devel 3.1.9-160000.4.1 Β· BSD-3-Clause
- ubuntu jammy: libcpg-dev 3.1.6-1ubuntu1 Β· BSD-3-Clause
- ubuntu jammy: libcpg-dev 3.1.6-1ubuntu1.2 Β· BSD-3-Clause
- ubuntu noble: libcpg-dev 3.1.7-1ubuntu3 Β· BSD-3-Clause
- ubuntu noble: libcpg-dev 3.1.7-1ubuntu3.2 Β· BSD-3-Clause
- ubuntu questing: libcpg-dev 3.1.9-2ubuntu1
- ubuntu questing: libcpg-dev 3.1.9-2ubuntu1.1
- ubuntu resolute: libcpg-dev 3.1.9-2ubuntu3 Β· BSD-3-Clause
- ubuntu stonking: libcpg-dev 3.1.10-3ubuntu1 Β· BSD-3-Clause
- Copyright (c) 2009 Red Hat, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms