2 * Routines for AR ar_drone protocol packet disassembly
3 * By Paul Hoisington <hoisingtonp@bit-sys.com>,
4 * Tom Hildesheim <hildesheimt@bit-sys.com>,
5 * and Claire Brantley <brantleyc@bit-sys.com>
6 * Copyright 2012 BIT Systems
8 * Wireshark - Network traffic analyzer
9 * By Gerald Combs <gerald@wireshark.org>
10 * Copyright 1998 Gerald Combs
12 * SPDX-License-Identifier: GPL-2.0-or-later
17 #include <epan/packet.h>
18 #include <epan/expert.h>
20 void proto_register_ar_drone(void);
21 void proto_reg_handoff_ar_drone(void);
23 /* ************************************************ */
24 /* Begin static variable declaration/initialization */
25 /* ************************************************ */
27 /* ar_drone Protocol */
28 static int proto_ar_drone
;
30 /* ar_drone Dissector handle */
31 static dissector_handle_t ar_drone_handle
;
34 static int hf_command
;
35 static int hf_PCMD_id
;
36 static int hf_PCMD_flag
;
37 static int hf_PCMD_roll
;
38 static int hf_PCMD_pitch
;
39 static int hf_PCMD_gaz
;
40 static int hf_PCMD_yaw
;
42 static int hf_REF_ctrl
;
43 static int hf_FTRIM_seq
;
44 static int hf_CONFIG_seq
;
45 static int hf_CONFIG_name
;
46 static int hf_CONFIG_val
;
47 static int hf_CONFIG_ID_seq
;
48 static int hf_CONFIG_ID_session
;
49 static int hf_CONFIG_ID_user
;
50 static int hf_CONFIG_ID_app
;
52 static int hf_LED_seq
;
53 static int hf_LED_anim
;
54 static int hf_LED_freq
;
55 static int hf_LED_sec
;
56 static int hf_ANIM_seq
;
57 static int hf_ANIM_anim
;
58 static int hf_ANIM_sec
;
59 static int hf_CTRL_seq
;
60 static int hf_CTRL_mode
;
61 static int hf_CTRL_fsize
;
65 static int ett_ar_drone
;
68 static int ett_CONFIG
;
69 static int ett_CONFIG_ID
;
70 static int ett_COMWDG
;
75 static expert_field ei_NO_COMMA
;
76 static expert_field ei_NO_CR
;
79 #if 0 /* TODO: Delete these? Or make use of them? */
80 static const value_string REF_types_vs
[] = {
81 { 0x38323038, "FLYING MODE" },
82 { 0x37393532, "EMERGENCY LANDING" },
83 { 0x37363936, "LANDING MODE" },
86 static const value_string PCMD_flag_vs
[] = {
87 { 0x30 , "DO NOT ALLOW ROLL/PITCH" },
88 { 0x31 , "ALLOW ROLL/PITCH" },
93 static const string_string CTRL_mode_vs
[] = {
94 { "4" , " (CFG_GET_CONTROL_MODE)" },
95 { "5" , " (ACK_CONTROL_MODE)" },
96 { "6" , " (CUSTOM_CFG_GET_CONTROL_MODE)" },
100 /* ********************************************** */
101 /* End static variable declaration/initialization */
102 /* ********************************************** */
104 dissect_ar_drone(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
)
107 int master_offset
= 0;
108 proto_item
*ti
, *sub_item
;
109 proto_tree
*ar_tree
, *sub_tree
;
111 uint8_t *complete_str
;
114 if (tvb_captured_length(tvb
) < 4)
117 /* Make sure the packet we're dissecting is a ar_drone packet
118 * Cheap string check for 'AT*'
120 dword
= tvb_get_ntoh24(tvb
, 0);
121 if (dword
!= 0x41542a)
124 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "ar_drone");
125 col_set_str(pinfo
->cinfo
, COL_INFO
, "AR Drone Packet");
127 /* Initialize ar_drone Packet tree with subtrees */
128 ti
= proto_tree_add_item(tree
, proto_ar_drone
, tvb
, 0, -1, ENC_NA
);
129 ar_tree
= proto_item_add_subtree(ti
, ett_ar_drone
);
131 while (tvb_reported_length_remaining(tvb
, master_offset
) > 3)
133 /* Get a string to compare our command strings (aka "AT*PCMD", etc.) to */
134 offset
= tvb_find_uint8(tvb
, master_offset
, -1, '=');
135 if (offset
< master_offset
)
136 return master_offset
;
138 command
= tvb_get_string_enc(pinfo
->pool
, tvb
, master_offset
, offset
-master_offset
, ENC_ASCII
|ENC_NA
);
139 complete_str
= tvb_get_string_enc(pinfo
->pool
, tvb
, master_offset
+3, offset
-master_offset
-3, ENC_ASCII
|ENC_NA
);
140 sub_item
= proto_tree_add_string(ar_tree
, hf_command
, tvb
, master_offset
, -1, complete_str
);
142 if (!strncmp(command
, "AT*PCMD", 7))
144 /** Parse according the PCMD layout: */
146 const char *PCMD_str
;
148 sub_tree
= proto_item_add_subtree(sub_item
, ett_PCMD
);
150 offset
= master_offset
+ 8;
153 length
= tvb_find_uint8(tvb
, offset
, -1, ',') - offset
;
155 expert_add_info(pinfo
, sub_item
, &ei_NO_COMMA
);
158 proto_tree_add_item(sub_tree
, hf_PCMD_id
, tvb
, offset
, length
, ENC_ASCII
);
159 offset
+= (length
+ 1);
162 length
= tvb_find_uint8(tvb
, offset
, -1, ',') - offset
;
164 expert_add_info(pinfo
, sub_item
, &ei_NO_COMMA
);
167 proto_tree_add_item(sub_tree
, hf_PCMD_flag
, tvb
, offset
, length
, ENC_ASCII
);
168 offset
+= (length
+ 1);
171 length
= tvb_find_uint8(tvb
, offset
, -1, ',') - offset
;
173 expert_add_info(pinfo
, sub_item
, &ei_NO_COMMA
);
176 ti
= proto_tree_add_item(sub_tree
, hf_PCMD_roll
, tvb
, offset
, length
, ENC_ASCII
);
178 PCMD_byte
= tvb_get_uint8(tvb
, offset
);
179 if (PCMD_byte
== 0x30)
181 PCMD_str
= " (NO CHANGE)";
183 else if (PCMD_byte
== 0x2d)
185 PCMD_byte
= tvb_get_uint8(tvb
, offset
+ 1);
186 if (PCMD_byte
== 0x30)
188 PCMD_str
= " (NO CHANGE)";
192 PCMD_str
= " (ROLL LEFT)";
197 PCMD_str
= " (ROLL RIGHT)";
199 proto_item_append_text(ti
, "%s", PCMD_str
);
200 offset
+= (length
+ 1);
203 length
= tvb_find_uint8(tvb
, offset
, -1, ',') - offset
;
205 expert_add_info(pinfo
, sub_item
, &ei_NO_COMMA
);
208 ti
= proto_tree_add_item(sub_tree
, hf_PCMD_pitch
, tvb
, offset
, length
, ENC_ASCII
);
210 PCMD_byte
= tvb_get_uint8(tvb
, offset
);
211 if (PCMD_byte
== 0x30)
213 PCMD_str
= " (NO CHANGE)";
215 else if (PCMD_byte
== 0x2d)
217 PCMD_byte
= tvb_get_uint8(tvb
, offset
+ 1);
218 if (PCMD_byte
== 0x30)
220 PCMD_str
= " (NO CHANGE)";
224 PCMD_str
= " (PITCH FORWARD)";
229 PCMD_str
= " (PITCH BACKWARD)";
231 proto_item_append_text(ti
, "%s", PCMD_str
);
232 offset
+= (length
+ 1);
235 length
= tvb_find_uint8(tvb
, offset
, -1, ',') - offset
;
237 expert_add_info(pinfo
, sub_item
, &ei_NO_COMMA
);
240 ti
= proto_tree_add_item(sub_tree
, hf_PCMD_gaz
, tvb
, offset
, length
, ENC_ASCII
);
242 PCMD_byte
= tvb_get_uint8(tvb
, offset
);
243 if (PCMD_byte
== 0x30)
245 PCMD_str
= " (NO CHANGE)";
247 else if (PCMD_byte
== 0x2d)
249 PCMD_byte
= tvb_get_uint8(tvb
, offset
+ 1);
250 if (PCMD_byte
== 0x30)
252 PCMD_str
= " (NO CHANGE)";
256 PCMD_str
= " (DECREASE VERT SPEED)";
261 PCMD_str
= " (INCREASE VERT SPEED)";
263 proto_item_append_text(ti
, "%s", PCMD_str
);
264 offset
+= (length
+ 1);
267 length
= tvb_find_uint8(tvb
, offset
, -1, 0x0d) - offset
;
269 expert_add_info(pinfo
, sub_item
, &ei_NO_CR
);
272 ti
= proto_tree_add_item(sub_tree
, hf_PCMD_yaw
, tvb
, offset
, length
, ENC_ASCII
);
274 PCMD_byte
= tvb_get_uint8(tvb
, offset
);
275 if (PCMD_byte
== 0x30)
277 PCMD_str
= " (NO CHANGE)";
279 else if (PCMD_byte
== 0x2d)
281 PCMD_byte
= tvb_get_uint8(tvb
, offset
+ 1);
282 if (PCMD_byte
== 0x30)
284 PCMD_str
= " (NO CHANGE)";
288 PCMD_str
= " (ROTATE LEFT)";
293 PCMD_str
= " (ROTATE RIGHT)";
295 proto_item_append_text(ti
, "%s", PCMD_str
);
296 offset
+= (length
+ 1);
298 else if (!strncmp(command
, "AT*REF", 6))
300 /** Parse according to the REF layout: */
301 sub_tree
= proto_item_add_subtree(sub_item
, ett_REF
);
303 offset
= master_offset
+ 7;
306 length
= tvb_find_uint8(tvb
, offset
, -1, ',') - offset
;
308 expert_add_info(pinfo
, sub_item
, &ei_NO_COMMA
);
311 proto_tree_add_item(sub_tree
, hf_REF_id
, tvb
, offset
, length
, ENC_ASCII
);
312 offset
+= (length
+ 1);
315 length
= tvb_find_uint8(tvb
, offset
, -1, 0x0d) - offset
;
317 expert_add_info(pinfo
, sub_item
, &ei_NO_CR
);
320 proto_tree_add_item(sub_tree
, hf_REF_ctrl
, tvb
, offset
, length
, ENC_ASCII
);
321 offset
+= (length
+ 1);
323 } else if (!strncmp(command
, "AT*CONFIG_IDS", 13))
325 /** Parse according to the CONFIG_ID layout: */
326 sub_tree
= proto_item_add_subtree(sub_item
, ett_CONFIG_ID
);
328 offset
= master_offset
+ 14;
330 /* Add Sequence Number */
331 length
= tvb_find_uint8(tvb
, offset
, -1, ',') - offset
;
333 expert_add_info(pinfo
, sub_item
, &ei_NO_COMMA
);
336 proto_tree_add_item(sub_tree
, hf_CONFIG_ID_seq
, tvb
, offset
, length
, ENC_ASCII
);
337 offset
+= (length
+ 1);
340 length
= tvb_find_uint8(tvb
, offset
, -1, ',') - offset
;
342 expert_add_info(pinfo
, sub_item
, &ei_NO_COMMA
);
345 proto_tree_add_item(sub_tree
, hf_CONFIG_ID_session
, tvb
, offset
, length
, ENC_ASCII
);
346 offset
+= (length
+ 1);
349 length
= tvb_find_uint8(tvb
, offset
, -1, ',') - offset
;
351 expert_add_info(pinfo
, sub_item
, &ei_NO_COMMA
);
354 proto_tree_add_item(sub_tree
, hf_CONFIG_ID_user
, tvb
, offset
, length
, ENC_ASCII
);
355 offset
+= (length
+ 1);
357 /* Add Application ID */
358 length
= tvb_find_uint8(tvb
, offset
, -1, 0x0d) - offset
;
360 expert_add_info(pinfo
, sub_item
, &ei_NO_CR
);
363 proto_tree_add_item(sub_tree
, hf_CONFIG_ID_app
, tvb
, offset
, length
, ENC_ASCII
);
364 offset
+= (length
+ 1);
366 } else if (!strncmp(command
, "AT*ANIM", 7))
368 /** Parse according to the ANIM layout: */
369 sub_tree
= proto_item_add_subtree(sub_item
, ett_ANIM
);
371 offset
= master_offset
+ 8;
374 length
= tvb_find_uint8(tvb
, offset
, -1, ',') - offset
;
376 expert_add_info(pinfo
, sub_item
, &ei_NO_COMMA
);
379 proto_tree_add_item(sub_tree
, hf_ANIM_seq
, tvb
, offset
, length
, ENC_ASCII
);
380 offset
+= (length
+ 1);
383 length
= tvb_find_uint8(tvb
, offset
, -1, ',') - offset
;
385 expert_add_info(pinfo
, sub_item
, &ei_NO_COMMA
);
388 proto_tree_add_item(sub_tree
, hf_ANIM_anim
, tvb
, offset
, length
, ENC_ASCII
);
389 offset
+= (length
+ 1);
391 /* Add animation time(sec) */
392 length
= tvb_find_uint8(tvb
, offset
, -1, 0x0d) - offset
;
394 expert_add_info(pinfo
, sub_item
, &ei_NO_CR
);
397 proto_tree_add_item(sub_tree
, hf_ANIM_sec
, tvb
, offset
, length
, ENC_ASCII
);
398 offset
+= (length
+ 1);
400 } else if (!strncmp(command
, "AT*FTRIM", 8))
402 /** Parse according to the FTRIM layout: */
403 sub_tree
= proto_item_add_subtree(sub_item
, ett_FTRIM
);
405 offset
= master_offset
+ 9;
407 /* Add sequence number */
408 length
= tvb_find_uint8(tvb
, offset
, -1, 0x0d) - offset
;
410 expert_add_info(pinfo
, sub_item
, &ei_NO_CR
);
413 proto_item_append_text(sub_item
, " (Sets the reference for the horizontal plane)");
414 proto_tree_add_item(sub_tree
, hf_FTRIM_seq
, tvb
, offset
, length
, ENC_ASCII
);
415 offset
+= (length
+ 1);
416 } else if (!strncmp(command
, "AT*CONFIG", 9))
418 /** Parse according to the CONFIG layout: */
419 sub_tree
= proto_item_add_subtree(sub_item
, ett_CONFIG
);
421 offset
= master_offset
+ 10;
424 length
= tvb_find_uint8(tvb
, offset
, -1, ',') - offset
;
426 expert_add_info(pinfo
, sub_item
, &ei_NO_COMMA
);
429 proto_tree_add_item(sub_tree
, hf_CONFIG_seq
, tvb
, offset
, length
, ENC_ASCII
);
430 offset
+= (length
+ 1);
433 length
= tvb_find_uint8(tvb
, offset
, -1, ',') - offset
;
435 expert_add_info(pinfo
, sub_item
, &ei_NO_COMMA
);
438 proto_tree_add_item(sub_tree
, hf_CONFIG_name
, tvb
, offset
, length
, ENC_ASCII
);
439 offset
+= (length
+ 1);
442 length
= tvb_find_uint8(tvb
, offset
, -1, 0x0d) - offset
;
444 expert_add_info(pinfo
, sub_item
, &ei_NO_CR
);
447 proto_tree_add_item(sub_tree
, hf_CONFIG_val
, tvb
, offset
, length
, ENC_ASCII
);
448 offset
+= (length
+ 1);
450 } else if (!strncmp(command
, "AT*LED", 6))
452 /** Parse according to the LED layout: */
453 sub_tree
= proto_item_add_subtree(sub_item
, ett_LED
);
455 offset
= master_offset
+ 7;
458 length
= tvb_find_uint8(tvb
, offset
, -1, ',') - offset
;
460 expert_add_info(pinfo
, sub_item
, &ei_NO_COMMA
);
463 proto_tree_add_item(sub_tree
, hf_LED_seq
, tvb
, offset
, length
, ENC_ASCII
);
464 offset
+= (length
+ 1);
466 /* Add animation to play */
467 length
= tvb_find_uint8(tvb
, offset
, -1, ',') - offset
;
469 expert_add_info(pinfo
, sub_item
, &ei_NO_COMMA
);
472 proto_tree_add_item(sub_tree
, hf_LED_anim
, tvb
, offset
, length
, ENC_ASCII
);
473 offset
+= (length
+ 1);
476 length
= tvb_find_uint8(tvb
, offset
, -1, ',') - offset
;
478 expert_add_info(pinfo
, sub_item
, &ei_NO_COMMA
);
481 proto_tree_add_item(sub_tree
, hf_LED_freq
, tvb
, offset
, length
, ENC_ASCII
);
482 offset
+= (length
+ 1);
484 /* Add Time to play in sec */
485 length
= tvb_find_uint8(tvb
, offset
, -1, 0x0d) - offset
;
487 expert_add_info(pinfo
, sub_item
, &ei_NO_CR
);
490 proto_tree_add_item(sub_tree
, hf_LED_sec
, tvb
, offset
, length
, ENC_ASCII
);
491 offset
+= (length
+ 1);
493 } else if (!strncmp(command
, "AT*COMWDG", 9))
495 /** Parse according to the COMWDG layout: */
496 sub_tree
= proto_item_add_subtree(sub_item
, ett_COMWDG
);
498 offset
= master_offset
+ 10;
500 /* Add sequence number */
501 length
= tvb_find_uint8(tvb
, offset
, -1, 0x0d) - offset
;
503 expert_add_info(pinfo
, sub_item
, &ei_NO_CR
);
506 proto_tree_add_item(sub_tree
, hf_COMWDG
, tvb
, offset
, length
, ENC_ASCII
);
507 offset
+= (length
+ 1);
509 }else if (!strncmp(command
, "AT*CTRL", 7))
511 const uint8_t* CTRL_mode_str
;
513 /** Parse according to the CTRL layout: */
514 sub_tree
= proto_item_add_subtree(sub_item
, ett_CTRL
);
516 offset
= master_offset
+ 8;
519 length
= tvb_find_uint8(tvb
, offset
, -1, ',') - offset
;
521 expert_add_info(pinfo
, sub_item
, &ei_NO_COMMA
);
524 proto_tree_add_item(sub_tree
, hf_CTRL_seq
, tvb
, offset
, length
, ENC_ASCII
);
525 offset
+= (length
+ 1);
528 length
= tvb_find_uint8(tvb
, offset
, -1, ',') - offset
;
530 expert_add_info(pinfo
, sub_item
, &ei_NO_COMMA
);
533 ti
= proto_tree_add_item_ret_string(sub_tree
, hf_CTRL_mode
, tvb
, offset
, length
, ENC_ASCII
|ENC_NA
, pinfo
->pool
, &CTRL_mode_str
);
534 proto_item_append_text(ti
, "%s", str_to_str(CTRL_mode_str
, CTRL_mode_vs
, " (Unknown Mode)"));
535 offset
+= (length
+ 1);
538 length
= tvb_find_uint8(tvb
, offset
, -1, 0x0d) - offset
;
540 expert_add_info(pinfo
, sub_item
, &ei_NO_CR
);
543 proto_tree_add_item(sub_tree
, hf_CTRL_fsize
, tvb
, offset
, length
, ENC_ASCII
);
544 offset
+= (length
+ 1);
548 /* Unknown command, just abort */
549 return master_offset
;
552 proto_item_set_len(sub_item
, offset
-master_offset
);
553 master_offset
= offset
;
556 return master_offset
;
560 dissect_ar_drone_heur(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data
)
562 return dissect_ar_drone(tvb
, pinfo
, tree
, data
) > 0;
566 proto_register_ar_drone(void)
568 /* Setup protocol header array */
569 static hf_register_info hf
[] = {
571 { "Command", "ar_drone.command",
572 FT_STRING
, BASE_NONE
,
577 { "Sequence Number", "ar_drone.pcmd.id",
578 FT_STRING
, BASE_NONE
,
580 "Progressive Command ID", HFILL
}
583 { "Flag", "ar_drone.pcmd.flag",
584 FT_STRING
, BASE_NONE
,
585 NULL
/*VALS(PCMD_flag_vs)*/, 0x0,
586 "Progressive Command Flag", HFILL
}
589 { "Roll", "ar_drone.pcmd.roll",
590 FT_STRING
, BASE_NONE
,
592 "Progressive Command Roll", HFILL
}
595 { "Pitch", "ar_drone.pcmd.pitch",
596 FT_STRING
, BASE_NONE
,
598 "Progressive Command Pitch", HFILL
}
601 { "Gaz", "ar_drone.pcmd.gaz",
602 FT_STRING
, BASE_NONE
,
604 "Progressive Command Gaz", HFILL
}
607 { "Yaw", "ar_drone.pcmd.yaw",
608 FT_STRING
, BASE_NONE
,
610 "Progressive Command Yaw", HFILL
}
613 { "Sequence Number", "ar_drone.ref.id",
614 FT_STRING
, BASE_NONE
,
616 "Reference ID", HFILL
}
619 { "Control Command", "ar_drone.ref.ctrl",
620 FT_STRING
, BASE_NONE
,
621 NULL
/*VALS(REF_types_vs)*/, 0x0,
625 { "Sequence Number", "ar_drone.ftrim.seq",
626 FT_STRING
, BASE_NONE
,
628 "Flap Trim / Horizontal Plane Reference", HFILL
}
631 { "Sequence Number", "ar_drone.configids.seq",
632 FT_STRING
, BASE_NONE
,
634 "Configuration ID sequence number", HFILL
}
636 { &hf_CONFIG_ID_session
,
637 { "Current Session ID", "ar_drone.configids.session",
638 FT_STRING
, BASE_NONE
,
640 "Configuration ID current session ID", HFILL
}
642 { &hf_CONFIG_ID_user
,
643 { "Current User ID", "ar_drone.configids.user",
644 FT_STRING
, BASE_NONE
,
646 "Configuration ID current user ID", HFILL
}
649 { "Current Application ID", "ar_drone.configids.app",
650 FT_STRING
, BASE_NONE
,
652 "Configuration ID current application ID", HFILL
}
655 { "Command WatchDog Request", "ar_drone.comwdg",
656 FT_STRING
, BASE_NONE
,
658 "Command WatchDog Reset request", HFILL
}
661 { "Sequence Number", "ar_drone.config.seq",
662 FT_STRING
, BASE_NONE
,
664 "Configuration Seq Num", HFILL
}
667 { "Option Name", "ar_drone.config.name",
668 FT_STRING
, BASE_NONE
,
673 { "Option Parameter", "ar_drone.config.val",
674 FT_STRING
, BASE_NONE
,
679 { "Sequence Number", "ar_drone.led.seq",
680 FT_STRING
, BASE_NONE
,
682 "LED Sequence Number", HFILL
}
685 { "Selected Animation", "ar_drone.led.anim",
686 FT_STRING
, BASE_NONE
,
688 "Selected LED Animation", HFILL
}
691 { "Animation Frequency", "ar_drone.led.freq",
692 FT_STRING
, BASE_NONE
,
694 "LED Animation Frequency", HFILL
}
697 { "LED Animation Length (Seconds)", "ar_drone.led.sec",
698 FT_STRING
, BASE_NONE
,
700 "LED Anim Length", HFILL
}
703 { "Animation Sequence Number", "ar_drone.anim.seq",
704 FT_STRING
, BASE_NONE
,
706 "Movement(Animation) Sequence #", HFILL
}
709 { "Selected Animation Number", "ar_drone.anim.num",
710 FT_STRING
, BASE_NONE
,
712 "Movement(Animation) to Play", HFILL
}
715 { "Animation Duration (seconds)", "ar_drone.anim.sec",
716 FT_STRING
, BASE_NONE
,
718 "Movement(Animation) Time in Seconds", HFILL
}
721 { "Sequence Number", "ar_drone.ctrl.seq",
722 FT_STRING
, BASE_NONE
,
727 { "Control Mode", "ar_drone.ctrl.mode",
728 FT_STRING
, BASE_NONE
,
733 { "Firmware Update File Size (0 for no update)", "ar_drone.ctrl.filesize",
734 FT_STRING
, BASE_NONE
,
740 /* Setup protocol subtree array */
741 static int *ett
[] = {
754 static ei_register_info ei
[] = {
755 { &ei_NO_COMMA
, { "ar_drone.no_comma", PI_MALFORMED
, PI_ERROR
, "Comma delimiter not found", EXPFILL
}},
756 { &ei_NO_CR
, { "ar_drone.no_cr", PI_MALFORMED
, PI_ERROR
, "Carriage return delimiter (0x0d) not found", EXPFILL
}},
759 expert_module_t
* expert_drone
;
761 /* Setup protocol info */
762 proto_ar_drone
= proto_register_protocol("AR Drone Packet", "AR Drone", "ar_drone");
763 ar_drone_handle
= register_dissector("ar_drone", dissect_ar_drone
, proto_ar_drone
);
765 proto_register_field_array(proto_ar_drone
, hf
, array_length(hf
));
766 proto_register_subtree_array(ett
, array_length(ett
));
768 expert_drone
= expert_register_protocol(proto_ar_drone
);
769 expert_register_field_array(expert_drone
, ei
, array_length(ei
));
773 proto_reg_handoff_ar_drone(void)
775 heur_dissector_add("udp", dissect_ar_drone_heur
, "AR Drone over UDP", "ar_drone_udp", proto_ar_drone
, HEURISTIC_ENABLE
);
776 dissector_add_for_decode_as_with_preference("udp.port", ar_drone_handle
);
780 * Editor modelines - https://www.wireshark.org/tools/modelines.html
785 * indent-tabs-mode: nil
788 * vi: set shiftwidth=4 tabstop=8 expandtab:
789 * :indentSize=4:tabSize=8:noTabs=true: