From 6836ccb208f8c16824b8c1e330acb077c70c98c6 Mon Sep 17 00:00:00 2001 From: Floris Bos Date: Sat, 17 Jan 2015 22:49:48 +0100 Subject: Fix handling of multiple VNC commands per websockets frame - When processing input, check if there is any extra data pending in the internal websocket frame and SSL buffers. - Prevents input events lagging behind because they get stuck in one of the buffers. Data pending in our own buffers cannot be detected with select() so was not processed until more input arrives from the network. - Closes # 55 Signed-off-by: Floris Bos --- rfb/rfb.h | 1 + 1 file changed, 1 insertion(+) (limited to 'rfb') diff --git a/rfb/rfb.h b/rfb/rfb.h index f7919c6..0c34d74 100644 --- a/rfb/rfb.h +++ b/rfb/rfb.h @@ -765,6 +765,7 @@ extern rfbBool webSocketsCheck(rfbClientPtr cl); extern rfbBool webSocketCheckDisconnect(rfbClientPtr cl); extern int webSocketsEncode(rfbClientPtr cl, const char *src, int len, char **dst); extern int webSocketsDecode(rfbClientPtr cl, char *dst, int len); +extern rfbBool webSocketsHasDataInBuffer(rfbClientPtr cl); #endif /* rfbserver.c */ -- cgit v1.2.1 From 612de004c47586d74d5a93901a2d94ca1fc3f5e3 Mon Sep 17 00:00:00 2001 From: Christian Beier Date: Fri, 17 Apr 2015 12:20:59 +0200 Subject: Revert "LibVNCClient: Add H.264 encoding for framebuffer updates" This reverts commit d891478ec985660c03f95cffda0e6a1ad4ba350c. Conflicts: configure.ac libvncclient/h264.c --- rfb/rfbproto.h | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'rfb') diff --git a/rfb/rfbproto.h b/rfb/rfbproto.h index 4169fd6..d2b8235 100644 --- a/rfb/rfbproto.h +++ b/rfb/rfbproto.h @@ -874,21 +874,6 @@ typedef struct { #endif -/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * h264 - h264 encoding. We have an rfbH264Header structure - * giving the number of bytes following. Finally the data follows is - * h264 encoded frame. - */ - -typedef struct { - uint32_t nBytes; - uint32_t slice_type; - uint32_t width; - uint32_t height; -} rfbH264Header; - -#define sz_rfbH264Header 16 - /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * XCursor encoding. This is a special encoding used to transmit X-style * cursor shapes from server to clients. Note that for this encoding, -- cgit v1.2.1 From 92f558482d94c5152174a1983a40863bd6b07911 Mon Sep 17 00:00:00 2001 From: Christian Beier Date: Thu, 28 May 2015 15:34:10 +0200 Subject: Do away with rfbint.h generation and use stdint.h directly instead. --- rfb/rfbproto.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'rfb') diff --git a/rfb/rfbproto.h b/rfb/rfbproto.h index d2b8235..9b082dd 100644 --- a/rfb/rfbproto.h +++ b/rfb/rfbproto.h @@ -70,7 +70,6 @@ #define SOCKET int #else #include -#include #endif #ifdef LIBVNCSERVER_HAVE_LIBZ @@ -108,9 +107,7 @@ typedef int8_t rfbBool; #define TRUE -1 #endif -#ifdef _MSC_VER #include -#endif typedef uint32_t rfbKeySym; typedef uint32_t rfbPixel; -- cgit v1.2.1 From 97f442ef2aa65ade6bea11e90054c57b90abbaca Mon Sep 17 00:00:00 2001 From: Christian Beier Date: Thu, 28 May 2015 16:02:52 +0200 Subject: Instead of letting the build system define endianess, rely on endian.h. --- rfb/rfbproto.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'rfb') diff --git a/rfb/rfbproto.h b/rfb/rfbproto.h index 9b082dd..354f1aa 100644 --- a/rfb/rfbproto.h +++ b/rfb/rfbproto.h @@ -80,11 +80,11 @@ #endif #endif -/* some autotool versions do not properly prefix - WORDS_BIGENDIAN, so do that manually */ -#ifdef WORDS_BIGENDIAN -#define LIBVNCSERVER_WORDS_BIGENDIAN -#endif +# include +# if __BYTE_ORDER == __BIG_ENDIAN +# define LIBVBNCSERVER_WORDS_BIGENDIAN 1 +# endif + /* MS compilers don't have strncasecmp */ #ifdef _MSC_VER -- cgit v1.2.1 From fe7df89fb1777b4fd303d5a601541f6062caf8ea Mon Sep 17 00:00:00 2001 From: plettix Date: Wed, 22 Jul 2015 08:37:54 +0200 Subject: shift fixes - if an integer is a negative number then the return value of "Swap32IfLE" was -1 --- rfb/rfb.h | 4 ++-- rfb/rfbclient.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'rfb') diff --git a/rfb/rfb.h b/rfb/rfb.h index 0c34d74..c8c247a 100644 --- a/rfb/rfb.h +++ b/rfb/rfb.h @@ -720,10 +720,10 @@ typedef struct _rfbClientRec { #define Swap24(l) ((((l) & 0xff) << 16) | (((l) >> 16) & 0xff) | \ (((l) & 0x00ff00))) -#define Swap32(l) (((l) >> 24) | \ +#define Swap32(l) ((((l) >> 24) & 0x000000ff)| \ (((l) & 0x00ff0000) >> 8) | \ (((l) & 0x0000ff00) << 8) | \ - ((l) << 24)) + (((l) & 0x000000ff) << 24)) extern char rfbEndianTest; diff --git a/rfb/rfbclient.h b/rfb/rfbclient.h index aedb4f4..e210a41 100644 --- a/rfb/rfbclient.h +++ b/rfb/rfbclient.h @@ -47,13 +47,13 @@ (*(char *)&client->endianTest ? ((((s) & 0xff) << 8) | (((s) >> 8) & 0xff)) : (s)) #define rfbClientSwap32IfLE(l) \ - (*(char *)&client->endianTest ? ((((l) & 0xff000000) >> 24) | \ + (*(char *)&client->endianTest ? ((((l) >> 24) & 0x000000ff) | \ (((l) & 0x00ff0000) >> 8) | \ (((l) & 0x0000ff00) << 8) | \ (((l) & 0x000000ff) << 24)) : (l)) #define rfbClientSwap64IfLE(l) \ - (*(char *)&client->endianTest ? ((((l) & 0xff00000000000000ULL) >> 56) | \ + (*(char *)&client->endianTest ? ((((l) >> 56 ) & 0xff00000000000000ULL) | \ (((l) & 0x00ff000000000000ULL) >> 40) | \ (((l) & 0x0000ff0000000000ULL) >> 24) | \ (((l) & 0x000000ff00000000ULL) >> 8) | \ -- cgit v1.2.1 From 9c7efb7633ba62cd80c93e83284663f805bb3031 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Fri, 9 Oct 2015 17:13:35 +0200 Subject: Fix some typos (found by codespell) Signed-off-by: Stefan Weil --- rfb/keysym.h | 4 ++-- rfb/rfb.h | 6 +++--- rfb/rfbproto.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'rfb') diff --git a/rfb/keysym.h b/rfb/keysym.h index 219f95b..92d5158 100644 --- a/rfb/keysym.h +++ b/rfb/keysym.h @@ -162,7 +162,7 @@ SOFTWARE. #define XK_Zen_Koho 0xFF3D /* Multiple/All Candidate(s) */ #define XK_Mae_Koho 0xFF3E /* Previous Candidate */ -/* 0xFF31 thru 0xFF3F are under XK_KOREAN */ +/* 0xFF31 through 0xFF3F are under XK_KOREAN */ /* Cursor control & motion */ @@ -240,7 +240,7 @@ SOFTWARE. /* - * Auxilliary Functions; note the duplicate definitions for left and right + * Auxiliary Functions; note the duplicate definitions for left and right * function keys; Sun keyboards and a few other manufactures have such * function key groups on the left and/or right sides of the keyboard. * We've not found a keyboard with more than 35 function keys total. diff --git a/rfb/rfb.h b/rfb/rfb.h index 0c34d74..6da6323 100644 --- a/rfb/rfb.h +++ b/rfb/rfb.h @@ -477,7 +477,7 @@ typedef struct _rfbClientRec { authentication. If the right conditions are met this state will be set (see the auth.c file) when rfbProcessClientInitMessage is called. - If the state is RFB_INITIALISATION_SHARED we should not expect to recieve + If the state is RFB_INITIALISATION_SHARED we should not expect to receive any ClientInit message, but instead should proceed to the next stage of initialisation as though an implicit ClientInit message was received with a shared-flag of true. (There is currently no corresponding @@ -1253,14 +1253,14 @@ rfbBool rfbUpdateClient(rfbClientPtr cl); Try example.c: it outputs on which port it listens (default: 5900), so it is display 0. To view, call @code vncviewer :0 @endcode You should see a sheet with a gradient and "Hello World!" written on it. Try - to paint something. Note that everytime you click, there is some bigger blot, + to paint something. Note that every time you click, there is some bigger blot, whereas when you drag the mouse while clicked you draw a line. The size of the blot depends on the mouse button you click. Open a second vncviewer with the same parameters and watch it as you paint in the other window. This also works over internet. You just have to know either the name or the IP of your machine. Then it is @code vncviewer machine.where.example.runs.com:0 @endcode or similar for the remote client. Now you are ready to type something. Be sure - that your mouse sits still, because everytime the mouse moves, the cursor is + that your mouse sits still, because every time the mouse moves, the cursor is reset to the position of the pointer! If you are done with that demo, press the down or up arrows. If your viewer supports it, then the dimensions of the sheet change. Just press Escape in the viewer. Note that the server still diff --git a/rfb/rfbproto.h b/rfb/rfbproto.h index 354f1aa..d5e5291 100644 --- a/rfb/rfbproto.h +++ b/rfb/rfbproto.h @@ -1066,7 +1066,7 @@ typedef struct _rfbFileTransferMsg { #define rfbRErrorCmd 0xFFFFFFFF/* Error when a command fails on remote side (ret in "size" field) */ #define sz_rfbBlockSize 8192 /* Size of a File Transfer packet (before compression) */ -#define rfbZipDirectoryPrefix "!UVNCDIR-\0" /* Transfered directory are zipped in a file with this prefix. Must end with "-" */ +#define rfbZipDirectoryPrefix "!UVNCDIR-\0" /* Transferred directory are zipped in a file with this prefix. Must end with "-" */ #define sz_rfbZipDirectoryPrefix 9 #define rfbDirPrefix "[ " #define rfbDirSuffix " ]" -- cgit v1.2.1 From b71cc64e5865bd79bd446a0ef49694f415d8921f Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sat, 10 Oct 2015 12:12:38 +0200 Subject: Fix endianness detection Commit 97f442ef2aa65ade6bea11e90054c57b90abbaca tried to improve the endianness detection, but introduced a typo and problems for Windows builds (no endian.h, different definition of LIBVNCSERVER_WORDS_BIGENDIAN). Fix both issues. Signed-off-by: Stefan Weil --- rfb/rfbproto.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'rfb') diff --git a/rfb/rfbproto.h b/rfb/rfbproto.h index 354f1aa..6921d4a 100644 --- a/rfb/rfbproto.h +++ b/rfb/rfbproto.h @@ -80,11 +80,12 @@ #endif #endif +#if !defined(_WIN32) # include # if __BYTE_ORDER == __BIG_ENDIAN -# define LIBVBNCSERVER_WORDS_BIGENDIAN 1 +# define LIBVNCSERVER_WORDS_BIGENDIAN 1 # endif - +#endif /* !_WIN32 */ /* MS compilers don't have strncasecmp */ #ifdef _MSC_VER -- cgit v1.2.1 From 68d43fb62dc9ecca7b32719464d7424c91ba70d7 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sat, 10 Oct 2015 12:18:32 +0200 Subject: Fix definition of POSIX data types Commit 92f558482d94c5152174a1983a40863bd6b07911 added stdint.h to get the type definitions, but included it after the first use of int8_t in builds for Windows. Signed-off-by: Stefan Weil --- rfb/rfbproto.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'rfb') diff --git a/rfb/rfbproto.h b/rfb/rfbproto.h index 6921d4a..5061b6e 100644 --- a/rfb/rfbproto.h +++ b/rfb/rfbproto.h @@ -60,6 +60,7 @@ * messages have to be explained by comments. */ +#include #if defined(WIN32) && !defined(__MINGW32__) #define LIBVNCSERVER_WORDS_BIGENDIAN @@ -108,8 +109,6 @@ typedef int8_t rfbBool; #define TRUE -1 #endif -#include - typedef uint32_t rfbKeySym; typedef uint32_t rfbPixel; -- cgit v1.2.1 From 4665af4950023c194453fe7517dbe06ee811ea15 Mon Sep 17 00:00:00 2001 From: Christian Beier Date: Thu, 3 Dec 2015 19:20:02 +0100 Subject: Properly document HandleCursorShape and GotCursorShapeProc. --- rfb/rfbclient.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'rfb') diff --git a/rfb/rfbclient.h b/rfb/rfbclient.h index aedb4f4..0ae001a 100644 --- a/rfb/rfbclient.h +++ b/rfb/rfbclient.h @@ -173,7 +173,10 @@ typedef rfbCredential* (*GetCredentialProc)(struct _rfbClient* client, int crede typedef rfbBool (*MallocFrameBufferProc)(struct _rfbClient* client); typedef void (*GotXCutTextProc)(struct _rfbClient* client, const char *text, int textlen); typedef void (*BellProc)(struct _rfbClient* client); - +/** + Called when a cursor shape update was received from the server. The decoded cursor shape + will be in client->rcSource. +*/ typedef void (*GotCursorShapeProc)(struct _rfbClient* client, int xhot, int yhot, int width, int height, int bytesPerPixel); typedef void (*GotCopyRectProc)(struct _rfbClient* client, int src_x, int src_y, int w, int h, int dest_x, int dest_y); @@ -270,6 +273,7 @@ typedef struct _rfbClient { /* cursor.c */ + /** Holds cursor shape data when received from server. */ uint8_t *rcSource, *rcMask; /** private data pointer */ @@ -357,7 +361,12 @@ typedef struct _rfbClient { } rfbClient; /* cursor.c */ - +/** + * Handles XCursor and RichCursor shape updates from the server. + * We emulate cursor operating on the frame buffer (that is + * why we call it "software cursor"). This decodes the received cursor + * shape and hands it over to GotCursorShapeProc, if set. + */ extern rfbBool HandleCursorShape(rfbClient* client,int xhot, int yhot, int width, int height, uint32_t enc); /* listen.c */ -- cgit v1.2.1 From 9d4cb568b70443f9137108dd5eaad34523c3664d Mon Sep 17 00:00:00 2001 From: Christian Beier Date: Thu, 3 Dec 2015 20:02:02 +0100 Subject: Be a bit clearer with the cursorshape documentation for libvncclient. --- rfb/rfbclient.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'rfb') diff --git a/rfb/rfbclient.h b/rfb/rfbclient.h index 0ae001a..157461e 100644 --- a/rfb/rfbclient.h +++ b/rfb/rfbclient.h @@ -175,7 +175,10 @@ typedef void (*GotXCutTextProc)(struct _rfbClient* client, const char *text, int typedef void (*BellProc)(struct _rfbClient* client); /** Called when a cursor shape update was received from the server. The decoded cursor shape - will be in client->rcSource. + will be in client->rcSource. It's up to the application to do something with this, e.g. draw + into a viewer's window. If you want the server to draw the cursor into the framebuffer, be + careful not to announce remote cursor support, i.e. not include rfbEncodingXCursor or + rfbEncodingRichCursor in SetFormatAndEncodings(). */ typedef void (*GotCursorShapeProc)(struct _rfbClient* client, int xhot, int yhot, int width, int height, int bytesPerPixel); typedef void (*GotCopyRectProc)(struct _rfbClient* client, int src_x, int src_y, int w, int h, int dest_x, int dest_y); -- cgit v1.2.1 From 445fb7d53111757f584aad6ba9757d1c029e9f39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Georges?= Date: Sat, 5 Mar 2016 15:21:03 +0100 Subject: Append IPv6 option in CMake Project --- rfb/rfbconfig.h.cmake | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'rfb') diff --git a/rfb/rfbconfig.h.cmake b/rfb/rfbconfig.h.cmake index 3e3155b..5bd6569 100644 --- a/rfb/rfbconfig.h.cmake +++ b/rfb/rfbconfig.h.cmake @@ -54,6 +54,27 @@ /* Define to 1 if you have the header file. */ #cmakedefine LIBVNCSERVER_HAVE_UNISTD_H 1 +/* Define to 1 if you have the `vfork' function. */ +#cmakedefine LIBVNCSERVER_HAVE_VFORK 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine LIBVNCSERVER_HAVE_VFORK_H 1 + +/* Define to 1 if you have the `vprintf' function. */ +#cmakedefine LIBVNCSERVER_HAVE_VPRINTF 1 + +/* Define to 1 if `fork' works. */ +#cmakedefine LIBVNCSERVER_HAVE_WORKING_FORK 1 + +/* Define to 1 if `vfork' works. */ +#cmakedefine LIBVNCSERVER_HAVE_WORKING_VFORK 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine LIBVNCSERVER_HAVE_WS2TCPIP_H 1 + +/* Enable IPv6 support */ +#cmakedefine LIBVNCSERVER_IPv6 1 + /* Need a typedef for in_addr_t */ #cmakedefine LIBVNCSERVER_NEED_INADDR_T 1 -- cgit v1.2.1 From b6cb19982f17c6ed576116192a3fb18fb9d86e32 Mon Sep 17 00:00:00 2001 From: zbierak Date: Wed, 13 Apr 2016 20:49:05 +0200 Subject: Increase MAX_ENCODINGS value to accommodate more client encodings Resolves #112 --- rfb/rfbproto.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rfb') diff --git a/rfb/rfbproto.h b/rfb/rfbproto.h index 8e607e5..9cf6a0a 100644 --- a/rfb/rfbproto.h +++ b/rfb/rfbproto.h @@ -120,7 +120,7 @@ typedef uint32_t in_addr_t; #define INADDR_NONE ((in_addr_t) 0xffffffff) #endif -#define MAX_ENCODINGS 21 +#define MAX_ENCODINGS 64 /***************************************************************************** * -- cgit v1.2.1 From 53cc1fa18a3b96d2c31a145d971017564fca39bb Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 18 Feb 2016 08:29:07 -0600 Subject: use namespaced rfbMax macro (issue #102) Not using generic 'max', avoids conflicts with stl_algobase.h --- rfb/rfbproto.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rfb') diff --git a/rfb/rfbproto.h b/rfb/rfbproto.h index 8e607e5..bb6bfa5 100644 --- a/rfb/rfbproto.h +++ b/rfb/rfbproto.h @@ -93,8 +93,8 @@ #define strncasecmp _strnicmp #endif +#define rfbMax(a,b) (((a)>(b))?(a):(b)) #if !defined(WIN32) || defined(__MINGW32__) -#define max(a,b) (((a)>(b))?(a):(b)) #ifdef LIBVNCSERVER_HAVE_SYS_TIME_H #include #endif -- cgit v1.2.1 From 1da7872784a78446284b4e8ef71691458296026c Mon Sep 17 00:00:00 2001 From: gbdj Date: Sat, 23 Apr 2016 14:42:49 +0400 Subject: libvncclient/tls_gnutls.c: Add hooks to WriteToTLS() for optional protection by mutex. Fix upstream issue #100 Squashed commit of the pull request #101 : commit 1c7e01e81862bc46508e675e83c74cc6d63224b0 commit 1e749b094d6696380d3f0540a00138d7e3427874 --- rfb/rfbclient.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'rfb') diff --git a/rfb/rfbclient.h b/rfb/rfbclient.h index 157461e..c18eaf9 100644 --- a/rfb/rfbclient.h +++ b/rfb/rfbclient.h @@ -182,6 +182,8 @@ typedef void (*BellProc)(struct _rfbClient* client); */ typedef void (*GotCursorShapeProc)(struct _rfbClient* client, int xhot, int yhot, int width, int height, int bytesPerPixel); typedef void (*GotCopyRectProc)(struct _rfbClient* client, int src_x, int src_y, int w, int h, int dest_x, int dest_y); +typedef rfbBool (*LockWriteToTLSProc)(struct _rfbClient* client); +typedef rfbBool (*UnlockWriteToTLSProc)(struct _rfbClient* client); typedef struct _rfbClient { uint8_t* frameBuffer; @@ -361,6 +363,10 @@ typedef struct _rfbClient { /* Output Window ID. When set, client application enables libvncclient to perform direct rendering in its window */ unsigned long outputWindow; + /** Hooks for optional protection WriteToTLS() by mutex */ + LockWriteToTLSProc LockWriteToTLS; + UnlockWriteToTLSProc UnlockWriteToTLS; + } rfbClient; /* cursor.c */ -- cgit v1.2.1 From cada820645c0d3293cf51d73aa80695f14793cc2 Mon Sep 17 00:00:00 2001 From: Christian Beier Date: Mon, 30 May 2016 15:02:33 +0200 Subject: Only include endian.h if present on system. --- rfb/rfbproto.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rfb') diff --git a/rfb/rfbproto.h b/rfb/rfbproto.h index 9eca868..ba643b1 100644 --- a/rfb/rfbproto.h +++ b/rfb/rfbproto.h @@ -81,12 +81,12 @@ #endif #endif -#if !defined(_WIN32) +#if LIBVNCSERVER_HAVE_ENDIAN_H # include # if __BYTE_ORDER == __BIG_ENDIAN # define LIBVNCSERVER_WORDS_BIGENDIAN 1 # endif -#endif /* !_WIN32 */ +#endif /* MS compilers don't have strncasecmp */ #ifdef _MSC_VER -- cgit v1.2.1 From c4721ae4934f5cbadcfaf7e304a200ae4d7166b2 Mon Sep 17 00:00:00 2001 From: Christian Beier Date: Sun, 5 Jun 2016 18:22:12 +0200 Subject: Fix rfbClientSwap64IfLE broken in fe7df89fb1777b4fd303d5a601541f6062caf8ea --- rfb/rfbclient.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rfb') diff --git a/rfb/rfbclient.h b/rfb/rfbclient.h index 37c47e4..4f6f4f4 100644 --- a/rfb/rfbclient.h +++ b/rfb/rfbclient.h @@ -53,7 +53,7 @@ (((l) & 0x000000ff) << 24)) : (l)) #define rfbClientSwap64IfLE(l) \ - (*(char *)&client->endianTest ? ((((l) >> 56 ) & 0xff00000000000000ULL) | \ + (*(char *)&client->endianTest ? ((((l) >> 56 ) & 0x00000000000000ffULL) | \ (((l) & 0x00ff000000000000ULL) >> 40) | \ (((l) & 0x0000ff0000000000ULL) >> 24) | \ (((l) & 0x000000ff00000000ULL) >> 8) | \ -- cgit v1.2.1