ndn-lite
Data Structures | Macros | Typedefs | Functions
face.h File Reference
#include <stdbool.h>
#include <stdint.h>
#include <stddef.h>
#include "../ndn-enums.h"
#include "../ndn-constants.h"

Go to the source code of this file.

Data Structures

struct  ndn_face_intf
 Abstract NDN network face. More...
 

Macros

#define container_of(ptr, type, member)   ((type *)((char *)(1 ? (ptr) : &((type *)0)->member) - offsetof(type, member)))
 

Typedefs

typedef int(* ndn_face_intf_up) (struct ndn_face_intf *self)
 Turn on the face. More...
 
typedef int(* ndn_face_intf_send) (struct ndn_face_intf *self, const uint8_t *packet, uint32_t size)
 Send out a packet. More...
 
typedef int(* ndn_face_intf_down) (struct ndn_face_intf *self)
 Shutdown the face temporarily. More...
 
typedef void(* ndn_face_intf_destroy) (struct ndn_face_intf *self)
 Destructor. More...
 
typedef struct ndn_face_intf ndn_face_intf_t
 Abstract NDN network face. More...
 

Functions

static int ndn_face_up (ndn_face_intf_t *self)
 Turn on the face. More...
 
static int ndn_face_send (ndn_face_intf_t *self, const uint8_t *packet, uint32_t size)
 Send out a packet. More...
 
static int ndn_face_down (ndn_face_intf_t *self)
 Shutdown the face temporarily. More...
 
static void ndn_face_destroy (ndn_face_intf_t *self)
 Destructor. More...
 

Macro Definition Documentation

◆ container_of

#define container_of (   ptr,
  type,
  member 
)    ((type *)((char *)(1 ? (ptr) : &((type *)0)->member) - offsetof(type, member)))