XCB_SELINUX_GET_DEVICE_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_context β€” a page from the XCB Requests saga πŸ‘‘

okay so bestie, we're in xcb_selinux_get_device_context(3) territory, and this is your girl walking you through it. it's giving very niche, very X11, very SELinux. buckle up πŸŽ€


✨ NAME ✨

xcb_selinux_get_device_context -

(yes. that's it. that's the whole name section. the description slot is just... empty. iconic of it honestly πŸ’€)


✨ SYNOPSIS ✨

#include <xcb/xselinux.h>

πŸ¦‹ Request function πŸ¦‹

xcb_selinux_get_device_context_cookie_t
       xcb_selinux_get_device_context(xcb_connection_t *conn,
       uint32_t device);

πŸ¦‹ Reply datastructure πŸ¦‹

typedef struct xcb_selinux_get_device_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_context_reply_t;

πŸ¦‹ Reply function πŸ¦‹

xcb_selinux_get_device_context_reply_t
       *xcb_selinux_get_device_context_reply(xcb_connection_t *conn,
       xcb_selinux_get_device_context_cookie_t cookie,
       xcb_generic_error_t **e);

πŸ¦‹ Reply accessors πŸ¦‹

char *xcb_selinux_get_device_context_context(const
       xcb_selinux_get_device_context_request_t *reply);

int xcb_selinux_get_device_context_context_length(const
       xcb_selinux_get_device_context_reply_t *reply);

xcb_generic_iterator_t xcb_selinux_get_device_context_context_end(const
       xcb_selinux_get_device_context_reply_t *reply);

(and yes, xcb_selinux_get_device_context_request_t really is spelled like that up there. not me fixing it, not me touching it, that's just the canon ✨)


✨ REQUEST ARGUMENTS ✨

  • conn β€” your XCB connection to X11, the whole reason any of this is happening. 🫢
  • device β€” and the docs say, verbatim: TODO: NOT YET DOCUMENTED. like... the mystery of it all πŸ’€

✨ REPLY FIELDS ✨

  • response_type β€” what kind of reply this even is. in this case, it's XCB_SELINUX_GET_DEVICE_CONTEXT. plot twist: this field also lives inside xcb_generic_reply_t, so you can use it to tell your replies apart from each other when they're all piling up in the group chat.
  • sequence β€” the sequence number of the last request the X11 server actually processed. the receipts, basically.
  • length β€” how long the reply is, in words. and a word, bestie, is 4 bytes.
  • context_len β€” the documentation here is literally just TODO: NOT YET DOCUMENTED. so... yeah. we simply do not know. πŸ™ˆ

✨ DESCRIPTION ✨

(blank. no notes. the void stares back. πŸ’œ)


✨ RETURN VALUE ✨

So you get handed back an xcb_selinux_get_device_context_cookie_t. πŸͺ

Errors? you don't deal with them right here β€” you handle them when you call the reply function, xcb_selinux_get_device_context_reply.

But if you'd rather catch your errors in the event loop instead (main character behavior, honestly), use xcb_selinux_get_device_context_unchecked. Go read xcb-requests(3) for the full tea on how that works.


✨ ERRORS ✨

πŸ’€ This request does never generate any errors.

like... none. zero. not a single one. slay.


✨ SEE ALSO ✨

(nothing listed. it's giving minimalist. it's giving mystery. 🌈)


✨ AUTHOR ✨

Generated from xselinux.xml. Wanna send corrections or improvements? Contact xcb@lists.freedesktop.org β€” they're literally waiting for your email, bestie. πŸ’Œ


and that's the whole page!! 🌸 this beauty came to you courtesy of X Version 11 and libxcb 1.17.0, and it's filed under xcb_selinux_get_device_context(3). go forth and query those device contexts, you absolute legend πŸ‘‘βœ¨πŸ’–