Hybrid ICN (hICN)  v19.08-58-gd173417
Classes | Macros | Typedefs | Enumerations | Functions
base.h File Reference

Base hICN definitions. More...

#include "common.h"
Include dependency graph for base.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

union  hicn_type_t
 hICN packet format type More...
 

Macros

#define HICN_DEFAULT_TTL   254
 
#define HICN_MAX_LIFETIME_SCALED   0xFFFF
 
#define HICN_MAX_LIFETIME_MULTIPLIER   0x0F /* 4 bits */
 
#define HICN_MAX_LIFETIME   HICN_MAX_LIFETIME_SCALED << HICN_MAX_LIFETIME_MULTIPLIER
 
#define HICN_TYPE(x, y, z, t)   (hicn_type_t) {{ .l1 = x, .l2 = y, .l3 = z, .l4 = t }}
 
#define HICN_TYPE_IPV4_TCP   HICN_TYPE(IPPROTO_IP, IPPROTO_TCP, IPPROTO_NONE, IPPROTO_NONE)
 
#define HICN_TYPE_IPV4_ICMP   HICN_TYPE(IPPROTO_IP, IPPROTO_ICMP, IPPROTO_NONE, IPPROTO_NONE)
 
#define HICN_TYPE_IPV6_TCP   HICN_TYPE(IPPROTO_IPV6, IPPROTO_TCP, IPPROTO_NONE, IPPROTO_NONE)
 
#define HICN_TYPE_IPV6_ICMP   HICN_TYPE(IPPROTO_IPV6, IPPROTO_ICMPV6, IPPROTO_NONE, IPPROTO_NONE)
 
#define HICN_TYPE_IPV4_TCP_AH   HICN_TYPE(IPPROTO_IP, IPPROTO_TCP, IPPROTO_NONE, IPPROTO_NONE)
 
#define HICN_TYPE_IPV4_ICMP_AH   HICN_TYPE(IPPROTO_IP, IPPROTO_ICMP, IPPROTO_NONE, IPPROTO_NONE)
 
#define HICN_TYPE_IPV6_TCP_AH   HICN_TYPE(IPPROTO_IPV6, IPPROTO_TCP, IPPROTO_AH, IPPROTO_NONE)
 
#define HICN_TYPE_IPV6_ICMP_AH   HICN_TYPE(IPPROTO_IPV6, IPPROTO_ICMPV6, IPPROTO_AH, IPPROTO_NONE)
 
#define HICN_TYPE_NONE   HICN_TYPE(IPPROTO_NONE, IPPROTO_NONE, IPPROTO_NONE, IPPROTO_NONE)
 
#define HICN_PATH_LABEL_MASK   0xF000 /* 1000 0000 0000 0000 */
 Path label computations. More...
 
#define HICN_PATH_LABEL_SIZE   8
 

Typedefs

typedef u32 hicn_faceid_t
 
typedef u8 hicn_pathlabel_t
 
typedef u32 hicn_lifetime_t
 

Enumerations

enum  hicn_payload_type_t { HPT_DATA = 0, HPT_MANIFEST = 1, HPT_UNSPEC = 999 }
 hICN Payload type More...
 

Functions

always_inline void update_pathlabel (hicn_pathlabel_t current_label, hicn_faceid_t face_id, hicn_pathlabel_t *new_label)
 Path label update. More...
 

Detailed Description

Base hICN definitions.

Protocol-independent packet operations.

Macro Definition Documentation

#define HICN_PATH_LABEL_MASK   0xF000 /* 1000 0000 0000 0000 */

Path label computations.

Path label is computed by accumulating the identifiers of successive output faces as a Data packet is traveling from its producer back to the consumer originating the Interest.

NOTE: this computation is not (yet) part of the hICN specification.

Enumeration Type Documentation

hICN Payload type

This type distinguishes several types of data packet, which can either carry content data, or Manifest

Function Documentation

always_inline void update_pathlabel ( hicn_pathlabel_t  current_label,
hicn_faceid_t  face_id,
hicn_pathlabel_t *  new_label 
)

Path label update.

Parameters
[in]current_labelCurrent pathlabel
[in]face_idThe face identifier to combine into the path label
[out]new_labelComputed pathlabel

This function updates the current_label based on the new face_id, and returns