qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Alexander Graf <agraf@suse.de>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH 1/7] Split VNC defines to vnc.h
Date: Thu, 29 Jan 2009 09:46:21 -0600	[thread overview]
Message-ID: <4981CF4D.1040202@codemonkey.ws> (raw)
In-Reply-To: <4981CB4A.9070303@suse.de>

Alexander Graf wrote:
> Anthony Liguori wrote:
>   
>> Alexander Graf wrote:
>>     
>>> The VNC protocol contains quite some constants, some of which are
>>> currently hardcoded in the vnc.c code. This is not exactly pretty.
>>>
>>> Let's move all those constants out to vnc.h, so they are clearly
>>> separated. While at it, I also included other defines that will be
>>> used later in this patch series.
>>>   
>>>       
>> A much needed change.
>>
>>     
>>> diff --git a/vnc.h b/vnc.h
>>> new file mode 100644
>>> index 0000000..ae69bc3
>>> --- /dev/null
>>> +++ b/vnc.h
>>> @@ -0,0 +1,130 @@
>>> +#ifndef __VNCTIGHT_H
>>> +#define __VNCTIGHT_H
>>> +
>>> +/*****************************************************************************
>>>
>>> + *
>>> + * Authentication modes
>>> + *
>>> +
>>> *****************************************************************************/
>>>
>>> +
>>> +enum {
>>> +    VNC_AUTH_INVALID = 0,
>>> +    VNC_AUTH_NONE = 1,
>>> +    VNC_AUTH_VNC = 2,
>>> +    VNC_AUTH_RA2 = 5,
>>> +    VNC_AUTH_RA2NE = 6,
>>> +    VNC_AUTH_TIGHT = 16,
>>> +    VNC_AUTH_ULTRA = 17,
>>> +    VNC_AUTH_TLS = 18,
>>> +    VNC_AUTH_VENCRYPT = 19
>>> +};
>>> +
>>> +#define VNC_AUTH_NONE_SIG "NOAUTH__"
>>> +#define VNC_AUTH_VNC_SIG  "VNCAUTH_"
>>>   
>>>       
>> These AUTH sigs are not part of the standard as far as I'm aware of
>> it.  This is the VNC_AUTH_TIGHT stuff?  I'd rather not do that.
>>     
>
> Right. That is the follow-up from AUTH_TIGHT. Tight uses signatures in
> general as addition to normal codes. The same thing applies to the
> encoding signatures. These are required for the "Hey client, I know
> these encodings" packet.
>
>   
>>> +
>>> +#define VNC_ENCODING_RAW                  0x00000000
>>> +#define VNC_ENCODING_COPYRECT             0x00000001
>>> +#define VNC_ENCODING_RRE                  0x00000002
>>> +#define VNC_ENCODING_CORRE                0x00000004
>>> +#define VNC_ENCODING_HEXTILE              0x00000005
>>> +#define VNC_ENCODING_ZLIB                 0x00000006
>>> +#define VNC_ENCODING_TIGHT                0x00000007
>>> +#define VNC_ENCODING_ZLIBHEX              0x00000008
>>>   
>>>       
>> This was never standardized.
>>     
>
> From rfbproto.h of current tightvnc:
>
> #define rfbEncodingRaw       0
> #define rfbEncodingCopyRect  1
> #define rfbEncodingRRE       2
> #define rfbEncodingCoRRE     4
> #define rfbEncodingHextile   5
> #define rfbEncodingZlib      6
> #define rfbEncodingTight     7
> #define rfbEncodingZlibHex   8
> #define rfbEncodingZRLE     16
> [...]
> #define rfbEncodingXCursor         0xFFFFFF10
> #define rfbEncodingRichCursor      0xFFFFFF11
> #define rfbEncodingPointerPos      0xFFFFFF18
>
> #define rfbEncodingLastRect        0xFFFFFF20
> #define rfbEncodingNewFBSize       0xFFFFFF21
>
> Where else should I look for defines? I'd rather have them here and if
> anything collide than not in any header files.
>   

http://www.realvnc.com/docs/rfbproto.pdf is where the protocol is 
defined.  Early in VNC's life, when TightVNC first fork()'d from 
RealVNC, there was no formal protocol definition.  This led to some 
incompatible implementations so if you want to maintain compatibility 
with the largest number of clients, it's best to stick to what's defined 
by the standard.

Regards,

Anthony Liguori

  reply	other threads:[~2009-01-29 15:46 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-29 11:24 [Qemu-devel] [PATCH 0/7] Add tight support to VNC Alexander Graf
2009-01-29 11:24 ` [Qemu-devel] [PATCH 1/7] Split VNC defines to vnc.h Alexander Graf
2009-01-29 11:24   ` [Qemu-devel] [PATCH 2/7] Use VNC protocol defines Alexander Graf
2009-01-29 11:24     ` [Qemu-devel] [PATCH 3/7] Fix invalid #if in vnc.c when debugging is enabled Alexander Graf
2009-01-29 11:24       ` [Qemu-devel] [PATCH 4/7] Make vnc buffer big-chunk aware Alexander Graf
2009-01-29 11:24         ` [Qemu-devel] [PATCH 5/7] Split vnc authentication code Alexander Graf
2009-01-29 11:24           ` [Qemu-devel] [PATCH 6/7] Add tight protocol awareness to vnc.c Alexander Graf
2009-01-29 11:24             ` [Qemu-devel] [PATCH 7/7] Add tight encoding (jpeg) " Alexander Graf
2009-01-29 15:17               ` [Qemu-devel] " Anthony Liguori
2009-01-29 15:23                 ` Stefano Stabellini
2009-01-29 15:47                   ` Anthony Liguori
2009-01-29 15:13             ` [Qemu-devel] Re: [PATCH 6/7] Add tight protocol awareness " Anthony Liguori
2009-01-29 15:24               ` Alexander Graf
2009-01-29 15:43                 ` Anthony Liguori
2009-01-29 15:11         ` [Qemu-devel] Re: [PATCH 4/7] Make vnc buffer big-chunk aware Anthony Liguori
2009-01-29 15:16           ` Alexander Graf
2009-01-29 15:22   ` [Qemu-devel] Re: [PATCH 1/7] Split VNC defines to vnc.h Anthony Liguori
2009-01-29 15:29     ` Alexander Graf
2009-01-29 15:46       ` Anthony Liguori [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-01-30 14:38 [Qemu-devel] [PATCH 0/7] Add zlib support to VNC server Alexander Graf
2009-01-30 14:38 ` [Qemu-devel] [PATCH 1/7] Split VNC defines to vnc.h Alexander Graf
2009-02-02 15:58   ` [Qemu-devel] " Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4981CF4D.1040202@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=agraf@suse.de \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).