ndn-lite
Macros
General Error Types
Collaboration diagram for General Error Types:

Macros

#define NDN_OVERSIZE   -10
 The object given is larger than expected. More...
 
#define NDN_NAME_INVALID_FORMAT   -11
 The format of the name string specified is invalid. More...
 
#define NDN_WRONG_TLV_TYPE   -12
 The Type specified cannot be recognized. More...
 
#define NDN_WRONG_TLV_LENGTH   -13
 The Length specified differs from expected. More...
 
#define NDN_OVERSIZE_VAR   -14
 Truncation due to insufficient buffer. More...
 
#define NDN_TLV_OP_FAILED   -15
 The operation faild due to specific reason. More...
 
#define NDN_INVALID_POINTER   -16
 Pass NULL to a non-optional parameter. More...
 
#define NDN_UNSUPPORTED_FORMAT   -17
 The format of a specified TLV block is different from expectation. More...
 
#define NDN_INVALID_ARG   -18
 

Detailed Description

Macro Definition Documentation

◆ NDN_INVALID_ARG

#define NDN_INVALID_ARG   -18

◆ NDN_INVALID_POINTER

#define NDN_INVALID_POINTER   -16

Pass NULL to a non-optional parameter.

◆ NDN_NAME_INVALID_FORMAT

#define NDN_NAME_INVALID_FORMAT   -11

The format of the name string specified is invalid.

A uri string of a name should start with "/".

◆ NDN_OVERSIZE

#define NDN_OVERSIZE   -10

The object given is larger than expected.

This error can be caused by multiple reasons. Generally caused by an input parameter whose size is larger than the corresponding value defined in ndn-constants.h.

◆ NDN_OVERSIZE_VAR

#define NDN_OVERSIZE_VAR   -14

Truncation due to insufficient buffer.

The operation specified requires more memory than the buffer variable given. For example, passing {FD 01} to a TLV block parameter will cause this error, because FD indicates the Type is encoded in the following 2 bytes, but there's not enough space.

◆ NDN_TLV_OP_FAILED

#define NDN_TLV_OP_FAILED   -15

The operation faild due to specific reason.

Reserved. See the function called.

◆ NDN_UNSUPPORTED_FORMAT

#define NDN_UNSUPPORTED_FORMAT   -17

The format of a specified TLV block is different from expectation.

Different between NDN_WRONG_TLV_TYPE, NDN_UNSUPPORTED_FORMAT is due to unexpected type inside a TLV block. For example, when a function requires a Interest parameter interest

◆ NDN_WRONG_TLV_LENGTH

#define NDN_WRONG_TLV_LENGTH   -13

The Length specified differs from expected.

This can be due to one of the following reasons:

  • The input Length for a TLV block is not 1, 2, 4 or 8, as the Spec requires.
  • The Type of the TLV block given requires a fixed Length different from the Length it has.
  • The function expects an input block to be a single TLV block, while the Length is less than the buffer size plus TL's sizes.

◆ NDN_WRONG_TLV_TYPE

#define NDN_WRONG_TLV_TYPE   -12

The Type specified cannot be recognized.