Ethereal-dev: Re: [Ethereal-dev] Tacacs Dissector for 0.9.15

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

From: Emanuele Caratti <wiz@xxxxxxxxx>
Date: Sun, 28 Sep 2003 10:47:20 +0200
On Mon, Sep 22, 2003 at 08:37:19PM -0700, Guy Harris wrote:

I've removed ( via ifdef ) the tacplus_acct_flags variable, and removed the
CLEANUP_* calls.
The diff is againt the current CVS, the one with the bcopy fix ( sorry for
that.. :) ).

> >Different RAS have different password with the same tacacs+ server, so 
> >it's
> >possible to have the need of different tacpluskey....
> >Where can I look for some hint about implementing this feature ?
> >It's possible to have a kind of popup to add the password to the tcp 
> >stream ?
> 
> Well, the first hint is that we don't have any mechanism for attaching 
> data, via the GUI, to a conversation, so you'd have to implement that 
> mechanism, first.
> 
> You might want to use code similar to what's used for the global 
> preferences, so that a dissector would just register a set of 
> per-conversation settings, and common GUI code would be used to let the 
> user set them - a dissector can't itself have any GUI code, as it would 
> have to work in Tethereal as well.

Ok... I think I'll start with something like:
<tac_server_ip/tac_client_ip=key> [[,<tac_server_ip/tac_client_ip=key>]..]

in the preference and then try to understand and use the conversation...


-- 
Ciao,
 Emanuele
--- /.1/cvs-mirror/ethereal/packet-tacacs.h	2003-09-20 11:41:48.000000000 +0200
+++ packet-tacacs.h	2003-09-26 07:44:17.000000000 +0200
@@ -414,11 +414,13 @@
 	{TAC_PLUS_ACCT_STATUS_FOLLOW,	"Follow"},
 	{0, NULL}};
 
+#ifdef __TAC_ACCOUNTING__
 static value_string tacplus_acct_flags[] = {
 	{TAC_PLUS_ACCT_FLAG_MORE,	"More (deprecated)"},
 	{TAC_PLUS_ACCT_FLAG_START,	"Start"},
 	{TAC_PLUS_ACCT_FLAG_STOP,	"Stop"},
 	{TAC_PLUS_ACCT_FLAG_WATCHDOG,"Update"},
 	{0, NULL}};
+#endif
 
 #endif   /* __PACKET_TACACS_H__ */
--- /.1/cvs-mirror/ethereal/packet-tacacs.c	2003-09-26 07:43:10.000000000 +0200
+++ packet-tacacs.c	2003-09-26 07:46:59.000000000 +0200
@@ -945,7 +946,6 @@
 	
 	md5_buff = (md5_byte_t*)g_malloc(md5_len+MD5_LEN);
 
-	CLEANUP_PUSH( g_free, md5_buff );
 
 	mdp = md5_buff;
 	*(guint32*)mdp = *(guint32*)session_id;
@@ -974,5 +974,5 @@
 		md5_append(&mdcontext, md5_buff, md5_len);
 		md5_finish(&mdcontext,hash);
 	}
-	CLEANUP_CALL_AND_POP;
+	g_free( md5_buff );
 }