00001 /* 00002 * Copyright 2007 Intel Corporation 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00017 #ifndef _DTLSR_CONFIG_H_ 00018 #define _DTLSR_CONFIG_H_ 00019 00020 #include <string> 00021 #include <oasys/compat/inttypes.h> 00022 #include <oasys/util/Options.h> 00023 #include <oasys/util/Singleton.h> 00024 00025 namespace dtn { 00026 00030 class DTLSRConfig : public oasys::Singleton<DTLSRConfig> { 00031 public: 00035 DTLSRConfig(); 00036 00040 std::string area_; 00041 00045 typedef enum { 00046 COST, 00047 DELAY, 00048 ESTIMATED_DELAY 00049 } weight_fn_t; 00050 00054 static const char* weight_fn_to_str(weight_fn_t f); 00055 00059 static oasys::EnumOpt::Case weight_opts_[]; 00060 00064 weight_fn_t weight_fn_; 00065 00069 u_int weight_shift_; 00070 00076 double uptime_factor_; 00077 00082 bool keep_down_links_; 00083 00090 u_int recompute_delay_; 00091 00096 u_int aging_interval_; 00097 00102 u_int lsa_interval_; 00103 00108 u_int min_lsa_interval_; 00109 00114 u_int lsa_lifetime_; 00115 }; 00116 00117 } // namespace dtn 00118 00119 #endif /* _DTLSR_CONFIG_ */