/********************************************************************************* * tshark CAN协议分析初试 * 说明: * 使用tshark分析CAN数据,协议支持,不过貌似CANopen的协议分析不出来,单纯的CAN * 数据分析data部分都无法显示,目前不知道原因。 * * 2018-2-5 深圳 宝安西乡 曾剑锋 ********************************************************************************/一、tshark help: [buildroot@root ~]# tshark -h Running as user "root" and group "root". This could be dangerous. TShark (Wireshark) 2.2.6 (wireshark-2.2.6) Dump and analyze network traffic. See https://www.wireshark.org for more information. Usage: tshark [options] ... Capture interface: -i name or idx of interface (def: first non-loopback) -f packet filter in libpcap filter syntax -s packet snapshot length (def: 65535) -p don't capture in promiscuous mode -I capture in monitor mode, if available -B size of kernel buffer (def: 2MB) -y link layer type (def: first appropriate) -D print list of interfaces and exit -L print list of link-layer types of iface and exit Capture stop conditions: -c stop after n packets (def: infinite) -a ... duration:NUM - stop after NUM seconds filesize:NUM - stop this file after NUM KB files:NUM - stop after NUM files Capture output: -b ... duration:NUM - switch to next file after NUM secs filesize:NUM - switch to next file after NUM KB files:NUM - ringbuffer: replace after NUM files Input file: -r set the filename to read from (- to read from stdin) Processing: -2 perform a two-pass analysis -R packet Read filter in Wireshark display filter syntax -Y packet displaY filter in Wireshark display filter syntax -n disable all name resolutions (def: all enabled) -N enable specific name resolution(s): "mnNtCd" -d == , ... "Decode As", see the man page for details Example: tcp.port==8888,http -H read a list of entries from a hosts file, which will then be written to a capture file. (Implies -W n) --disable-protocol disable dissection of proto_name --enable-heuristic enable dissection of heuristic protocol --disable-heuristic disable dissection of heuristic protocol Output: -w write packets to a pcap-format file named "outfile" (or to the standard output for "-") -C start with specified configuration profile -F