Webserver+3d print

Dependents:   Nucleo

Embed: (wiki syntax)

« Back to documentation index

snmp_common.c File Reference

snmp_common.c File Reference

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

Go to the source code of this file.

Functions

void snmpInitMessage (SnmpMessage *message)
 Initialize a SNMP message.
error_t snmpComputeMessageOverhead (SnmpMessage *message)
 Compute SNMP message overhead.
error_t snmpParseMessageHeader (SnmpMessage *message)
 Parse SNMP message header.
error_t snmpWriteMessageHeader (SnmpMessage *message)
 Format SNMP message header.
error_t snmpParseCommunity (SnmpMessage *message)
 Parse community name.
error_t snmpWriteCommunity (SnmpMessage *message)
 Format community name.
error_t snmpParseGlobalData (SnmpMessage *message)
 Parse msgGlobalData field.
error_t snmpWriteGlobalData (SnmpMessage *message)
 Format msgGlobalData field.
error_t snmpParseSecurityParameters (SnmpMessage *message)
 Parse msgSecurityParameters field.
error_t snmpWriteSecurityParameters (SnmpMessage *message)
 Format msgSecurityParameters field.
error_t snmpParseScopedPdu (SnmpMessage *message)
 Parse scopedPDU field.
error_t snmpWriteScopedPdu (SnmpMessage *message)
 Format scopedPDU.
error_t snmpParsePduHeader (SnmpMessage *message)
 Parse PDU header.
error_t snmpWritePduHeader (SnmpMessage *message)
 Format PDU header.
error_t snmpEncodeInt32 (int32_t value, uint8_t *dest, size_t *length)
 Encode a 32-bit signed integer.
error_t snmpEncodeUnsignedInt32 (uint32_t value, uint8_t *dest, size_t *length)
 Encode a 32-bit unsigned integer.
error_t snmpEncodeUnsignedInt64 (uint64_t value, uint8_t *dest, size_t *length)
 Encode a 64-bit unsigned integer.
error_t snmpDecodeInt32 (const uint8_t *src, size_t length, int32_t *value)
 Decode a 32-bit signed integer.
error_t snmpDecodeUnsignedInt32 (const uint8_t *src, size_t length, uint32_t *value)
 Decode a 32-bit unsigned integer.
error_t snmpDecodeUnsignedInt64 (const uint8_t *src, size_t length, uint64_t *value)
 Decode a 64-bit unsigned integer.

Detailed Description

Functions common to SNMP agent and SNMP manager.

License

Copyright (C) 2010-2017 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:
1.7.6

Definition in file snmp_common.c.


Function Documentation

error_t snmpComputeMessageOverhead ( SnmpMessage message )

Compute SNMP message overhead.

Parameters:
[in]messagePointer to the SNMP message

Definition at line 124 of file snmp_common.c.

error_t snmpDecodeInt32 ( const uint8_t *  src,
size_t  length,
int32_t *  value 
)

Decode a 32-bit signed integer.

Parameters:
[in]srcBuffer that contains the encoded value
[in]lengthNumber of bytes to be processed
[out]valueResulting integer value
Returns:
Error code

Definition at line 1595 of file snmp_common.c.

error_t snmpDecodeUnsignedInt32 ( const uint8_t *  src,
size_t  length,
uint32_t *  value 
)

Decode a 32-bit unsigned integer.

Parameters:
[in]srcBuffer that contains the encoded value
[in]lengthNumber of bytes to be processed
[out]valueResulting integer value
Returns:
Error code

Definition at line 1631 of file snmp_common.c.

error_t snmpDecodeUnsignedInt64 ( const uint8_t *  src,
size_t  length,
uint64_t *  value 
)

Decode a 64-bit unsigned integer.

Parameters:
[in]srcBuffer that contains the encoded value
[in]lengthNumber of bytes to be processed
[out]valueResulting integer value
Returns:
Error code

Definition at line 1670 of file snmp_common.c.

error_t snmpEncodeInt32 ( int32_t  value,
uint8_t *  dest,
size_t *  length 
)

