From: g0dil Date: Tue, 30 Jun 2009 08:34:18 +0000 (+0000) Subject: Packets: Add MPLSPacket image X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=e3ac07a9414a45b50eac1cced35502154128d1ca;p=senf.git Packets: Add MPLSPacket image doclib: Fix pkgdraw list field parsing git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1249 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/Packets/DefaultBundle/MPLSPacket.hh b/Packets/DefaultBundle/MPLSPacket.hh index 8ee0a1c..5413f3b 100644 --- a/Packets/DefaultBundle/MPLSPacket.hh +++ b/Packets/DefaultBundle/MPLSPacket.hh @@ -39,6 +39,8 @@ namespace senf { Parser implementing an MPLS header. + \image html MPLSPacket.png + \see MPLSPacketType */ struct MPLSPacketParser : public PacketParserBase diff --git a/Packets/SConscript b/Packets/SConscript index 5039f22..1732162 100644 --- a/Packets/SConscript +++ b/Packets/SConscript @@ -56,6 +56,7 @@ SENFSCons.Doxygen(env, extra_sources = [ env.PkgDraw("MPEGDVBBundle/MPESection.hh"), env.PkgDraw("MPEGDVBBundle/SNDUPacket.hh"), env.PkgDraw("MPEGDVBBundle/TransportPacket.hh"), + env.PkgDraw("DefaultBundle/MPLSPacket.hh"), ]) SENFSCons.InstallIncludeFiles(env, includes) diff --git a/doclib/dot b/doclib/dot index 4ec3c34..c6bdbe4 100755 --- a/doclib/dot +++ b/doclib/dot @@ -7,7 +7,7 @@ if head -4 "$1" | grep -q nomunge; then fi sed -i -e 's/rankdir=LR/rankdir=TB/' "$1" "$topdir/doclib/dot-munge.pl" "$1" -unflatten -l3 -c3 -f -o "$1".unflat "$1" +unflatten -l2 -c2 -f -o "$1".unflat "$1" mv "$1".unflat "$1" case "$2" in diff --git a/doclib/pkgdraw b/doclib/pkgdraw index 4f80472..efff924 100755 --- a/doclib/pkgdraw +++ b/doclib/pkgdraw @@ -304,6 +304,7 @@ def parse_VECTOR(args, flags): sys.stderr.write("Failed to aprse VECTOR: %s\n" % args) return None field = dict(FIELD_TYPES.get(args[-1].split(':')[-1], {})) + print args,repr(field); field['name'] = args[0] field['repeat'] = True return field @@ -400,15 +401,21 @@ def scanPackets(data): packetOrder.append(name) minsize = maxsize = 0 for field in packets[name]: - if field.get('size', None) is not None: - maxsize += field['size'] - elif field.get('minsize', None) is not None: - maxsize += field['maxsize'] + if maxsize is not None: + if field.get('repeat', False): + maxsize = None + elif field.get('size', None) is not None: + maxsize += field['size'] + elif field.get('minsize', None) is not None: + maxsize += field['maxsize'] + else: + maxsize = None if not field.get('optional', False): if field.get('size', None) is not None: minsize += field['size'] elif field.get('minsize', None) is not None: minsize += field['minsize'] + print name,minsize,maxsize if minsize is not None and maxsize is not None: if minsize == maxsize: FIELD_TYPES[name] = { 'size' : minsize }