2 * Routines for synergy dissection
3 * Copyright 2005, Vasanth Manickam <vasanthm@gmail.com>
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
36 #include <epan/packet.h>
38 void proto_reg_handoff_synergy(void);
41 static int proto_synergy = -1;
43 static int hf_synergy_unknown = -1;
44 static int hf_synergy_handshake = -1;
45 static int hf_synergy_handshake_majorversion = -1;
46 static int hf_synergy_handshake_minorversion = -1;
47 static int hf_synergy_handshake_clientname = -1;
49 static int hf_synergy_cnop = -1;
51 static int hf_synergy_calv = -1;
53 static int hf_synergy_cbye = -1;
55 static int hf_synergy_cinn = -1;
56 static int hf_synergy_cinn_x = -1;
57 static int hf_synergy_cinn_y = -1;
58 static int hf_synergy_cinn_sequence = -1;
59 static int hf_synergy_cinn_modifiermask = -1;
61 static int hf_synergy_cout = -1;
63 static int hf_synergy_cclp = -1;
64 static int hf_synergy_cclp_clipboardidentifier = -1;
65 static int hf_synergy_cclp_sequencenumber = -1;
67 static int hf_synergy_csec = -1;
69 static int hf_synergy_crop = -1;
71 static int hf_synergy_ciak = -1;
73 static int hf_synergy_dkdn = -1;
74 static int hf_synergy_dkdn_keyid = -1;
75 static int hf_synergy_dkdn_keymodifiermask = -1;
76 static int hf_synergy_dkdn_keybutton = -1;
78 static int hf_synergy_dkrp = -1;
79 static int hf_synergy_dkrp_keyid = -1;
80 static int hf_synergy_dkrp_keymodifiermask = -1;
81 static int hf_synergy_dkrp_numberofrepeats = -1;
82 static int hf_synergy_dkrp_keybutton = -1;
84 static int hf_synergy_dkup = -1;
85 static int hf_synergy_dkup_keyid = -1;
86 static int hf_synergy_dkup_keymodifiermask = -1;
87 static int hf_synergy_dkup_keybutton = -1;
89 static int hf_synergy_dmdn = -1;
90 static int hf_synergy_dmup = -1;
92 static int hf_synergy_dmmv = -1;
93 static int hf_synergy_dmmv_x = -1;
94 static int hf_synergy_dmmv_y = -1;
96 static int hf_synergy_dmrm = -1;
97 static int hf_synergy_dmrm_x = -1;
98 static int hf_synergy_dmrm_y = -1;
100 static int hf_synergy_dmwm = -1;
102 static int hf_synergy_dclp = -1;
103 static int hf_synergy_dclp_clipboardidentifier = -1;
104 static int hf_synergy_dclp_sequencenumber = -1;
105 static int hf_synergy_dclp_clipboarddata = -1;
107 static int hf_synergy_dinf = -1;
108 static int hf_synergy_dinf_clp = -1;
109 static int hf_synergy_dinf_ctp= -1;
110 static int hf_synergy_dinf_wsp = -1;
111 static int hf_synergy_dinf_hsp = -1;
112 static int hf_synergy_dinf_swz = -1;
113 static int hf_synergy_dinf_x = -1;
114 static int hf_synergy_dinf_y = -1;
116 static int hf_synergy_dsop = -1;
118 static int hf_synergy_qinf = -1;
120 static int hf_synergy_eicv = -1;
121 static int hf_synergy_eicv_majorversion = -1;
122 static int hf_synergy_eicv_minorversion = -1;
124 static int hf_synergy_ebsy = -1;
126 static int hf_synergy_eunk = -1;
128 static int hf_synergy_ebad = -1;
130 /* Initialize the subtree pointers */
131 static gint ett_synergy = -1;
133 static void dissect_synergy_handshake(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,gint offset);
134 static void dissect_synergy_cinn(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,gint offset);
135 static void dissect_synergy_cclp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,gint offset);
136 static void dissect_synergy_dkdn(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,gint offset);
137 static void dissect_synergy_dkrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,gint offset);
138 static void dissect_synergy_dkup(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,gint offset);
139 static void dissect_synergy_dmmv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,gint offset);
140 static void dissect_synergy_dmrm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,gint offset);
141 static void dissect_synergy_dclp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,gint offset);
142 static void dissect_synergy_dinf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,gint offset);
143 static void dissect_synergy_eicv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,gint offset);
146 /* Code to actually dissect the packets */
148 dissect_synergy(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
151 col_set_str(pinfo->cinfo, COL_PROTOCOL, "synergy");
156 proto_item *ti = NULL;
157 proto_tree *synergy_tree = NULL;
158 ti = proto_tree_add_protocol_format(tree, proto_synergy, tvb, 0, -1,"Synergy Protocol");
159 synergy_tree = proto_item_add_subtree(ti, ett_synergy);
161 tvb_get_nstringz(tvb,offset+4,20,(guint8*)buffer);
163 if(strncmp(buffer,"Synergy",7)==0)
164 dissect_synergy_handshake(tvb,pinfo,synergy_tree,offset+4);
165 else if(strncmp(buffer,"CNOP",4)==0)
166 proto_tree_add_item(synergy_tree,hf_synergy_cnop,tvb,offset+4,-1,FALSE);
167 else if(strncmp(buffer,"CALV",4)==0)
168 proto_tree_add_item(synergy_tree,hf_synergy_calv,tvb,offset+4,-1,FALSE);
169 else if(strncmp(buffer,"CBYE",4)==0)
170 proto_tree_add_item(synergy_tree,hf_synergy_cbye,tvb,offset+4,-1,FALSE);
171 else if(strncmp(buffer,"CINN",4)==0)
172 dissect_synergy_cinn(tvb,pinfo,synergy_tree,offset+4);
173 else if(strncmp(buffer,"COUT",4)==0)
174 proto_tree_add_item(synergy_tree,hf_synergy_cout,tvb,offset+4,-1,FALSE);
175 else if(strncmp(buffer,"CCLP",4)==0)
176 dissect_synergy_cclp(tvb,pinfo,synergy_tree,offset+4);
177 else if(strncmp(buffer,"CSEC",4)==0)
178 proto_tree_add_item(synergy_tree,hf_synergy_csec,tvb,offset+4,1,FALSE);
179 else if(strncmp(buffer,"CROP",4)==0)
180 proto_tree_add_item(synergy_tree,hf_synergy_crop,tvb,offset+4,-1,FALSE);
181 else if(strncmp(buffer,"CIAK",4)==0)
182 proto_tree_add_item(synergy_tree,hf_synergy_ciak,tvb,offset+4,-1,FALSE);
183 else if(strncmp(buffer,"DKDN",4)==0)
184 dissect_synergy_dkdn(tvb,pinfo,synergy_tree,offset+4);
185 else if(strncmp(buffer,"DKRP",4)==0)
186 dissect_synergy_dkrp(tvb,pinfo,synergy_tree,offset+4);
187 else if(strncmp(buffer,"DKUP",4)==0)
188 dissect_synergy_dkup(tvb,pinfo,synergy_tree,offset+4);
189 else if(strncmp(buffer,"DMDN",4)==0)
190 proto_tree_add_item(synergy_tree,hf_synergy_dmdn,tvb,offset+4,1,FALSE);
191 else if(strncmp(buffer,"DMUP",4)==0)
192 proto_tree_add_item(synergy_tree,hf_synergy_dmup,tvb,offset+4,1,FALSE);
193 else if(strncmp(buffer,"DMMV",4)==0)
194 dissect_synergy_dmmv(tvb,pinfo,synergy_tree,offset+4);
195 else if(strncmp(buffer,"DMRM",4)==0)
196 dissect_synergy_dmrm(tvb,pinfo,synergy_tree,offset+4);
197 else if(strncmp(buffer,"DMWM",4)==0)
198 proto_tree_add_item(synergy_tree,hf_synergy_dmwm,tvb,offset+4,2,FALSE);
199 else if(strncmp(buffer,"DCLP",4)==0)
200 dissect_synergy_dclp(tvb,pinfo,synergy_tree,offset+4);
201 else if(strncmp(buffer,"DINF",4)==0)
202 dissect_synergy_dinf(tvb,pinfo,synergy_tree,offset+4);
203 else if(strncmp(buffer,"DSOP",4)==0)
204 proto_tree_add_item(synergy_tree,hf_synergy_dsop,tvb,offset+4,4,FALSE);
205 else if(strncmp(buffer,"QINF",4)==0)
206 proto_tree_add_item(synergy_tree,hf_synergy_qinf,tvb,offset+4,-1,FALSE);
207 else if(strncmp(buffer,"EICV",4)==0)
208 dissect_synergy_eicv(tvb,pinfo,synergy_tree,offset+4);
209 else if(strncmp(buffer,"EBSY",4)==0)
210 proto_tree_add_item(synergy_tree,hf_synergy_ebsy,tvb,offset+4,-1,FALSE);
211 else if(strncmp(buffer,"EUNK",4)==0)
212 proto_tree_add_item(synergy_tree,hf_synergy_eunk,tvb,offset+4,-1,FALSE);
213 else if(strncmp(buffer,"EBAD",4)==0)
214 proto_tree_add_item(synergy_tree,hf_synergy_ebad,tvb,offset+4,-1,FALSE);
216 proto_tree_add_item(synergy_tree,hf_synergy_unknown,tvb,offset+4,-1,FALSE);
220 static void dissect_synergy_handshake( tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, gint offset )
222 proto_item *ti = NULL;
223 proto_tree *sub_tree = NULL;
224 ti = proto_tree_add_item(tree, hf_synergy_handshake, tvb, offset, -1, FALSE);
225 sub_tree = proto_item_add_subtree(ti, ett_synergy);
227 proto_tree_add_item(sub_tree, hf_synergy_handshake_majorversion, tvb, offset + 7, 2, FALSE);
228 proto_tree_add_item(sub_tree, hf_synergy_handshake_minorversion, tvb, offset + 9, 2, FALSE);
230 if (tvb_length_remaining(tvb, offset + 11) != 0)
232 proto_tree_add_item(sub_tree, hf_synergy_unknown, tvb, offset + 11, 4, FALSE);
233 proto_tree_add_item(sub_tree, hf_synergy_handshake_clientname, tvb, offset + 15, -1, FALSE);
237 static void dissect_synergy_cinn( tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, gint offset )
239 proto_item *ti = NULL;
240 proto_tree *sub_tree = NULL;
241 ti = proto_tree_add_item(tree, hf_synergy_cinn, tvb, offset, -1, FALSE);
242 sub_tree = proto_item_add_subtree(ti, ett_synergy);
244 proto_tree_add_item(sub_tree, hf_synergy_cinn_x, tvb, offset + 4, 2, FALSE);
245 proto_tree_add_item(sub_tree, hf_synergy_cinn_y, tvb, offset + 6, 2, FALSE);
246 proto_tree_add_item(sub_tree, hf_synergy_cinn_sequence, tvb, offset + 8, 4, FALSE);
247 proto_tree_add_item(sub_tree, hf_synergy_cinn_modifiermask, tvb, offset + 12, 2, FALSE);
250 static void dissect_synergy_cclp( tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, gint offset )
252 proto_item *ti = NULL;
253 proto_tree *sub_tree = NULL;
254 ti = proto_tree_add_item(tree, hf_synergy_cclp, tvb, offset, -1, FALSE);
255 sub_tree = proto_item_add_subtree(ti, ett_synergy);
257 proto_tree_add_item(sub_tree, hf_synergy_cclp_clipboardidentifier, tvb, offset + 4, 1, FALSE);
258 proto_tree_add_item(sub_tree, hf_synergy_cclp_sequencenumber, tvb, offset + 5, 4, FALSE);
261 static void dissect_synergy_dkdn( tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, gint offset )
263 proto_item *ti = NULL;
264 proto_tree *sub_tree = NULL;
265 ti = proto_tree_add_item(tree, hf_synergy_dkdn, tvb, offset, -1, FALSE);
266 sub_tree = proto_item_add_subtree(ti, ett_synergy);
268 proto_tree_add_item(sub_tree, hf_synergy_dkdn_keyid, tvb, offset + 4, 2, FALSE);
269 proto_tree_add_item(sub_tree, hf_synergy_dkdn_keymodifiermask, tvb, offset + 6, 2, FALSE);
271 if (tvb_length_remaining(tvb, offset + 8) != 0)
272 proto_tree_add_item(sub_tree, hf_synergy_dkdn_keybutton, tvb, offset + 8, 2, FALSE);
275 static void dissect_synergy_dkrp( tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, gint offset )
277 proto_item *ti = NULL;
278 proto_tree *sub_tree = NULL;
279 ti = proto_tree_add_item(tree, hf_synergy_dkrp, tvb, offset, -1, FALSE);
280 sub_tree = proto_item_add_subtree(ti, ett_synergy);
282 proto_tree_add_item(sub_tree, hf_synergy_dkrp_keyid, tvb, offset + 4, 2, FALSE);
283 proto_tree_add_item(sub_tree, hf_synergy_dkrp_keymodifiermask, tvb, offset + 6, 2, FALSE);
284 proto_tree_add_item(sub_tree, hf_synergy_dkrp_numberofrepeats, tvb, offset + 8, 2, FALSE);
286 if (tvb_length_remaining(tvb, offset + 10) != 0)
287 proto_tree_add_item(sub_tree, hf_synergy_dkrp_keybutton, tvb, offset + 10, 2, FALSE);
290 static void dissect_synergy_dkup( tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, gint offset )
292 proto_item *ti = NULL;
293 proto_tree *sub_tree = NULL;
294 ti = proto_tree_add_item(tree, hf_synergy_dkup, tvb, offset, -1, FALSE);
295 sub_tree = proto_item_add_subtree(ti, ett_synergy);
297 proto_tree_add_item(sub_tree, hf_synergy_dkup_keyid, tvb, offset + 4, 2, FALSE);
298 proto_tree_add_item(sub_tree, hf_synergy_dkup_keymodifiermask, tvb, offset + 6, 2, FALSE);
300 if (tvb_length_remaining(tvb, offset + 8) != 0)
301 proto_tree_add_item(sub_tree, hf_synergy_dkup_keybutton, tvb, offset + 8, 2, FALSE);
304 static void dissect_synergy_dmmv( tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, gint offset )
306 proto_item *ti = NULL;
307 proto_tree *sub_tree = NULL;
308 ti = proto_tree_add_item(tree, hf_synergy_dmmv, tvb, offset, -1, FALSE);
309 sub_tree = proto_item_add_subtree(ti, ett_synergy);
311 proto_tree_add_item(sub_tree, hf_synergy_dmmv_x, tvb, offset + 4, 2, FALSE);
312 proto_tree_add_item(sub_tree, hf_synergy_dmmv_y, tvb, offset + 6, 2, FALSE);
315 static void dissect_synergy_dmrm( tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, gint offset )
317 proto_item *ti = NULL;
318 proto_tree *sub_tree = NULL;
319 ti = proto_tree_add_item(tree, hf_synergy_dmrm, tvb, offset, -1, FALSE);
320 sub_tree = proto_item_add_subtree(ti, ett_synergy);
322 proto_tree_add_item(sub_tree, hf_synergy_dmrm_x, tvb, offset + 4, 2, FALSE);
323 proto_tree_add_item(sub_tree, hf_synergy_dmrm_y, tvb, offset + 6, 2, FALSE);
326 static void dissect_synergy_dclp( tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, gint offset )
328 proto_item *ti = NULL;
329 proto_tree *sub_tree = NULL;
330 ti = proto_tree_add_item(tree, hf_synergy_dclp, tvb, offset, -1, FALSE);
331 sub_tree = proto_item_add_subtree(ti, ett_synergy);
333 proto_tree_add_item(sub_tree, hf_synergy_dclp_clipboardidentifier, tvb, offset + 4, 1, FALSE);
334 proto_tree_add_item(sub_tree, hf_synergy_dclp_sequencenumber, tvb, offset + 5, 4, FALSE);
335 proto_tree_add_item(sub_tree, hf_synergy_dclp_clipboarddata, tvb, offset + 9, -1, FALSE);
338 static void dissect_synergy_dinf( tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, gint offset )
340 proto_item *ti = NULL;
341 proto_tree *sub_tree = NULL;
342 ti = proto_tree_add_item(tree, hf_synergy_dinf, tvb, offset, -1, FALSE);
343 sub_tree = proto_item_add_subtree(ti, ett_synergy);
345 proto_tree_add_item(sub_tree, hf_synergy_dinf_clp, tvb, offset + 4, 2, FALSE);
346 proto_tree_add_item(sub_tree, hf_synergy_dinf_ctp, tvb, offset + 6, 2, FALSE);
347 proto_tree_add_item(sub_tree, hf_synergy_dinf_wsp, tvb, offset + 8, 2, FALSE);
348 proto_tree_add_item(sub_tree, hf_synergy_dinf_hsp, tvb, offset + 10, 2, FALSE);
349 proto_tree_add_item(sub_tree, hf_synergy_dinf_swz, tvb, offset + 12, 2, FALSE);
350 proto_tree_add_item(sub_tree, hf_synergy_dinf_x, tvb, offset + 14, 2, FALSE);
351 proto_tree_add_item(sub_tree, hf_synergy_dinf_y, tvb, offset + 16, 2, FALSE);
354 static void dissect_synergy_eicv( tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, gint offset )
356 proto_item *ti = NULL;
357 proto_tree *sub_tree = NULL;
358 ti = proto_tree_add_item(tree, hf_synergy_eicv, tvb, offset, -1, FALSE);
359 sub_tree = proto_item_add_subtree(ti, ett_synergy);
361 proto_tree_add_item(sub_tree, hf_synergy_eicv_majorversion, tvb, offset + 4, 2, FALSE);
362 proto_tree_add_item(sub_tree, hf_synergy_eicv_minorversion, tvb, offset + 6, 2, FALSE);
367 proto_register_synergy(void)
369 static hf_register_info hf[] = {
371 { &hf_synergy_unknown,
372 { "unknown","synergy.unknown",FT_NONE, BASE_NONE, NULL, 0x0,NULL, HFILL }
374 { &hf_synergy_handshake,
375 { "Handshake","synergy.handshake",FT_NONE, BASE_NONE, NULL, 0x0,NULL, HFILL }
377 { &hf_synergy_handshake_majorversion,
378 { "Major Version","synergy.handshake.majorversion",FT_UINT16, BASE_DEC, NULL, 0x0,NULL, HFILL }
380 { &hf_synergy_handshake_minorversion,
381 { "Minor Version","synergy.handshake.minorversion",FT_UINT16, BASE_DEC, NULL, 0x0,NULL, HFILL }
383 { &hf_synergy_handshake_clientname,
384 { "Client Name","synergy.handshake.client",FT_STRING, BASE_NONE, NULL, 0x0,NULL, HFILL }
387 { "Keep Alive","synergy.calv",FT_NONE, BASE_NONE, NULL, 0x0,NULL, HFILL }
390 { "No Operation","synergy.cnop",FT_NONE, BASE_NONE, NULL, 0x0,NULL, HFILL }
393 { "Close Connection","synergy.cbye",FT_NONE, BASE_NONE, NULL, 0x0,NULL, HFILL }
396 { "Enter Screen","synergy.cinn",FT_NONE, BASE_NONE, NULL, 0x0,NULL, HFILL }
398 { &hf_synergy_cinn_x,
399 { "Screen X","synergy.cinn.x",FT_UINT16, BASE_DEC, NULL, 0x0,NULL, HFILL }
401 { &hf_synergy_cinn_y,
402 { "Screen Y","synergy.cinn.y",FT_UINT16, BASE_DEC, NULL, 0x0,NULL, HFILL }
404 { &hf_synergy_cinn_sequence,
405 { "Sequence Number","synergy.cinn.sequence",FT_UINT32, BASE_DEC, NULL, 0x0,NULL, HFILL }
407 { &hf_synergy_cinn_modifiermask,
408 { "Modifier Key Mask","synergy.cinn.mask",FT_UINT16, BASE_DEC, NULL, 0x0,NULL, HFILL }
411 { "Leave Screen","synergy.cout",FT_NONE, BASE_NONE, NULL, 0x0,NULL, HFILL }
414 { "Grab Clipboard","synergy.clipboard",FT_NONE, BASE_NONE, NULL, 0x0,NULL, HFILL }
416 { &hf_synergy_cclp_clipboardidentifier,
417 { "Identifier","synergy.clipboard.identifier",FT_UINT8, BASE_DEC, NULL, 0x0,NULL, HFILL }
419 { &hf_synergy_cclp_sequencenumber,
420 { "Sequence Number","synergy.clipboard.sequence",FT_UINT32, BASE_DEC, NULL, 0x0,NULL, HFILL }
423 { "Screen Saver Change","synergy.screensaver",FT_BOOLEAN, BASE_NONE, NULL, 0x0,NULL, HFILL }
426 { "Reset Options","synergy.resetoptions",FT_NONE, BASE_NONE, NULL, 0x0,NULL, HFILL }
429 { "resolution change acknowledgment","synergy.ack",FT_NONE, BASE_NONE, NULL, 0x0,NULL, HFILL }
432 { "Key Pressed","synergy.keypressed",FT_NONE, BASE_NONE, NULL, 0x0,NULL, HFILL }
434 { &hf_synergy_dkdn_keyid,
435 { "Key Id","synergy.keypressed.keyid",FT_UINT16, BASE_DEC, NULL, 0x0,NULL, HFILL }
437 { &hf_synergy_dkdn_keymodifiermask,
438 { "Key Modifier Mask","synergy.keypressed.mask",FT_UINT16, BASE_DEC, NULL, 0x0,NULL, HFILL }
440 { &hf_synergy_dkdn_keybutton,
441 { "Key Button","synergy.keypressed.key",FT_UINT16, BASE_DEC, NULL, 0x0,NULL, HFILL }
444 { "key auto-repeat","synergy.keyautorepeat",FT_NONE, BASE_NONE, NULL, 0x0,NULL, HFILL }
446 { &hf_synergy_dkrp_keyid,
447 { "Key ID","synergy.keyautorepeat.keyid",FT_UINT16, BASE_DEC, NULL, 0x0,NULL, HFILL }
449 { &hf_synergy_dkrp_keymodifiermask,
450 { "Key modifier Mask","synergy.keyautorepeat.mask",FT_UINT16, BASE_DEC, NULL, 0x0,NULL, HFILL }
452 { &hf_synergy_dkrp_numberofrepeats,
453 { "Number of Repeats","synergy.keyautorepeat.repeat",FT_UINT16, BASE_DEC, NULL, 0x0,NULL, HFILL }
455 { &hf_synergy_dkrp_keybutton,
456 { "Key Button","synergy.keyautorepeat.key",FT_UINT16, BASE_DEC, NULL, 0x0,NULL, HFILL }
459 { "key released","synergy.keyreleased",FT_NONE, BASE_NONE, NULL, 0x0,NULL, HFILL }
461 { &hf_synergy_dkup_keyid,
462 { "Key Id","synergy.keyreleased.keyid",FT_UINT16, BASE_DEC, NULL, 0x0,NULL, HFILL }
464 { &hf_synergy_dkup_keymodifiermask,
465 { "Key Modifier Mask","synergykeyreleased.mask",FT_UINT16, BASE_DEC, NULL, 0x0,NULL, HFILL }
467 { &hf_synergy_dkup_keybutton,
468 { "Key Button","synergy.keyreleased.key",FT_UINT16, BASE_DEC, NULL, 0x0,NULL, HFILL }
471 { "Mouse Button Pressed","synergy.mousebuttonpressed",FT_UINT8, BASE_DEC, NULL, 0x0,NULL, HFILL }
474 { "Mouse Button Released","synergy.mousebuttonreleased",FT_UINT8, BASE_DEC, NULL, 0x0,NULL, HFILL }
477 { "Mouse Moved","synergy.mousemoved",FT_NONE, BASE_NONE, NULL, 0x0,NULL, HFILL }
479 { &hf_synergy_dmmv_x,
480 { "X Axis","synergy.mousemoved.x",FT_UINT16, BASE_DEC, NULL, 0x0,NULL, HFILL }
482 { &hf_synergy_dmmv_y,
483 { "Y Axis","synergy.mousemoved.y",FT_UINT16, BASE_DEC, NULL, 0x0,NULL, HFILL }
486 { "Relative Mouse Move","synergy.relativemousemove",FT_NONE, BASE_NONE, NULL, 0x0,NULL, HFILL }
488 { &hf_synergy_dmrm_x,
489 { "X Axis","synergy.relativemousemove.x",FT_UINT16, BASE_DEC, NULL, 0x0,NULL, HFILL }
491 { &hf_synergy_dmrm_y,
492 { "Y Axis","synergy.relativemousemove.y",FT_UINT16, BASE_DEC, NULL, 0x0,NULL, HFILL }
495 { "Mouse Button Pressed","synergy.mousebuttonpressed",FT_UINT16, BASE_DEC, NULL, 0x0,NULL, HFILL }
498 { "Clipboard Data","synergy.clipboarddata",FT_NONE, BASE_NONE, NULL, 0x0,NULL, HFILL }
500 { &hf_synergy_dclp_clipboardidentifier,
501 { "Clipboard Identifier","synergy.clipboarddata.identifier",FT_UINT8, BASE_DEC, NULL, 0x0,NULL, HFILL }
503 { &hf_synergy_dclp_sequencenumber,
504 { "Sequence Number","synergy.clipboarddata.sequence",FT_UINT32, BASE_DEC, NULL, 0x0,NULL, HFILL }
506 { &hf_synergy_dclp_clipboarddata,
507 { "Clipboard Data","synergy.clipboarddata.data",FT_STRING, BASE_NONE, NULL, 0x0,NULL, HFILL }
510 { "Client Data","synergy.clientdata",FT_NONE, BASE_NONE, NULL, 0x0,NULL, HFILL }
512 { &hf_synergy_dinf_clp,
513 { "coordinate of leftmost pixel on secondary screen","synergy.clps",FT_UINT16, BASE_DEC, NULL, 0x0,NULL, HFILL }
515 { &hf_synergy_dinf_ctp,
516 { "coordinate of topmost pixel on secondary screen","synergy.clps.ctp",FT_UINT16, BASE_DEC, NULL, 0x0,NULL, HFILL }
518 { &hf_synergy_dinf_wsp,
519 { "width of secondary screen in pixels","synergy.clps.wsp",FT_UINT16, BASE_DEC, NULL, 0x0,NULL, HFILL }
521 { &hf_synergy_dinf_hsp,
522 { "height of secondary screen in pixels","synergy.clps.hsp",FT_UINT16, BASE_DEC, NULL, 0x0,NULL, HFILL }
524 { &hf_synergy_dinf_swz,
525 { "size of warp zone","synergy.clps.swz",FT_UINT16, BASE_DEC, NULL, 0x0,NULL, HFILL }
527 { &hf_synergy_dinf_x,
528 { "x position of the mouse on the secondary screen","synergy.clps.x",FT_UINT16, BASE_DEC, NULL, 0x0,NULL, HFILL }
530 { &hf_synergy_dinf_y,
531 { "y position of the mouse on the secondary screen","synergy.clps.y",FT_UINT16, BASE_DEC, NULL, 0x0,NULL, HFILL }
534 { "Set Options","synergy.setoptions",FT_UINT32, BASE_DEC, NULL, 0x0,NULL, HFILL }
537 { "Query Screen Info","synergy.qinf",FT_NONE, BASE_NONE, NULL, 0x0,NULL, HFILL }
540 { "incompatible versions","synergy.eicv",FT_NONE, BASE_NONE, NULL, 0x0,NULL, HFILL }
542 { &hf_synergy_eicv_majorversion,
543 { "Major Version Number","synergy.eicv.major",FT_UINT16, BASE_DEC, NULL, 0x0,NULL, HFILL }
545 { &hf_synergy_eicv_minorversion,
546 { "Minor Version Number","synergy.eicv.minor",FT_UINT16, BASE_DEC, NULL, 0x0,NULL, HFILL }
549 { "Connection Already in Use","synergy.ebsy",FT_NONE, BASE_NONE, NULL, 0x0,NULL, HFILL }
552 { "Unknown Client","synergy.unknown",FT_NONE, BASE_NONE, NULL, 0x0,NULL, HFILL }
555 { "protocol violation","synergy.violation",FT_NONE, BASE_NONE, NULL, 0x0,NULL, HFILL }
560 /* Setup protocol subtree array */
561 static gint *ett[] = {
565 /* Register the protocol name and description */
566 proto_synergy = proto_register_protocol("Synergy",
567 "Synergy", "synergy");
569 /* Required function calls to register the header fields and subtrees used */
570 proto_register_field_array(proto_synergy, hf, array_length(hf));
571 proto_register_subtree_array(ett, array_length(ett));
572 register_dissector("synergy", dissect_synergy, proto_synergy);
580 proto_reg_handoff_synergy(void)
583 dissector_handle_t synergy_handle;
584 synergy_handle = find_dissector("synergy");
585 dissector_add("tcp.port",24800, synergy_handle);