Skip to content

Commit

Permalink
Add docs about how to use the wireshark baidu_std dissector
Browse files Browse the repository at this point in the history
  • Loading branch information
wasphin committed Oct 15, 2023
1 parent 251716d commit 3aaab4e
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 0 deletions.
26 changes: 26 additions & 0 deletions docs/cn/wireshark_baidu_std.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[English version](../en/wireshark_baidu_std.md)

# 介绍

`wireshark_baidu_std.lua` 是针对 [`baidu_std`](baidu_std.md) 协议的 `Wireshark` 解析插件,同时支持 [`streaming_rpc`](streaming_rpc.md) 协议的解析。

请求包的解析示例:

![request](../images/wireshark_baidu_std_request.png)

响应包的解析示例:

![response](../images/wireshark_baidu_std_response.png)


## 使用方式

1.[`wireshark_baidu_std.lua`](../../tools/wireshark_baidu_std.lua) 放到 "Personal Lua Plugins" 目录下;
1.[`optionsl.proto`](../../src/brpc/options.proto)[`streaming_rpc_meta.proto`](../../src/brpc/streaming_rpc_meta.proto) 以及 [`baidu_rpc_meta.proto`](../../src/brpc/policy/baidu_rpc_meta.proto) 放到 "Personal configuration" 目录下的 `protobuf` 目录中,目录如不存在可以手动创建;
1. 参考 [Wireshark Protobuf](https://wiki.wireshark.org/Protobuf#protobuf-search-paths-settings) 配置 `Protobuf` 系统 proto 文件路经,如:`/opt/homebrew/opt/protobuf/include`
![wireshark-protobuf-search-paths](../images/wireshark_protobuf_search_paths.png)
1. 可选,如需想使用相关字段进行过滤,可打开如下选项:
![wireshark-protobuf-settings](../images/wireshark_protobuf_settings.png)

上面提到的 "Personal Lua Plugins" 以及 "Personal configuration" 目录可查看 `About Wireshark``Folders` 页面,相关目录是平台相关的,macOS 下如:
![About Wireshark](../images/wireshark_folders.png)
26 changes: 26 additions & 0 deletions docs/en/wireshark_baidu_std.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[中文版](../cn/wireshark_baidu_std.md)

# Overview

`wireshark_baidu_std.lua` is a Wireshark Lua dissector written for [`baidu_std`](../cn/baidu_std.md) protocol, including the [`streaming_rpc`](streaming_rpc.md) protocol.

Example for the Echo request:

![request](../images/wireshark_baidu_std_request.png)

Example for the Echo response:

![response](../images/wireshark_baidu_std_response.png)


## How to use

1. Put [`wireshark_baidu_std.lua`](../../tools/wireshark_baidu_std.lua) under "Personal Lua Plugins";
1. And put [`optionsl.proto`](../../src/brpc/options.proto), [`streaming_rpc_meta.proto`](../../src/brpc/streaming_rpc_meta.proto) and [`baidu_rpc_meta.proto`](../../src/brpc/policy/baidu_rpc_meta.proto) in `protobuf` directory under "Personal configuration", create if not exist;
1. Set `Protobuf Search Paths` for Protobuf official library include directory(e.g. `/opt/homebrew/opt/protobuf/include`), see [Wireshark Protobuf](https://wiki.wireshark.org/Protobuf#protobuf-search-paths-settings) for more details.
![wireshark-protobuf-search-paths](../images/wireshark_protobuf_search_paths.png)
1. Optional, turn on `Dissect Protobuf fields as Wireshark fields` if you want to use related `baidu_std` fields for filtering:
![wireshark-protobuf-settings](../images/wireshark_protobuf_settings.png)

The "Personal Lua Plugins" and "Personal configuration" folders above can be found under the `Folders` page of `About Wireshark`, for macOS:
![About Wireshark](../images/wireshark_folders.png)
Binary file added docs/images/wireshark_baidu_std_request.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/wireshark_baidu_std_response.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/wireshark_folders.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/wireshark_protobuf_search_paths.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/wireshark_protobuf_settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3aaab4e

Please sign in to comment.