Re: [Wireshark-dev] Adding numbers to the tree

2009-02-13 Thread gogrady
Hi, Then i must be confused about what it is hfindex are doing and where they show up in the tree. Could you explain / how to use format? Sorry for the trouble, Greg -Original Message- From: Jaap Keuter [mailto:jaap.keu...@xs4all.nl] Sent: Friday, February 13, 2009 3:35 PM To: gogr..

[Wireshark-dev] best practice questions - a tn3270 dissector

2009-02-13 Thread Robert Hogan
I'm most of the way (I hope) through a tn3270 dissector. However I'm not sure of the most acceptable way of doing a couple of things: - Should I just make TN3270 a sub-dissector of telnet? So users select 'decode as telnet' and get the tn3270 dissected implicitly? Or should it have a separate '

Re: [Wireshark-dev] Adding numbers to the tree

2009-02-13 Thread gogrady
Hi, i have looked at those and it doesnt seem to be what i'm looking for. I want to do something such as proto_tree_add_text(tree, "TEST", tvb, 0, 0, function_call_that_returns_"TEST"() ); so that in the tree it will output something like TEST: TEST. however, the first "TEST" is supposed to be

Re: [Wireshark-dev] Adding numbers to the tree

2009-02-13 Thread gogrady
Ahh thank you, i think i get that. But also, for "id". It takes an int, but what if i want to put a different string there? I want to be able to include my own string for output that isn't in a static const value_string. I will be return data from a function from a loaded dll. And just something

Re: [Wireshark-dev] Adding numbers to the tree

2009-02-13 Thread gogrady
Hi, I read both of these. Say i just wanted to output the integer 7. proto_tree_add_uint(tree, id, tvb?, ?, ?, 7); i dont understand what tvb is / does i guess. Also, i will be using the raw data to send to a function to send back a string for the header names. where would be the best place to

Re: [Wireshark-dev] Adding numbers to the tree

2009-02-13 Thread Jaap Keuter
Hi, Look in doc/README.developer and epan/proto.h for proto_tree_add_uint[_format](tree, ...) Thanx, Jaap gogr...@wi.rr.com wrote: > Hello, > > In my custom dissector i understand how to take data from the buffer and > output it, but how do i output a number thats not from the buffer. I will b

[Wireshark-dev] Adding numbers to the tree

2009-02-13 Thread gogrady
Hello, In my custom dissector i understand how to take data from the buffer and output it, but how do i output a number thats not from the buffer. I will be getting data from another dll proxy that i will want to output. So say i have an int variable "test" that gets set by a function "public i

Re: [Wireshark-dev] Problems to fill COL_INFO in a new dissector

2009-02-13 Thread xourciere.ext
Hi Yann, In fact I hoped there is a way to get the info back from the tree once it is populated by the dissector. But I return to my first idea that was to populate the COL_INFO during the dissection (at this time it is partially working, thx to Anders). Regards, Xavier. -Message d'origin

Re: [Wireshark-dev] Wireshark 1.06 crashes in libwireshark.dll when decoding CPHA packet

2009-02-13 Thread Bill Meier
Marty Adkins wrote: > Wireshark 1.06 consistently crashes in libwireshark.dll when decoding > a CheckPoint CPHA FWHA_MY_STATE packet. These are sent to a unicast > IP and multicast MAC, from a source IP of 0.0.0.0. It seems to have > no problem decoding the CPHA FWHA_IFCONF_REPLY packets that hav

Re: [Wireshark-dev] Problems to fill COL_INFO in a new dissector

2009-02-13 Thread BARILLY YANN
Hi, I don't think you can get the info without find it in the tvbuff. In my opinion, 2 possibilities: - if the data is always at the same position, set an offset : tvb_get_*(tvb(, ), STANDARD_OFFSET(, length)); - when you populate, update the COLL_INFO : if (check_col(pinfo->cinfo, COL_INFO))

[Wireshark-dev] Wireshark 1.06 crashes in libwireshark.dll when decoding CPHA packet

2009-02-13 Thread Marty Adkins
Wireshark 1.06 consistently crashes in libwireshark.dll when decoding a CheckPoint CPHA FWHA_MY_STATE packet. These are sent to a unicast IP and multicast MAC, from a source IP of 0.0.0.0. It seems to have no problem decoding the CPHA FWHA_IFCONF_REPLY packets that have the same L2/L3 addresses.

[Wireshark-dev] Problems to fill COL_INFO in a new dissector

2009-02-13 Thread xourciere.ext
Hello, Well here is the full story. I managed to code a new dissector from its ASN.1 description (Cisco CRSPv3). Everything is working except that I want to have some informations showed in the column "Info". At this time I can parse the tvb to match the info I need, but in this case the dissect

[Wireshark-dev] Loading a DLL into custom dissector

2009-02-13 Thread gogrady
Hello, I have created my own custom dissector, it will take raw data and send it to a sort of "proxy" dll that will send the raw data elsewhere to be decoded and then sent back. However i'm having a bit of trouble doing this since i'm new to it all. So i had a few questions. 1) In what order

Re: [Wireshark-dev] Problems to fill COL_INFO in a new dissector

2009-02-13 Thread xourciere.ext
Thank you for this code snippet. It helped me a lot to understand the way the code in the CNF is inserted in the generated code of the dissector. Regards, Xavier. -Message d'origine- De : wireshark-dev-boun...@wireshark.org [mailto:wireshark-dev-boun...@wireshark.org] De la part de Ande

Re: [Wireshark-dev] Problems to fill COL_INFO in a new dissector

2009-02-13 Thread Anders Broman
Hi, I'm still not sure what you are trying to do but here's a code snippet from the GSM MAP dissector: This is the genertaed code: - Snip -- static int dissect_gsm_old_GSMMAPOperationLocalvalue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tr

[Wireshark-dev] Problems to fill COL_INFO in a new dissector

2009-02-13 Thread xourciere.ext
Hi Anders, I am not familiar with the CNF file, I used an almost empty one during my tests but I will try to have a deeper look at the advanced conf. In the meantime I think that I can get the info I need directly from the generated "tree" filled by the dissector. So is there some predefined fun

Re: [Wireshark-dev] Problems to fill COL_INFO in a new dissector

2009-02-13 Thread Anders Broman
Hi, I'm not sure I understand what your problem is. But you can use the .cnf file to "insert" code in generated output in various ways See the other dissectotrs under /asn1. Regards Anders -Original Message- From: wireshark-dev-boun...@wireshark.org [mailto:wireshark-dev-boun...@wireshark

[Wireshark-dev] Problems to fill COL_INFO in a new dissector

2009-02-13 Thread xourciere.ext
Hello, Well here is the full story. I managed to code a new dissector from its ASN.1 description (Cisco CRSPv3). Everything is working except that I want to get some informations showed in the column "Info". At this time I can parse the tvb to match the info I need, but in this case the dissecto