IXP_PDATA(3)

πŸ“¦ version 0-unstable-2022-04, in nixos 26.05, nixpkgs unstable

🌸 NAME 🌸

okay bestie, say hi to ixp_pdata β€” this is the IXP_PDATA(3) page, library functions manual vibes, and it's literally about packing and unpacking raw buffers. πŸ’–

✨ SYNOPSIS ✨

#include <ixp.h>

void ixp_pdata(IxpMsg *msg, char **data, uint len);

πŸ’… DESCRIPTION πŸ’…

so ixp_pdata packs or unpacks a raw character buffer of size len. iconic. πŸŽ€

  • if msg->mode is MsgPack, the buffer pointed to by data is packed into the buffer at msg->pos. slay.
  • if msg->mode is MsgUnpack, the address pointed to by s is loaded with a malloc(3) allocated buffer with the contents of the buffer at msg->pos. yes, the manual says s here β€” keeping it exact, bestie. 🫢

in either case, msg->pos is advanced by the number of bytes read or written. periodt. ✨

edge-case check πŸ‘€: if the action would advance msg->pos beyond msg->end, msg->pos is still advanced, but no other action is taken. no cap.

πŸ”₯ SEE ALSO πŸ”₯


mwah πŸ’‹ this page is from the libixp Manual, dated 2012 Dec β€” IXP_PDATA(3) out. πŸ¦‹

πŸ“¦ where this page comes from