Wiresharkのpluginでキャプチャできないtcpのportがあるの?
たぶん、自分のやっていることのどこか間違っているのだとおもうのですが、よくわかりません。
環境
wireshark -v Wireshark 2.4.2 (v2.4.2-0-gb6c63ae) Copyright 1998-2017 Gerald Combs <gerald@wireshark.org> and contributors. License GPLv2+: GNU GPL version 2 or later <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html> This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Compiled (64-bit) with Qt 5.3.2, with libpcap, without POSIX capabilities, with GLib 2.36.0, with zlib 1.2.5, with SMI 0.4.8, with c-ares 1.12.0, with Lua 5.2.4, with GnuTLS 3.4.17, with Gcrypt 1.7.7, with MIT Kerberos, with GeoIP, with nghttp2 1.14.0, with LZ4, with Snappy, with libxml2 2.9.4, with QtMultimedia, without AirPcap, with SBC, without SpanDSP. Running on Mac OS X 10.10.5, build 14F1605 (Darwin 14.5.0), with Intel(R) Core(TM) i5-4250U CPU @ 1.30GHz (with SSE4.2), with 4096 MB of physical memory, with locale ja_JP.UTF-8, with libpcap version 1.5.3 - Apple version 47, with GnuTLS 3.4.17, with Gcrypt 1.7.7, with zlib 1.2.5. Built using llvm-gcc 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.9.00).
ネットワークインターフェースはLoopBack lo0
4桁のポートと5桁のポートに同じディセクタを割り当てる
local p_multi = Proto("mytest", "this is a test!"); function p_multi.dissector(buf, pkt, tree) pkt.cols.protocol = "mytest" info("foo bar"); end DissectorTable.get("tcp.port"):add(8000 , p_multi) DissectorTable.get("tcp.port"):add(33060, p_multi)
5桁のポートの場合ディセクタが動作していない。
phpの簡易サーバ立ち上げる
$ php -S localhost:33060
ブラウザからアクセス
今回作ったプラグインのプロトコル名(mytest)が出ていない。キャプチャは載せてないがログは出ていない。
4桁のポートの場合ディセクタが動作している。ログも出ている。
phpの簡易サーバ立ち上げる
$ php -S localhost:8000
ブラウザからアクセス