Wireshark mailing list archives
Re: Wireshark col_append_sep_str function
From: "Peimann, Jannis" <jannis.peimann () continental-corporation com>
Date: Fri, 3 Apr 2020 11:22:46 +0000
Hi, thanks for your help. The solution from Graham Bloice was the one I was looking for. I have to use col_set_fence. Now I just have to find a good solution for the prepend pdu_conti_NAME_LONG every time it is called. Because this thing should only be once in the Info column and not for every PDU. proto_pdu_conti = proto_register_protocol(pdu_conti_NAME_LONG, pdu_conti_NAME, pdu_conti_NAME_FILTER); Now it is like: GeneralInfo, PDU1, GeneralInfo, PDU2… Should be like GeneralInfo PDU1, PDU2… Thanks for your help guys. Mit freundlichen Grüßen/Best regards, Jannis Peimann Von: Wireshark-dev <wireshark-dev-bounces () wireshark org> Im Auftrag von Pascal Quantin Gesendet: Freitag, 3. April 2020 11:40 An: Developer support list for Wireshark <wireshark-dev () wireshark org> Betreff: Re: [Wireshark-dev] Wireshark col_append_sep_str function Hi Jannis, Le ven. 3 avr. 2020 à 11:22, Peimann, Jannis <jannis.peimann () continental-corporation com<mailto:jannis.peimann () continental-corporation com>> a écrit : Hi together, I want to add information to the Info column for every frame in Wireshark. This is working fine as long as I only have one PDU in my UDP package. If I have more than one PDU, then it overwrites the old Info column string. It is not appending. This is my function: if (pdu_description != NULL) { col_append_sep_str(pinfo->cinfo, COL_INFO, ",", pdu_description); g_print("Debug Message: frame number [%d] [%s]\n", pinfo->fd->num, pdu_description);/*Debug Console Message */ } This col_append_sep_str function is from column-utils.c For example the DEBUG Message is called twice, if I have two PDUs. This is working. Right now I only have this: PDU Protocol, Name2 But it should be: PDU Protocol, Name1, Name2… I think there is a problem with losing the old frame information, because it is writing again PDU Protocol. Do you guys know what I’m missing? Are you sure you are not calling col_clear(pinfo->cinfo, COL_INFO) somewhere in your code? Best regards, Pascal.
___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: https://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- Wireshark col_append_sep_str function Peimann, Jannis (Apr 03)
- Re: Wireshark col_append_sep_str function Graham Bloice (Apr 03)
- Re: Wireshark col_append_sep_str function Pascal Quantin (Apr 03)
- Re: Wireshark col_append_sep_str function Peimann, Jannis (Apr 03)