示例#1
0
/*
 * Name: dissect_esis_unknown()
 *
 * Description:
 *   There was some error in the protocol and we are in unknown space
 *   here.  Add a tree item to cover the error and go on.  Note
 *   that we make sure we don't go off the end of the bleedin packet here!
 *
 *   This is just a copy of isis.c and isis.h, so I keep the stuff also
 *   and adapt the names to cover possible protocol errors! Ive really no
 *   idea whether I need this or not.
 *
 * Input
 *   tvbuff_t *      : tvbuff with packet data.
 *   proto_tree *    : tree of display data.  May be NULL.
 *   char *          : format text
 *   subsequent args : arguments to format
 *
 * Output:
 *   void (may modify proto tree)
 */
static void
esis_dissect_unknown( tvbuff_t *tvb, proto_tree *tree, const char *fmat, ...){
  va_list ap;

  va_start(ap, fmat);
  proto_tree_add_text_valist(tree, tvb, 0, -1, fmat, ap);
  va_end(ap);
}
示例#2
0
proto_item *
proto_tree_add_expert_format(proto_tree *tree, packet_info *pinfo, expert_field* expindex,
		tvbuff_t *tvb, gint start, gint length, const char *format, ...)
{
	va_list ap;
	expert_field_info* eiinfo;
	proto_item *ti;

	/* Look up the item */
	EXPERT_REGISTRAR_GET_NTH(expindex->ei, eiinfo);

	va_start(ap, format);
	ti = proto_tree_add_text_valist(tree, tvb, start, length, format, ap);
	va_end(ap);

	va_start(ap, format);
	expert_set_info_vformat(pinfo, ti, eiinfo->group, eiinfo->severity, *eiinfo->hf_info.p_id, TRUE, format, ap);
	va_end(ap);

	return ti;
}