ndn-lite
Enumerations | Functions
wrapper-api.h File Reference
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
#include "name.h"

Go to the source code of this file.

Enumerations

enum  TLV_DATAARG_TYPE {
  TLV_DATAARG_NAME_PTR, TLV_DATAARG_NAME_BUF, TLV_DATAARG_NAME_SEGNO_U64, TLV_DATAARG_CONTENTTYPE_U8,
  TLV_DATAARG_FRESHNESSPERIOD_U64, TLV_DATAARG_FINALBLOCKID_PTR, TLV_DATAARG_FINALBLOCKID_BUF, TLV_DATAARG_FINALBLOCKID_U64,
  TLV_DATAARG_CONTENT_BUF, TLV_DATAARG_CONTENT_SIZE, TLV_DATAARG_SIGTYPE_U8, TLV_DATAARG_IDENTITYNAME_PTR,
  TLV_DATAARG_SIGKEY_PTR, TLV_DATAARG_SIGTIME_U64, TLV_DATAARG_VERIFY
}
 The type of variant args of tlv_make_data and tlv_parse_data. More...
 
enum  TLV_INTARG_TYPE {
  TLV_INTARG_NAME_PTR, TLV_INTARG_NAME_BUF, TLV_INTARG_NAME_SEGNO_U64, TLV_INTARG_CANBEPREFIX_BOOL,
  TLV_INTARG_MUSTBEFRESH_BOOL, TLV_INTARG_LIFETIME_U64, TLV_INTARG_HOTLIMIT_U8, TLV_INTARG_PARAMS_BUF,
  TLV_INTARG_PARAMS_SIZE, TLV_INTARG_SIGTYPE_U8, TLV_INTARG_IDENTITYNAME_PTR, TLV_INTARG_SIGKEY_PTR,
  TLV_INTARG_VERIFY
}
 The type of variant args of tlv_make_interest. More...
 

Functions

int tlv_make_data (uint8_t *buf, size_t buflen, size_t *result_size, int argc,...)
 All-in-one function to generate a Data packet. More...
 
int tlv_parse_data (uint8_t *buf, size_t buflen, int argc,...)
 All-in-one function to parse a Data packet. More...
 
int tlv_make_interest (uint8_t *buf, size_t buflen, size_t *result_size, int argc,...)
 All-in-one function to generate an Interest packet. More...
 
int tlv_parse_interest (uint8_t *buf, size_t buflen, int argc,...)
 All-in-one function to parse an Interest packet. More...
 
void tlv_encode_segno (name_component_t *comp, uint64_t val)
 Encode a name component from a segment number. More...
 
uint64_t tlv_decode_segno (name_component_t *comp)
 Decode a name component into a segment number. More...