网络捕包分析系统及其协议分析研究( 二 )


proto_reg_handoff_myprot(void)
{
 dissector_handle_t myprot_handle;
 myprot_handle = create_dissector_handle(dissect_myprot,
 proto_myprot);
 dissector_add("tcp.port", 250, myprot_handle);
}
这段代码告诉系统当tcp协议数据流端口为250的时候要调用这个函数模块 。这样一个新的协议分析模块就加入到系统中了 。

推荐阅读