XCB_SELINUX_GET_DEVICE_CREATE_CONTEXT_REPLY(3)

πŸ“¦
version 1.17.0 Β· 4 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, debian trixie, fedora 43, fedora 44, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ‘‘ xcb_selinux_get_device_create_context(3) β€” XCB Requests, bestie edition

okay so this one lives in the XCB Requests family, manual section 3 (that's your library-functions girlypop section, iykyk). It's a <pink>SELinux</pink> flavored XCB request, and tbh the manpage itself is a little mysterious about what it does β€” but everything it does tell us, we're keeping, no cap. πŸ’–


✨ NAME ✨

xcb_selinux_get_device_create_context β€” and like… that's it. The description after the dash is literally blank in the source. The void. The silence. 🫢 So the function name is your whole personality here.


🌸 SYNOPSIS 🌸

First things first, you gotta bring in the header:

#include <xcb/xselinux.h>

πŸ’… Request function

xcb_selinux_get_device_create_context_cookie_t
       xcb_selinux_get_device_create_context(xcb_connection_t *conn,

(yes it's just vibing there with a trailing comma, we don't make the rules)

πŸŽ€ Reply datastructure

typedef struct xcb_selinux_get_device_create_context_reply_t {
    uint8_t  response_type;
    uint8_t  pad0;
    uint16_t sequence;
    uint32_t length;
    uint32_t context_len;
    uint8_t  pad1[20];
} xcb_selinux_get_device_create_context_reply_t;

πŸ¦‹ Reply function

xcb_selinux_get_device_create_context_reply_t
       *xcb_selinux_get_device_create_context_reply(xcb_connection_t *conn,
       xcb_selinux_get_device_create_context_cookie_t cookie,
       xcb_generic_error_t **e);

🌈 Reply accessors

these little helpers are how you actually get at the good stuff:

char *xcb_selinux_get_device_create_context_context(const
       xcb_selinux_get_device_create_context_request_t *reply);
int xcb_selinux_get_device_create_context_context_length(const
       xcb_selinux_get_device_create_context_reply_t *reply);
xcb_generic_iterator_t
       xcb_selinux_get_device_create_context_context_end(const
       xcb_selinux_get_device_create_context_reply_t *reply);

πŸ“ REQUEST ARGUMENTS πŸ“

  • conn β€” the XCB connection to X11. your lil phone line to the server, basically. mandatory, obviously.

πŸ’œ REPLY FIELDS πŸ’œ

  • response_type β€” the type of this reply, and in this case it's XCB_SELINUX_GET_DEVICE_CREATE_CONTEXT. This field is also present in the xcb_generic_reply_t, and you can use it to tell replies apart from each other. it's giving name tag at a party πŸŽ€
  • sequence β€” the sequence number of the last request processed by the X11 server. order matters, bestie.
  • length β€” the length of the reply, in words. and a word is 4 bytes. (not a real word. a word-word. computer word. πŸ’€)
  • context_len β€” TODO: NOT YET DOCUMENTED. yeah. that's literally what it says. not me finding an undocumented field in the wild 😭

🌟 DESCRIPTION 🌟

…okay so there's genuinely nothing here. The DESCRIPTION section is empty in the source. a blank page. a canvas. a moment of silence. πŸ™ˆ


⭐ RETURN VALUE ⭐

It hands you back an xcb_selinux_get_device_create_context_cookie_t. πŸͺ

And here's the important part: errors have to be handled when you call the reply function xcb_selinux_get_device_create_context_reply.

If you'd rather handle errors in the event loop instead, use xcb_selinux_get_device_create_context_unchecked. See xcb-requests(3) for details β€” that's the ✨ deep lore ✨ page, go read it.


πŸ”₯ ERRORS πŸ”₯

This request does never generate any errors.

fr fr. zero errors. the drama-free request. slay. πŸ‘‘

πŸ’€ SEE ALSO πŸ’€

nothing listed. empty. a blank SEE ALSO. no friends on this page, only vibes. πŸ¦‹


🌸 AUTHOR 🌸

Generated from xselinux.xml. Contact xcb@lists.freedesktop.org for corrections and improvements. so if something's wrong, that's the email, bestie, don't @ me πŸ’Œ


and that's the whole page! πŸŽ€ this one shipped with X Version 11, part of libxcb 1.17.0 β€” tysm for reading, drink some water, and go handle those cookies properly. periodt. πŸ’…βœ¨