Hello,

I am writing a dissector in C and I donwloaded the last version of the source from svn. I want to use the proto_tree_append_text to add a label to an item. My compiler said that this function is not defined. This are are my include at the begin of my c file:

#ifdef HAVE_CONFIG_H
# include "config.h"

#endif

#include <stdio.h>
#include <glib.h>
#include <epan/packet.h>
#include <epan/emem.h>
#include <epan/dissectors/packet-tcp.h>
#include <epan/prefs.h>
#include <string.h>

Somebody can help me and tell what include I should add?

Thanks. Sandrine.

asked 17 Dec '10, 05:39

Sandrine%20Beauche's gravatar image

Sandrine Bea...
1223
accept rate: 0%


The function to use would be proto_item_append_text and is declared in epan/proto.h:

/** Append to text of item after it has already been created.
 @param ti the item to append the text to
 @param format printf like format string
 @param ... printf like parameters */
extern void proto_item_append_text(proto_item *ti, const char *format, ...)
        G_GNUC_PRINTF(2,3);

Hope this helps :-)

link

answered 17 Dec '10, 07:17

SYN-bit's gravatar image

SYN-bit ♦♦
12.9k843182
accept rate: 19%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×2
×2

Asked: 17 Dec '10, 05:39

Seen: 485 times

Last updated: 17 Dec '10, 07:17

powered by OSQA