Wireshark Developer’s Guide
5.12. Kerberos (optional) .................................................................................... 50
5.12.1. Unix ............................................................................................. 50
5.12.2. Win32 MSVC ................................................................................. 50
5.13. LUA (optional) .......................................................................................... 51
5.13.1. Unix ............................................................................................. 51
5.13.2. Win32 MSVC ................................................................................. 51
5.14. PortAudio (optional) ................................................................................... 51
5.14.1. Unix ............................................................................................. 51
5.14.2. Win32 MSVC ................................................................................. 51
5.15. GeoIP (optional) ........................................................................................ 51
5.15.1. Unix ............................................................................................. 51
5.15.2. Win32 MSVC ................................................................................. 51
5.16. WinSparkle (optional) ................................................................................. 51
5.16.1. Win32 MSVC ................................................................................. 52
II. Wireshark Development ................................................................................................. 53
6. How Wireshark Works ........................................................................................... 54
6.1. Introduction ................................................................................................ 54
6.2. Overview ................................................................................................... 54
6.3. Capturing packets ........................................................................................ 56
6.4. Capture Files .............................................................................................. 56
6.5. Dissect packets ........................................................................................... 56
7. Introduction .......................................................................................................... 58
7.1. Source overview .......................................................................................... 58
7.2. Coding Style .............................................................................................. 58
7.3. The GLib library ......................................................................................... 58
8. Packet capturing .................................................................................................... 59
8.1. How to add a new capture type to libpcap ....................................................... 59
9. Packet dissection ................................................................................................... 60
9.1. How it works .............................................................................................. 60
9.2. Adding a basic dissector ............................................................................... 60
9.2.1. Setting up the dissector ...................................................................... 60
9.2.2. Dissecting the details of the protocol .................................................... 62
9.2.3. Improving the dissection information .................................................... 65
9.3. How to handle transformed data ..................................................................... 67
9.4. How to reassemble split packets ..................................................................... 68
9.4.1. How to reassemble split UDP packets ................................................... 69
9.4.2. How to reassemble split TCP Packets ................................................... 72
9.5. How to tap protocols ................................................................................... 73
9.6. How to produce protocol stats ....................................................................... 74
9.7. How to use conversations ............................................................................. 75
9.8. idl2wrs: Creating dissectors from CORBA IDL files .......................................... 75
9.8.1. What is it? ....................................................................................... 76
9.8.2. Why do this? ................................................................................... 76
9.8.3. How to use idl2wrs ........................................................................... 76
9.8.4. TODO ............................................................................................. 77
9.8.5. Limitations ...................................................................................... 78
9.8.6. Notes .............................................................................................. 78
10. Lua Support in Wireshark ...................................................................................... 79
10.1. Introduction .............................................................................................. 79
10.2. Example of Dissector written in Lua ............................................................. 79
10.3. Example of Listener written in Lua ............................................................... 80
11. Wireshark’s Lua API Reference Manual ................................................................... 82
11.1. Saving capture files .................................................................................... 82
11.1.1. Dumper ......................................................................................... 82
vi