Every request sent from an X client to the X server in the X11 protocol is identified by an opcode. Opcodes 0-127 are reserved for the core X11 protocol. Opcodes 128-255 are used by extensions. For the core protocol request opcodes, you can find their definitions in any of these places: * the `X_*` defines at the end of [[http://cgit.freedesktop.org/xorg/proto/xproto/tree/Xproto.h|/usr/include/X11/Xproto.h]] * the `XRequest.*` lines in [[http://cgit.freedesktop.org/xorg/lib/libX11/tree/src/XErrorDB|/usr/share/X11/XErrorDB]] * the `R* X11:*` lines in [[http://cgit.freedesktop.org/xorg/xserver/tree/dix/protocol.txt|/usr/lib/xorg/protocol.txt]] * the X protocol specs at http://www.x.org/releases/current/doc/index.html Opcodes 128-255 are dynamically assigned to X extensions, depending on which are supported and active in your current X server version/configuration. To see which are which in your currently running X server, run: {{{ xdpyinfo -queryExt | grep opcode }}} Each extension is assigned a single opcode from that range, also known as it's “major opcode.” For each operation provided by that extension, typically a second byte is used as a “minor opcode.” Minor opcodes for each extension are defined by the extension. For definitions of those, see any of these: * the headers for that extension in [[http://cgit.freedesktop.org/xorg/proto/|/usr/include/X11/extensions/]] * the `XRequest..*` lines in [[http://cgit.freedesktop.org/xorg/lib/libX11/tree/src/XErrorDB|/usr/share/X11/XErrorDB]] * the `R* :*` lines in [[http://cgit.freedesktop.org/xorg/xserver/tree/dix/protocol.txt|/usr/lib/xorg/protocol.txt]] * the X extension protocol specs at http://www.x.org/releases/current/doc/index.html