Commit Graph

14 Commits

Author SHA1 Message Date
Guy Harris 773a8fa0e3 In EnterNotify and LeaveNotify events, the last byte isn't a Boolean,
it's a bitmask with "focus" and "same-screen" bits.

svn path=/trunk/; revision=10624
2004-04-17 03:38:09 +00:00
Guy Harris 5abaa32d32 "keys" is a LISTofCARD8, so it should have type BYTES, not UINT8.
svn path=/trunk/; revision=10454
2004-03-23 07:40:23 +00:00
Laurent Deniel cc598d0484 * X11 dissector:
- in decoding of replies: 0 is not an unknown opcode, it means that the
  request was unseen or that the opcode of the request is unknown
  (e.g. due to unseen / undecoded QueryExtension replies)

- add special processing for QueryExtension requests & replies in order to
  store new opcodes in a value_string of opcodes saved per conversation

- try to resynchronize sequence number once at first reply if no initial
  connection request was seen

- add decoding of SendEvent request

- add decoding of many replies (AllocColor, GetInputFocus, GetGeometry,
  GetPointerControl, GetScreenSaver, GetSelectionOwner, GrabKeyboard,
  GrabPointer, InternAtom, ListProperties, LookupColor, QueryBestSize,
  QueryKeymap, QueryPointer, TranslateCoordinates)

- fix decoding of EnterNotify / LeaveNotify events

- add decoding of most events (FocusIn, FocusOut, Expose, GraphicsExpose,
  NoExpose, VisibilityNotify, CreateNotify, DestroyNotify, UnmapNotify,
  MapNotify, MapRequest, ReparentNotify, ConfigureNotify, GravityNotify,
  ResizeRequest, CirculateNotify, CirculateRequest, PropertyNotify,
  SelectionClear, SelectionRequest, SelectionNotify, ColormapNotify,
  ClientMessage)

- miscellaneous changes & code cleaning

svn path=/trunk/; revision=10442
2004-03-22 22:53:56 +00:00
Guy Harris a66e877459 Move "XConvertCase()" from a header file to "packet-x11.c".
Handle the failure reply from the initial connection request.

"proto_item_append_text()" accepts "printf"-like formats; we don't need
to generate a string with a formatting routine and hand it to
"proto_item_append_text()", so don't do so.

When doing reassembly, the length that should be checked is the length
remaining in the tvbuff, not the length remaining in the packet, and
that length should be fetched with "tvb_ensure_length_remaining()" so
that if we *do* go past the end of the tvbuff we throw the appropriate
exception.

To determine whether a reply is a reply to the initial connection, check
the connection state and "initial connection reply" frame - don't check
the first byte of the message unless we've determined that the message
isn't an initial connection reply (the first byte of the initial
connection reply is the success/failure flag, so it could be 0 or 1).

Display window IDs in hex in replies, as we do in requests.

Fix the masks for Button3, Button4, and Button5 (it's a bitset, not a
button number - more than one mouse button can be down in an event,
although it can be a pain to try to click more than one button at the
same time).

svn path=/trunk/; revision=9544
2004-01-04 10:57:18 +00:00
Olivier Biot a551259fc2 From Michael Shuldman:
Add support for parsing some X11 replies and events (and
the framework for handling X11 errors it looks like) to the
existing X11 code, which parses X11 requests.

It parses what is the most difficult part of the replies/events,
they Keycode stuff by parsing the Keyboardmapping replies and etc,
and then KeyPress, KeyRelease events and some related stuff (used
for a specific project).

Adding support for parsing the rest of the event/replies should not
be difficult, I think it will mostly consist of going through every
event/reply and add the missing calls for each dataitem i.e.  register
the data, the remaining the eventcodes/replies are pretty
straightforward if I remember correctly.

All events and replies are reported, it's the "detailed" (-V option)
that's missing for most.

The replies, events and errors are listed in the Info column,
and are summarized in the protocol summary line.

Bogus if (tree) { } constructs have also been fixed.

List over other misc. stuff added:
 - handle multiple outstanding requests.
 - add AllocNamedColor to list of requests expecting a reply.
 - body for parsing error replies.
 - each packet can be sent to us multiple times, try to handle that.
 - change request_length display to be what the client actually sends
   for x11_request, not what it means (don't multiply by four).
 - add some more opcodes expecting a reply (gone through all listed
   in the ref. now, so should be complete).
 - use hashtable and sequencenumber for matching reply to request.

svn path=/trunk/; revision=9520
2004-01-02 12:52:45 +00:00
Guy Harris eb36afb16c X11 arcs don't have a mode - the mode is in the graphics context.
svn path=/trunk/; revision=8000
2003-07-09 05:23:50 +00:00
Guy Harris 5e41d78732 bit-plane is a bitmask; display it in hex.
svn path=/trunk/; revision=7056
2003-01-31 05:15:23 +00:00
Guy Harris ab552d3746 Get rid of BASE_BIN - it's just the same as BASE_DEC, but people seemed
to be using it for stuff that should be hex, and for stuff that should
be Boolean.  Use BASE_DEC if it should be decimal, BASE_HEX if it should
be hex, and make it Boolean if it should be Boolean.

svn path=/trunk/; revision=7053
2003-01-31 03:17:56 +00:00
Guy Harris e78141670a In a ChangeHosts request, display 4-byte Internet addresses as IPv4
addresses.

When showing a list of keysyms, build the text representation of the
item for the list by appending keysyms to the text of the item as
dissected; this fixes a bug in the display of those keysums, and means
that we don't build a text string with the keysyms if we're not
generating the text representation.

svn path=/trunk/; revision=5179
2002-04-17 08:33:09 +00:00
Guy Harris 85a67ed6d5 Add support for desegmentation of X11 messages.
Try to check whether the first request we see is an initial connection
request, and dissect it as such if so.

Get rid of the global "next_offset" variable.

Check for buffer overflows when building the summary item for a list
of keysyms.

Display BASE_DEC items in decimal, not hex.

svn path=/trunk/; revision=5173
2002-04-16 09:42:31 +00:00
Guy Harris 3ccdaf841f Add support for comments in "process-x11-fields.pl", and add a copyright
notice/RCS ID/credit to Christophe to "x11-fields" as a comment.

svn path=/trunk/; revision=3358
2001-04-21 08:04:43 +00:00
Guy Harris 87898cd6b8 Make the fields that correspond to drawable IDs, masks, and the like
display as hex rather than decimal.

svn path=/trunk/; revision=3343
2001-04-20 06:28:34 +00:00
Guy Harris 1d6263e265 Fix up "process-x11-fields" to allow both a base *and* VALS to be
specified - with or without a name for the list of values - and to roll
up *all* the tokens at the end into the blurb for the field.

Supply a base in "x11-fields" for all numeric fields, and supply a base
of NONE rather than a parent-field width for Boolean fields that aren't
bitfields.

svn path=/trunk/; revision=3342
2001-04-20 06:01:10 +00:00
Guy Harris 986bd7f261 Check in the file used to define fields for the X11 dissector, and the
Perl script that generates them, so that if we have to change those
fields we can do so more conveniently.

Remove the generated header files from CVS, and arrange that we generate
them when we do a build.

svn path=/trunk/; revision=3341
2001-04-20 04:16:19 +00:00