2 ** NetXMS - Network Management System
3 ** SNMP support library
4 ** Copyright (C) 2003-2010 Victor Kirhenshtein
6 ** This program is free software; you can redistribute it and/or modify
7 ** it under the terms of the GNU Lesser General Public License as published by
8 ** the Free Software Foundation; either version 3 of the License, or
9 ** (at your option) any later version.
11 ** This program is distributed in the hope that it will be useful,
12 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ** GNU General Public License for more details.
16 ** You should have received a copy of the GNU Lesser General Public License
17 ** along with this program; if not, write to the Free Software
18 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 #include "libnxsnmp.h"
31 SNMP_Engine
::SNMP_Engine()
38 SNMP_Engine
::SNMP_Engine(BYTE
*id
, int idLen
, int engineBoots
, int engineTime
)
40 m_idLen
= min(idLen
, SNMP_MAX_ENGINEID_LEN
);
41 memcpy(m_id
, id
, m_idLen
);
42 m_engineBoots
= engineBoots
;
43 m_engineTime
= engineTime
;
46 SNMP_Engine
::SNMP_Engine(SNMP_Engine
*src
)
48 m_idLen
= src
->m_idLen
;
49 memcpy(m_id
, src
->m_id
, m_idLen
);
50 m_engineBoots
= src
->m_engineBoots
;
51 m_engineTime
= src
->m_engineTime
;
59 SNMP_Engine
::~SNMP_Engine()