Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 06 Oct 2006 06:26:00 -0500
From:      Martin McCormick <martin@dc.cis.okstate.edu>
To:        freebsd-questions@freebsd.org
Subject:   A Question of How to Handle Numerical Notation
Message-ID:  <200610061126.k96BQ0KO004716@dc.cis.okstate.edu>

Next in thread | Raw E-Mail | Index | Archive | Help
	I am writing a program on a UNIX system to munch the text
output of a Cisco VOIP call manager and turn those data in to
something that looks like the output of our hard-wired PBX.
Fortunately, the data we need are a subset of all the data available
so the main problem is simply that of reformatting most of the
information.  There is, however, one nasty little problem I have
discovered.

	Both the UNIX and Cisco platforms handle time and date
functions using unsigned 32-bit integers.  No problem there.  The
times are based upon the number of seconds since the epoch of January
1, 1970 in GMT or UTC.  That's great.  I discovered soon, however,
that there is an extra wrinkle that really messes things up quite a
bit.

	The Cisco call manager outputs the hexadecimal form of 3
values in something that initially looks like good old hex but is good
old hex being used to convey some form of notation, probably like
scientific notation, that one must decode in order to get the actual
hex values needed to recover the data.

	All we know for sure is that this has something to do with SQL
and Microsoft.  After all, everybody uses Microsoft and UNIX doesn't
even exist, right?

	Does anybody know what this notation is called?  Does an
explanation of the algorithm exist in public so one can convert the
strings that are part of the call manager output in to the unsigned
ints that actually carry the right values?

	An example of the string in question looks like:

"370A65FA-6965-4E40-A0DA-EC88DE6B"

	I appreciate any constructive suggestions, anything from what
this notation is called to a description of how to process the 5
values.  That would make writing C code possible to convert them in to
the actual binary string that contains the data we need.  Are
there any FreeBSD libraries we can use to help the process along?

	I am sure this notation has a name, but not knowing it,
makes searching for information about it rather difficult.

	Many thanks.

Martin McCormick WB5AGZ  Stillwater, OK 
Systems Engineer
OSU Information Technology Department Network Operations Group



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?200610061126.k96BQ0KO004716>