“ip.addr” has type FT_IPv4, not FT_STRING or FT_STRINGZ, which are the only two types that dissector_add_string() expects. 
  
I think you will likely need to write your dissector as a heuristic
dissector, making use of heur_dissector_add().  Try taking a look at doc/README.heuristic. 
  
- Chris 
  
  
From:
wireshark-dev-bounces@xxxxxxxxxxxxx
[mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of ??(Zhen Ma) 
Sent: Monday, December 14, 2009 10:47 AM 
To: wireshark-dev@xxxxxxxxxxxxx 
Subject: Re: [Wireshark-dev] Wireshark-dev Digest, Vol 43, Issue 25 
 
  
Hi, 
 
I am writing a Fetion(a popular IM in China)
dissector which can onlydistinguishedby server address. 
Hence I write a dissector with followingproto_reg_handoff_fetion, 
 
proto_reg_handoff_fetion(void) 
 
 
 
 
dissector_handle_t fetion_handle; 
 
 
 
 
fetion_handle = new_create_dissector_handle(dissect_fetion,
proto_fetion); 
 
 
 
dissector_add_string("ip.addr",
FETION_SERVER_ADDR, fetion_handle); 
 
 
 
 
However, it doesn't work. Can anybody help me with this
question? 
 
 
 
 
CONFIDENTIALITY NOTICE: The contents of this email are confidential
and for the exclusive use of the intended recipient. If you receive this
email in error, please delete it from your system immediately and 
notify us either by email, telephone or fax. You should not copy,
forward, or otherwise disclose the content of the email.
 
 |