snmp_common.h File Reference

Definitions common to SNMP agent and SNMP manager. More...

#include "core/net.h"

Go to the source code of this file.

Macros

#define SNMP_V1_SUPPORT   ENABLED
 
#define SNMP_V2C_SUPPORT   ENABLED
 
#define SNMP_V3_SUPPORT   DISABLED
 
#define SNMP_MAX_MSG_SIZE   1452
 
#define SNMP_MAX_CONTEXT_ENGINE_SIZE   32
 
#define SNMP_MAX_CONTEXT_NAME_LEN   32
 
#define SNMP_MAX_USER_NAME_LEN   32
 
#define SNMP_MAX_PUBLIC_VALUE_SIZE   32
 
#define SNMP_MAX_GROUP_NAME_LEN   32
 
#define SNMP_MAX_VIEW_NAME_LEN   32
 
#define SNMP_MAX_BIT_MASK_SIZE   16
 
#define SNMP_MAX_OID_SIZE   16
 
#define SNMP_PORT   161
 
#define SNMP_TRAP_PORT   162
 

Enumerations

enum  SnmpVersion { SNMP_VERSION_1 = 0, SNMP_VERSION_2C = 1, SNMP_VERSION_3 = 3 }
 SNMP version identifiers. More...
 
enum  SnmpPduType {
  SNMP_PDU_GET_REQUEST = 0, SNMP_PDU_GET_NEXT_REQUEST = 1, SNMP_PDU_GET_RESPONSE = 2, SNMP_PDU_SET_REQUEST = 3,
  SNMP_PDU_TRAP = 4, SNMP_PDU_GET_BULK_REQUEST = 5, SNMP_PDU_INFORM_REQUEST = 6, SNMP_PDU_TRAP_V2 = 7,
  SNMP_PDU_REPORT = 8
}
 SNMP PDU types. More...
 
enum  SnmpGenericTrapType {
  SNMP_TRAP_COLD_START = 0, SNMP_TRAP_WARM_START = 1, SNMP_TRAP_LINK_DOWN = 2, SNMP_TRAP_LINK_UP = 3,
  SNMP_TRAP_AUTH_FAILURE = 4, SNMP_TRAP_EGP_NEIGHBOR_LOSS = 5, SNMP_TRAP_ENTERPRISE_SPECIFIC = 6
}
 SNMP generic trap types. More...
 
enum  SnmpErrorStatus {
  SNMP_ERROR_NONE = 0, SNMP_ERROR_TOO_BIG = 1, SNMP_ERROR_NO_SUCH_NAME = 2, SNMP_ERROR_BAD_VALUE = 3,
  SNMP_ERROR_READ_ONLY = 4, SNMP_ERROR_GENERIC = 5, SNMP_ERROR_NO_ACCESS = 6, SNMP_ERROR_WRONG_TYPE = 7,
  SNMP_ERROR_WRONG_LENGTH = 8, SNMP_ERROR_WRONG_ENCODING = 9, SNMP_ERROR_WRONG_VALUE = 10, SNMP_ERROR_NO_CREATION = 11,
  SNMP_ERROR_INCONSISTENT_VALUE = 12, SNMP_ERROR_RESOURCE_UNAVAILABLE = 13, SNMP_ERROR_COMMIT_FAILED = 14, SNMP_ERROR_UNDO_FAILED = 15,
  SNMP_ERROR_AUTHORIZATION = 16, SNMP_ERROR_NOT_WRITABLE = 17, SNMP_ERROR_INCONSISTENT_NAME = 18
}
 SNMP error status. More...
 
enum  SnmpException { SNMP_EXCEPTION_NO_SUCH_OBJECT = 0, SNMP_EXCEPTION_NO_SUCH_INSTANCE = 1, SNMP_EXCEPTION_END_OF_MIB_VIEW = 2 }
 SNMP exceptions. More...
 
enum  SnmpEngineIdFormat {
  SNMP_ENGINE_ID_FORMAT_IPV4 = 1, SNMP_ENGINE_ID_FORMAT_IPV6 = 2, SNMP_ENGINE_ID_FORMAT_MAC = 3, SNMP_ENGINE_ID_FORMAT_TEXT = 4,
  SNMP_ENGINE_ID_FORMAT_OCTETS = 5
}
 SNMP engine ID format. More...
 

Detailed Description

Definitions common to SNMP agent and SNMP manager.

License

SPDX-License-Identifier: GPL-2.0-or-later

Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.

This file is part of CycloneTCP Open.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

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. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
2.4.4

Definition in file snmp_common.h.

Macro Definition Documentation

◆ SNMP_MAX_BIT_MASK_SIZE

#define SNMP_MAX_BIT_MASK_SIZE   16

Definition at line 109 of file snmp_common.h.

◆ SNMP_MAX_CONTEXT_ENGINE_SIZE

#define SNMP_MAX_CONTEXT_ENGINE_SIZE   32

Definition at line 67 of file snmp_common.h.

◆ SNMP_MAX_CONTEXT_NAME_LEN

