[Xorp-hackers] [PATCH] Support for IEEE754 binary64 format in XRLs

Ben Greear greearb at candelatech.com
Wed Aug 31 08:18:54 PDT 2011


On 08/31/2011 04:55 AM, ss at comp.lancs.ac.uk wrote:
> From: Steven Simpson<ss at comp.lancs.ac.uk>

See comments inline below.

> diff --git a/xorp/libxipc/SConscript b/xorp/libxipc/SConscript
> index 104bc8e..e7cf973 100644
> --- a/xorp/libxipc/SConscript
> +++ b/xorp/libxipc/SConscript
> @@ -87,6 +87,7 @@ libxipc_sources = [
>       'xrl_std_router.cc',
>       'xrl_tokens.cc',
>       'xuid.cc',				# only for udp (and fea tcpudp mgr)
> +    'fp64serial.c',
>       ]

It should be a .cc file I think.

>
>   # deal with shared objects
> diff --git a/xorp/libxipc/fp64.h b/xorp/libxipc/fp64.h
> new file mode 100644
> index 0000000..8e49a19
> --- /dev/null
> +++ b/xorp/libxipc/fp64.h
> @@ -0,0 +1,198 @@
> +// -*- c-basic-offset: 4; tab-width: 8; indent-tabs-mode: t -*-
> +// vim:set sts=4 ts=8:
> +
> +// Copyright (c) 2001-2011 XORP, Inc and Others
> +//
> +// This program is free software; you can redistribute it and/or modify
> +// it under the terms of the GNU Lesser General Public License, Version
> +// 2.1, June 1999 as published by the Free Software Foundation.
> +// Redistribution and/or modification of this program under the terms of
> +// any other version of the GNU Lesser General Public License is not
> +// permitted.
> +//
> +// This program is distributed in the hope that it will be useful, but
> +// WITHOUT ANY WARRANTY; without even the implied warranty of
> +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For more details,
> +// see the GNU Lesser General Public License, Version 2.1, a copy of
> +// which can be found in the XORP LICENSE.lgpl file.
> +//
> +// XORP, Inc, 2953 Bunker Hill Lane, Suite 204, Santa Clara, CA 95054, USA;
> +// http://xorp.net
> +
> +// $XORP: xorp/libxipc/xrl_atom.hh,v 1.23 2008/10/30 20:49:07 pavlin Exp $

Please just remove the previous line.

In general, I'm amazed at how much code this took, but from skimming through
it quickly, I didn't notice any issues.  I guess floating-point serialization
is just a pain in the arse to do right!

Thanks,
Ben

-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



More information about the Xorp-hackers mailing list