Ethereal-cvs: [Ethereal-cvs] cvs commit: ethereal packet-eap.c packet-radius.c

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

From: Guy Harris <guy@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 26 Feb 2002 05:55:38 -0600 (CST)
guy         2002/02/26 05:55:38 CST

  Modified files:
    .                    packet-eap.c packet-radius.c 
  Log:
  Allow dissectors to be registered as "old-style" or "new-style"
  dissectors.  "Old-style" dissectors return nothing.  "New-style"
  dissectors return one of:
  
  	a positive integer, giving the number of bytes worth of data in
  	the tvbuff that it considered to be part of the PDU in the
  	tvbuff;
  
  	zero, if it didn't consider the data in the tvbuff to be a PDU
  	for its protocol;
  
  	a negative integer, giving the number of additional bytes worth
  	of data in needs to get the complete PDU (for use with
  	fragmentation/segmentation when the length of the PDU isn't
  	known to the protocol atop the one the dissector is dissecting).
  
  Have "call_dissector()" return the return value of new-style dissectors,
  and the length of the tvbuff handed to it for old-style dissectors.
  
  Have "dissector_try_port()" return FALSE if the subdissector is a
  new-style dissector and returned 0.
  
  Make the EAP dissector a new-style dissector, and have a "EAP fragment"
  dissector that is also a new-style dissector and handles fragmentation
  of EAP messages (as happens above, for example, RADIUS).  Also, clean up
  some signed vs. unsigned comparison problems.
  
  Reassemble EAP-Message AVPs in RADIUS.
  
  Revision  Changes    Path
  1.15      +34 -10    ethereal/packet-eap.c
  1.49      +161 -55   ethereal/packet-radius.c