Ethereal-dev: [Ethereal-dev] lightening libethereals dependencies
Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.
From: Ed Warnicke <hagbard@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 20 Mar 2001 23:11:25 -0500 (EST)
I've moved some of the utilites that are in dissectors that packet.c depends on into some utility modules in the epan directory. In particular I've moved some utilities from packet-sna and packet-atalk into epan/atalk-utils.{c,h} and epan/sna-utils.{c,h}. Find attached a patch and a tarball containing the new files. This renders packet-sna.h and packet-atalk.h unnecessary. Have a look and if it looks good please check in these changes. Ed
? epan/atalk-utils.h ? epan/atalk-utils.c ? epan/sna-utils.h ? epan/config.cache ? epan/sna-utils.c Index: Makefile.am =================================================================== RCS file: /cvsroot/ethereal/Makefile.am,v retrieving revision 1.293 diff -u -r1.293 Makefile.am --- Makefile.am 2001/03/18 03:34:22 1.293 +++ Makefile.am 2001/03/21 04:02:46 @@ -240,7 +240,6 @@ packet-afs-register-info.h \ packet-afs-defs.h \ packet-arp.h \ - packet-atalk.h \ packet-bgp.h \ packet-bootparams.h \ packet-chdlc.h \ @@ -297,7 +296,6 @@ packet-smb-logon.h \ packet-smb-mailslot.h \ packet-smb-pipe.h \ - packet-sna.h \ packet-snmp.h \ packet-sscop.h \ packet-stat.h \ Index: packet-atalk.c =================================================================== RCS file: /cvsroot/ethereal/packet-atalk.c,v retrieving revision 1.51 diff -u -r1.51 packet-atalk.c --- packet-atalk.c 2001/03/15 09:11:00 1.51 +++ packet-atalk.c 2001/03/21 04:02:46 @@ -34,10 +34,10 @@ #include <glib.h> #include "packet.h" -#include "packet-atalk.h" #include "etypes.h" #include "ppptypes.h" #include "aftypes.h" +#include "atalk-utils.h" static int proto_ddp = -1; static int hf_ddp_hopcount = -1; @@ -103,24 +103,6 @@ } e_ddp; #define DDP_HEADER_SIZE 13 - -gchar * -atalk_addr_to_str(const struct atalk_ddp_addr *addrp) -{ - static gchar str[3][14]; - static gchar *cur; - - if (cur == &str[0][0]) { - cur = &str[1][0]; - } else if (cur == &str[1][0]) { - cur = &str[2][0]; - } else { - cur = &str[0][0]; - } - - sprintf(cur, "%u.%u:%u", addrp->net, addrp->node, addrp->port); - return cur; -} static const value_string op_vals[] = { {DDP_RTMPDATA, "AppleTalk Routing Table response or data" }, Index: packet-eigrp.c =================================================================== RCS file: /cvsroot/ethereal/packet-eigrp.c,v retrieving revision 1.12 diff -u -r1.12 packet-eigrp.c --- packet-eigrp.c 2001/01/22 03:33:45 1.12 +++ packet-eigrp.c 2001/03/21 04:02:46 @@ -40,7 +40,7 @@ #include "packet.h" #include "resolv.h" -#include "packet-atalk.h" +#include "atalk-utils.h" #include "packet-ip.h" #include "packet-ipx.h" Index: packet-llc.c =================================================================== RCS file: /cvsroot/ethereal/packet-llc.c,v retrieving revision 1.82 diff -u -r1.82 packet-llc.c --- packet-llc.c 2001/01/21 22:51:46 1.82 +++ packet-llc.c 2001/03/21 04:02:46 @@ -43,7 +43,7 @@ #include "packet-ipx.h" #include "packet-netbios.h" #include "packet-osi.h" -#include "packet-sna.h" +#include "sna-utils.h" #include "packet-llc.h" Index: packet-null.c =================================================================== RCS file: /cvsroot/ethereal/packet-null.c,v retrieving revision 1.40 diff -u -r1.40 packet-null.c --- packet-null.c 2001/01/22 00:20:29 1.40 +++ packet-null.c 2001/03/21 04:02:47 @@ -41,7 +41,7 @@ #include <string.h> #include "packet.h" #include "packet-null.h" -#include "packet-atalk.h" +#include "atalk-utils.h" #include "packet-ip.h" #include "packet-ipv6.h" #include "packet-ipx.h" Index: packet-ppp.c =================================================================== RCS file: /cvsroot/ethereal/packet-ppp.c,v retrieving revision 1.56 diff -u -r1.56 packet-ppp.c --- packet-ppp.c 2001/03/15 09:11:01 1.56 +++ packet-ppp.c 2001/03/21 04:02:48 @@ -38,7 +38,7 @@ #include "packet-ppp.h" #include "ppptypes.h" #include "etypes.h" -#include "packet-atalk.h" +#include "atalk-utils.h" #include "packet-chdlc.h" #include "packet-ip.h" #include "packet-ipv6.h" Index: packet-sna.c =================================================================== RCS file: /cvsroot/ethereal/packet-sna.c,v retrieving revision 1.26 diff -u -r1.26 packet-sna.c --- packet-sna.c 2001/03/13 21:34:24 1.26 +++ packet-sna.c 2001/03/21 04:02:49 @@ -35,7 +35,7 @@ #include <glib.h> #include "packet.h" #include "llcsaps.h" -#include "packet-sna.h" +#include "sna-utils.h" /* * http://www.wanresources.com/snacell.html @@ -548,26 +548,6 @@ proto_tree_add_item(tree, hf_sna_th_lsid, tvb, 1, 1, FALSE); return bytes_in_header; -} - -/* FID Type 4 */ - -gchar * -sna_fid_type_4_addr_to_str(const struct sna_fid_type_4_addr *addrp) -{ - static gchar str[3][14]; - static gchar *cur; - - if (cur == &str[0][0]) { - cur = &str[1][0]; - } else if (cur == &str[1][0]) { - cur = &str[2][0]; - } else { - cur = &str[0][0]; - } - - sprintf(cur, "%08X.%04X", addrp->saf, addrp->ef); - return cur; } static int Index: epan/Makefile.am =================================================================== RCS file: /cvsroot/ethereal/epan/Makefile.am,v retrieving revision 1.16 diff -u -r1.16 Makefile.am --- Makefile.am 2001/02/01 20:21:15 1.16 +++ Makefile.am 2001/03/21 04:02:49 @@ -35,6 +35,8 @@ INCLUDES = -I$(srcdir)/.. libethereal_a_SOURCES = \ + atalk-utils.c \ + atalk-utils.h \ bitswap.c \ bitswap.h \ conversation.c \ @@ -58,6 +60,8 @@ proto.h \ resolv.c \ resolv.h \ + sna-utils.c \ + sna-utils.h \ strutil.c \ strutil.h \ tvbuff.c \ Index: epan/packet.c =================================================================== RCS file: /cvsroot/ethereal/epan/packet.c,v retrieving revision 1.21 diff -u -r1.21 packet.c --- packet.c 2001/03/15 06:41:13 1.21 +++ packet.c 2001/03/21 04:02:50 @@ -73,10 +73,10 @@ #include "timestamp.h" #include "file.h" -#include "packet-atalk.h" -#include "packet-frame.h" -#include "packet-ipv6.h" -#include "packet-sna.h" +#include "atalk-utils.h" +#include "packet-frame.h" +#include "packet-ipv6.h" +#include "sna-utils.h" #include "packet-vines.h" #include "packet-osi.h"
Attachment:
atalk_and_sna.tar.gz
Description: Binary data
- Follow-Ups:
- Re: [Ethereal-dev] lightening libethereals dependencies
- From: Guy Harris
- Re: [Ethereal-dev] lightening libethereals dependencies
- Prev by Date: Re: [Ethereal-dev] Fw: RFC :)
- Next by Date: Re: [Ethereal-dev] tvb and dissector question.
- Previous by thread: Re: [Ethereal-dev] Fw: RFC :)
- Next by thread: Re: [Ethereal-dev] lightening libethereals dependencies
- Index(es):