xorp

timer_const.hh

00001 // -*- c-basic-offset: 4; tab-width: 8; indent-tabs-mode: t -*-
00002 
00003 // Copyright (c) 2001-2009 XORP, Inc.
00004 //
00005 // This program is free software; you can redistribute it and/or modify
00006 // it under the terms of the GNU General Public License, Version 2, June
00007 // 1991 as published by the Free Software Foundation. Redistribution
00008 // and/or modification of this program under the terms of any other
00009 // version of the GNU General Public License is not permitted.
00010 // 
00011 // This program is distributed in the hope that it will be useful, but
00012 // WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For more details,
00014 // see the GNU General Public License, Version 2, a copy of which can be
00015 // found in the XORP LICENSE.gpl file.
00016 // 
00017 // XORP Inc, 2953 Bunker Hill Lane, Suite 204, Santa Clara, CA 95054, USA;
00018 // http://xorp.net
00019 
00020 // $XORP: xorp/bgp/timer_const.hh,v 1.10 2008/10/02 21:56:23 bms Exp $
00021 
00022 #ifndef __BGP_TIMER_CONST_HH__
00023 #define __BGP_TIMER_CONST_HH__
00024 
00025 #include <sys/types.h>
00026 #include "libxorp/debug.h"
00027 class BGPTimerConst 
00028 {
00029 public:
00030     BGPTimerConst()             {
00031         _hold_duration = 90;
00032         _retry_duration = 120;
00033         _keepalive_duration = 30;
00034     }
00035 
00036     uint32_t get_hold_duration()        { return _hold_duration; }
00037     void set_hold_duration(uint32_t d)      { _hold_duration = d; }
00038     uint32_t get_retry_duration()       { return _retry_duration; }
00039     void set_retry_duration(uint32_t d)     { _retry_duration = d; }
00040     uint32_t get_keepalive_duration()       { return _keepalive_duration; }
00041     void set_keepalive_duration(uint32_t d) { _keepalive_duration = d; }
00042 private:
00043     // In seconds.
00044     uint32_t _hold_duration;
00045     uint32_t _retry_duration;
00046     uint32_t _keepalive_duration;
00047 };
00048 
00049 #endif  // __BGP_TIMER_CONST_HH__
 All Classes Namespaces Functions Variables Typedefs Enumerations