00001 /* 00002 * License Agreement 00003 * 00004 * NOTICE 00005 * This software (or technical data) was produced for the U. S. 00006 * Government under contract W15P7T-05-C-F600, and is 00007 * subject to the Rights in Data-General Clause 52.227-14 (JUNE 1987) 00008 * 00009 * Copyright (C) 2006. The MITRE Corporation (http://www.mitre.org/). 00010 * All Rights Reserved. 00011 * 00012 * Redistribution and use in source and binary forms, with or without 00013 * modification, are permitted provided that the following conditions 00014 * are met: 00015 * 00016 * * Redistributions of source code must retain the above copyright 00017 * notice, this list of conditions and the following disclaimer. 00018 * 00019 * * Redistributions in binary form must reproduce the above copyright 00020 * notice, this list of conditions and the following disclaimer in the 00021 * documentation and/or other materials provided with the distribution. 00022 * 00023 * * The US Government will not be charged any license fee and/or 00024 * royalties related to this software. 00025 * 00026 * * Neither name of The MITRE Corporation; nor the names of its 00027 * contributors may be used to endorse or promote products derived from 00028 * this software without specific prior written permission. 00029 * 00030 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00031 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00032 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 00033 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 00034 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 00035 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 00036 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 00037 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 00038 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 00039 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 00040 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00041 */ 00042 00043 #include "ForwardingInfo.h" 00044 00045 namespace dtn { 00046 00047 void 00048 ForwardingInfo::serialize(oasys::SerializeAction *a) 00049 { 00050 a->process("state", &state_); 00051 a->process("action", &action_); 00052 a->process("clayer", &clayer_); 00053 a->process("nextHop", &nexthop_); 00054 00055 // casting won't be necessary after port to oasys::Time 00056 a->process("timestamp_sec", 00057 reinterpret_cast< u_int32_t * >(×tamp_.tv_sec)); 00058 a->process("timestamp_usec", 00059 reinterpret_cast< u_int32_t * >(×tamp_.tv_usec)); 00060 } 00061 00062 } // namespace dtn