2017-04-10 36 views
0

我一直在尋找一些教程來編寫我自己的解剖器爲CPL-G3。
然而,所有我發現的是,使用TCP或UDP端口,這樣的解剖:Wireshark解剖器不使用TCP或UDP端口

dissector_add (「tcp.port」, 250, myprot_handle); 

是否有使用另一種傳輸協議的方式,而不是TCP?

+0

我認爲需要首先回答的問題是:CPL-G3究竟運行哪些數據/網絡/傳輸協議? CPL-G3與IEEE 1901相關嗎?我注意到Wireshark解析器可以用於homeplug和homeplug-av,它顯然是通過以太網運行的。這些協議是否與CPL-G3有關? – willyo

+0

他有些猶豫,轉向IEEE 802.15.4 –

+0

您是否有捕獲文件包含CPL-G3數據包?你可以在任何地方分享它(保管箱等)? – willyo

回答

0

有沒有辦法使用另一個傳輸協議,而不是TCP?

認爲你的意思是說運輸協議,但沒錯,這是可能的。

例如,Wireshark的DNS dissector註冊UDP,TCP和SCTP。

void 
proto_reg_handoff_dns(void) 
{ 
    dissector_handle_t mdns_udp_handle; 
    dissector_handle_t llmnr_udp_handle; 

    mdns_udp_handle = create_dissector_handle(dissect_mdns_udp, proto_mdns); 
    llmnr_udp_handle = create_dissector_handle(dissect_llmnr_udp, proto_llmnr); 
    dissector_add_uint_with_preference("udp.port", UDP_PORT_MDNS, mdns_udp_handle); 
    dissector_add_uint_with_preference("udp.port", UDP_PORT_LLMNR, llmnr_udp_handle); 
    dissector_add_uint("sctp.port", SCTP_PORT_DNS, dns_handle); 
#if 0 
    dissector_add_uint("sctp.ppi", DNS_PAYLOAD_PROTOCOL_ID, dns_handle); 
#endif 
    stats_tree_register("dns", "dns", "DNS", 0, dns_stats_tree_packet, dns_stats_tree_init, NULL); 
    gssapi_handle = find_dissector_add_dependency("gssapi", proto_dns); 
    ntlmssp_handle = find_dissector_add_dependency("ntlmssp", proto_dns); 
    ssl_dissector_add(TCP_PORT_DNS_TLS, dns_handle); 
    dtls_dissector_add(UDP_PORT_DNS_DTLS, dns_handle); 
    dissector_add_uint_range_with_preference("tcp.port", DEFAULT_DNS_TCP_PORT_RANGE, dns_handle); 
    dissector_add_uint_range_with_preference("udp.port", DEFAULT_DNS_PORT_RANGE, dns_handle); 
} 

在這個Wireshark源代碼中還有很多其他的例子。

相關問題