Encode a 32-bit signed integer.

Parameters:
[in]valueInteger value
[out]destBuffer where to encode the integer
[out]lengthTotal number of bytes that have been written
Returns:
Error code

Definition at line 1446 of file snmp_common.c.

error_t snmpEncodeUnsignedInt32 ( uint32_t  value,
uint8_t *  dest,
size_t *  length 
)

Encode a 32-bit unsigned integer.

Parameters:
[in]valueInteger value
[out]destBuffer where to encode the integer
[out]lengthTotal number of bytes that have been written
Returns:
Error code

Definition at line 1495 of file snmp_common.c.

error_t snmpEncodeUnsignedInt64 ( uint64_t  value,
uint8_t *  dest,
size_t *  length 
)

Encode a 64-bit unsigned integer.

Parameters:
[in]valueInteger value
[out]destBuffer where to encode the integer
[out]lengthTotal number of bytes that have been written
Returns:
Error code

Definition at line 1545 of file snmp_common.c.

void snmpInitMessage ( SnmpMessage message )

Initialize a SNMP message.

Parameters:
[in]messagePointer to the SNMP message

Definition at line 49 of file snmp_common.c.

error_t snmpParseCommunity ( SnmpMessage message )

Parse community name.

Parameters:
[in,out]messagePointer to the incoming SNMP message
Returns:
Error code

Definition at line 327 of file snmp_common.c.

error_t snmpParseGlobalData ( SnmpMessage message )

Parse msgGlobalData field.

Parameters:
[in,out]messagePointer to the incoming SNMP message
Returns:
Error code

Definition at line 409 of file snmp_common.c.

error_t snmpParseMessageHeader ( SnmpMessage message )

Parse SNMP message header.

Parameters:
[in,out]messagePointer to the incoming SNMP message
Returns:
Error code

Definition at line 190 of file snmp_common.c.

error_t snmpParsePduHeader ( SnmpMessage message )

Parse PDU header.

Parameters:
[in,out]messagePointer to the incoming SNMP message
Returns:
Error code

Definition at line 1133 of file snmp_common.c.

error_t snmpParseScopedPdu ( SnmpMessage message )

Parse scopedPDU field.

Parameters:
[in,out]messagePointer to the incoming SNMP message
Returns:
Error code

Definition at line 970 of file snmp_common.c.

error_t snmpParseSecurityParameters ( SnmpMessage message )

Parse msgSecurityParameters field.

Parameters:
[in,out]messagePointer to the incoming SNMP message
Returns:
Error code

Definition at line 616 of file snmp_common.c.

error_t snmpWriteCommunity ( SnmpMessage message )

Format community name.

Parameters:
[in,out]messagePointer to the outgoing SNMP message
Returns:
Error code

Definition at line 369 of file snmp_common.c.

error_t snmpWriteGlobalData ( SnmpMessage message )

Format msgGlobalData field.

Parameters:
[in,out]messagePointer to the outgoing SNMP message
Returns:
Error code

Definition at line 518 of file snmp_common.c.

error_t snmpWriteMessageHeader ( SnmpMessage message )

Format SNMP message header.

Parameters:
[in,out]messagePointer to the outgoing SNMP message
Returns:
Error code

Definition at line 249 of file snmp_common.c.

error_t snmpWritePduHeader ( SnmpMessage message )

Format PDU header.

Parameters:
[in,out]messagePointer to the outgoing SNMP message
Returns:
Error code

Definition at line 1252 of file snmp_common.c.

error_t snmpWriteScopedPdu ( SnmpMessage message )

Format scopedPDU.

Parameters:
[in,out]messagePointer to the outgoing SNMP message
Returns:
Error code

Definition at line 1050 of file snmp_common.c.

error_t snmpWriteSecurityParameters ( SnmpMessage message )

Format msgSecurityParameters field.

Parameters:
[in,out]messagePointer to the outgoing SNMP message
Returns:
Error code

Definition at line 787 of file snmp_common.c.