#define SNMP_MAX_CONTEXT_NAME_LEN   32

Definition at line 74 of file snmp_common.h.

◆ SNMP_MAX_GROUP_NAME_LEN

#define SNMP_MAX_GROUP_NAME_LEN   32

Definition at line 95 of file snmp_common.h.

◆ SNMP_MAX_MSG_SIZE

#define SNMP_MAX_MSG_SIZE   1452

Definition at line 60 of file snmp_common.h.

◆ SNMP_MAX_OID_SIZE

#define SNMP_MAX_OID_SIZE   16

Definition at line 116 of file snmp_common.h.

◆ SNMP_MAX_PUBLIC_VALUE_SIZE

#define SNMP_MAX_PUBLIC_VALUE_SIZE   32

Definition at line 88 of file snmp_common.h.

◆ SNMP_MAX_USER_NAME_LEN

#define SNMP_MAX_USER_NAME_LEN   32

Definition at line 81 of file snmp_common.h.

◆ SNMP_MAX_VIEW_NAME_LEN

#define SNMP_MAX_VIEW_NAME_LEN   32

Definition at line 102 of file snmp_common.h.

◆ SNMP_PORT

#define SNMP_PORT   161

Definition at line 122 of file snmp_common.h.

◆ SNMP_TRAP_PORT

#define SNMP_TRAP_PORT   162

Definition at line 124 of file snmp_common.h.

◆ SNMP_V1_SUPPORT

#define SNMP_V1_SUPPORT   ENABLED

Definition at line 39 of file snmp_common.h.

◆ SNMP_V2C_SUPPORT

#define SNMP_V2C_SUPPORT   ENABLED

Definition at line 46 of file snmp_common.h.

◆ SNMP_V3_SUPPORT

#define SNMP_V3_SUPPORT   DISABLED

Definition at line 53 of file snmp_common.h.

Enumeration Type Documentation

◆ SnmpEngineIdFormat

SNMP engine ID format.

Enumerator
SNMP_ENGINE_ID_FORMAT_IPV4 
SNMP_ENGINE_ID_FORMAT_IPV6 
SNMP_ENGINE_ID_FORMAT_MAC 
SNMP_ENGINE_ID_FORMAT_TEXT 
SNMP_ENGINE_ID_FORMAT_OCTETS 

Definition at line 222 of file snmp_common.h.

◆ SnmpErrorStatus

SNMP error status.

Enumerator
SNMP_ERROR_NONE 
SNMP_ERROR_TOO_BIG 
SNMP_ERROR_NO_SUCH_NAME 
SNMP_ERROR_BAD_VALUE 
SNMP_ERROR_READ_ONLY 
SNMP_ERROR_GENERIC 
SNMP_ERROR_NO_ACCESS 
SNMP_ERROR_WRONG_TYPE 
SNMP_ERROR_WRONG_LENGTH 
SNMP_ERROR_WRONG_ENCODING 
SNMP_ERROR_WRONG_VALUE 
SNMP_ERROR_NO_CREATION 
SNMP_ERROR_INCONSISTENT_VALUE 
SNMP_ERROR_RESOURCE_UNAVAILABLE 
SNMP_ERROR_COMMIT_FAILED 
SNMP_ERROR_UNDO_FAILED 
SNMP_ERROR_AUTHORIZATION 
SNMP_ERROR_NOT_WRITABLE 
SNMP_ERROR_INCONSISTENT_NAME 

Definition at line 182 of file snmp_common.h.

◆ SnmpException

SNMP exceptions.

Enumerator
SNMP_EXCEPTION_NO_SUCH_OBJECT 
SNMP_EXCEPTION_NO_SUCH_INSTANCE 
SNMP_EXCEPTION_END_OF_MIB_VIEW 

Definition at line 210 of file snmp_common.h.

◆ SnmpGenericTrapType

SNMP generic trap types.

Enumerator
SNMP_TRAP_COLD_START 
SNMP_TRAP_WARM_START 
SNMP_TRAP_LINK_DOWN 
SNMP_TRAP_LINK_UP 
SNMP_TRAP_AUTH_FAILURE 
SNMP_TRAP_EGP_NEIGHBOR_LOSS 
SNMP_TRAP_ENTERPRISE_SPECIFIC 

Definition at line 166 of file snmp_common.h.

◆ SnmpPduType

SNMP PDU types.

Enumerator
SNMP_PDU_GET_REQUEST 
SNMP_PDU_GET_NEXT_REQUEST 
SNMP_PDU_GET_RESPONSE 
SNMP_PDU_SET_REQUEST 
SNMP_PDU_TRAP 
SNMP_PDU_GET_BULK_REQUEST 
SNMP_PDU_INFORM_REQUEST 
SNMP_PDU_TRAP_V2 
SNMP_PDU_REPORT 

Definition at line 148 of file snmp_common.h.

◆ SnmpVersion

SNMP version identifiers.

Enumerator
SNMP_VERSION_1 
SNMP_VERSION_2C 
SNMP_VERSION_3 

Definition at line 136 of file snmp_common.h.