forked from osmocom/wireshark
Developer Guide: Updates
1. Use proto_tree_add_bitmask for the flags example 2. GLib download link was dead 3. Remove old frontend information. I can't find any download for hethereal, and Packetyzer is so old that it's not useful for any current developers. Change-Id: Ifa0a7363fccb95fb2ef315d84fbbcf7414ae6a6d Reviewed-on: https://code.wireshark.org/review/28632 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
9c4d312822
commit
80c4cf05a4
|
@ -440,7 +440,7 @@ flags structure. For this we need to add some more data to the table though.
|
|||
.Adding Flags to the protocol.
|
||||
====
|
||||
----
|
||||
#define FOO_START_FLAG 0x01
|
||||
#define FOO_START_FLAG 0x01
|
||||
#define FOO_END_FLAG 0x02
|
||||
#define FOO_PRIORITY_FLAG 0x04
|
||||
|
||||
|
@ -453,10 +453,13 @@ dissect_foo(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
|||
{
|
||||
...
|
||||
...
|
||||
proto_tree_add_item(foo_tree, hf_foo_flags, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(foo_tree, hf_foo_startflag, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(foo_tree, hf_foo_endflag, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(foo_tree, hf_foo_priorityflag, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
static const int* bits[] = {
|
||||
&hf_foo_startflag,
|
||||
&hf_foo_endflag,
|
||||
&hf_foo_priorityflag
|
||||
};
|
||||
|
||||
proto_tree_add_bitmask(foo_tree, tvb, offset, hf_foo_flags, ett_foo, bits, ENC_BIG_ENDIAN);
|
||||
offset += 1;
|
||||
...
|
||||
...
|
||||
|
@ -497,7 +500,7 @@ the type `FT_BOOLEAN`, as the flag is either on or off. Second, we include the f
|
|||
mask in the 7th field of the data, which allows the system to mask the relevant bit.
|
||||
We've also changed the 5th field to 8, to indicate that we are looking at an 8 bit
|
||||
quantity when the flags are extracted. Then finally we add the extra constructs
|
||||
to the dissection routine. Note we keep the same offset for each of the flags.
|
||||
to the dissection routine.
|
||||
|
||||
This is starting to look fairly full featured now, but there are a couple of
|
||||
other things we can do to make things look even more pretty. At the moment our
|
||||
|
|
|
@ -123,13 +123,13 @@ and its dependencies.
|
|||
|
||||
The GLib library is available for most Linux distributions and UNIX
|
||||
flavors. If it isn't already installed and isn't available as a package
|
||||
for your platform, you can get it at http://www.gtk.org/download.html[].
|
||||
for your platform, you can get it at http://www.gtk.org[].
|
||||
|
||||
[[ChLibsWin32GLib]]
|
||||
|
||||
==== Win32 MSVC
|
||||
|
||||
You can get the latest version at http://www.gtk.org/download.html[].
|
||||
You can get the latest version at http://www.gtk.org[].
|
||||
|
||||
[[ChLibsSMI]]
|
||||
|
||||
|
|
|
@ -18,15 +18,6 @@ development team:
|
|||
|
||||
* TShark, console based
|
||||
|
||||
There are other Wireshark frontends which are not developed nor maintained by
|
||||
the Wireshark development team:
|
||||
|
||||
* Packetyzer. Native Windows interface, written in Delphi and released
|
||||
under the GPL. Not actively maintained. https://sourceforge.net/projects/packetyzer/[]
|
||||
|
||||
* hethereal Web interface. Not actively maintained and not
|
||||
finished.
|
||||
|
||||
This chapter is focused on the Wireshark frontend, and especially on
|
||||
the Qt interface.
|
||||
|
||||
|
|
Loading…
Reference in New Issue