Ethereal-cvs: [ethereal-cvs] cvs commit: ethereal packet-cdp.c proto.c proto.h

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Fri, 21 Jan 2000 23:00:02 -0600 (CST)
guy         2000/01/21 22:59:58 CST

  Modified files:
    .                    packet-cdp.c proto.c proto.h 
  Log:
  Add "proto_item_set_text()", which sets the "representation" field of an
  existing protocol tree item.
  
  Add "proto_tree_add_notext()"; it's just like "proto_tree_add_text()",
  but without the text, and it sets the "representation" field to NULL;
  that field would be set later with "proto_item_set_text()".
  
  Those routines let you construct, for example, an interior node of the
  protocol tree whose text can't be determined until all the nodes under
  it have been dissected - it's similar to "proto_item_set_len()" in that
  fashion.
  
  Use that when dissecting address TLVs in the CDP dissector - create the
  item for an address in an "Addresses" TLV with no text, and then fill in
  the items under it one at a time; if we get cut off before we get to the
  actual address, set the text to "Truncated address", otherwise set it to
  a description of the address.
  
  Also, set the length of the item for the entire address TLV correctly.
  
  Revision  Changes    Path
  1.20      +41 -90    ethereal/packet-cdp.c
  1.52      +33 -2     ethereal/proto.c
  1.21      +7 -1      ethereal/proto.h