NewMadeleine

Documentation

nm_types.h File Reference

This file contains some types and constants used throughout NewMad core and interfaces. More...

#include <stdint.h>
#include <Padico/Puk.h>
Include dependency graph for nm_types.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define NM_SEQ_NONE   ((nm_seq_t)0)
 Reserved sequence number never used by real packets. More...
 
#define NM_SEQ_MAX   ((nm_seq_t)-1)
 largest sequence number More...
 

Typedefs

typedef int8_t nm_trk_id_t
 ID of a track, assigned in order. More...
 
typedef enum nm_trk_kind_e nm_trk_kind_t
 
typedef uint8_t nm_proto_t
 protocol flags- not part of the public API, but needed for inline More...
 
typedef uint32_t nm_seq_t
 Sequence number for packets on a given gate/tag. More...
 
typedef uint64_t nm_req_seq_t
 sequence number for requests More...
 

Enumerations

enum  nm_trk_kind_e { nm_trk_undefined , nm_trk_small , nm_trk_large }
 
#define NM_GATE_NONE   ((nm_gate_t)NULL)
 no gate More...
 
#define NM_ANY_GATE   NM_GATE_NONE
 
#define NM_TAG_MAX   UINT64_MAX
 maximum usable nmad tag More...
 
#define NM_TAG_MASK_FULL   ((nm_tag_t)-1)
 tag mask that matches all bits More...
 
#define NM_TAG_MASK_NONE   ((nm_tag_t)0)
 tag mask that matches no bits More...
 
#define NM_LEN_UNDEFINED   ((nm_len_t)-1)
 length is undefined More...
 
#define NM_LEN_MAX   ((nm_len_t)-2)
 maximum length usable in nmad. More...
 
typedef struct nm_gate_snm_gate_t
 a gate; opaque type to designate a peer node More...
 
typedef uint64_t nm_tag_t
 user tags, 64 bits, contained in indirect hashtable More...
 
typedef uint64_t nm_len_t
 data length used by nmad More...
 
typedef int32_t nm_prio_t
 message priority More...
 
void * nm_gate_ref_get (nm_gate_t p_gate)
 Get the user-registered per-gate data. More...
 
void nm_gate_ref_set (nm_gate_t p_gate, void *ref)
 Set the user-registered per-gate data. More...
 
 PUK_HASHTABLE_TYPE (nm_gate_reverse, nm_gate_t, int, &puk_hash_pointer_default_hash, &puk_hash_pointer_default_eq, NULL)
 hash ranks by gate More...
 

Detailed Description

This file contains some types and constants used throughout NewMad core and interfaces.

Definition in file nm_types.h.

Macro Definition Documentation

◆ NM_ANY_GATE

#define NM_ANY_GATE   NM_GATE_NONE
Examples
nm_sr_hello.c, and nm_sr_peek.c.

Definition at line 43 of file nm_types.h.

◆ NM_GATE_NONE

#define NM_GATE_NONE   ((nm_gate_t)NULL)

no gate

Definition at line 41 of file nm_types.h.

◆ NM_LEN_MAX

#define NM_LEN_MAX   ((nm_len_t)-2)

maximum length usable in nmad.

Definition at line 75 of file nm_types.h.

◆ NM_LEN_UNDEFINED

#define NM_LEN_UNDEFINED   ((nm_len_t)-1)

length is undefined

Examples
nm_rpc_hello.c.

Definition at line 73 of file nm_types.h.

◆ NM_SEQ_MAX

#define NM_SEQ_MAX   ((nm_seq_t)-1)

largest sequence number

Definition at line 110 of file nm_types.h.

◆ NM_SEQ_NONE

#define NM_SEQ_NONE   ((nm_seq_t)0)

Reserved sequence number never used by real packets.

Definition at line 107 of file nm_types.h.

◆ NM_TAG_MASK_FULL

#define NM_TAG_MASK_FULL   ((nm_tag_t)-1)

tag mask that matches all bits

Examples
nm_rpc_hello.c, and nm_sr_peek.c.

Definition at line 63 of file nm_types.h.

◆ NM_TAG_MASK_NONE

#define NM_TAG_MASK_NONE   ((nm_tag_t)0)

tag mask that matches no bits

Definition at line 65 of file nm_types.h.

◆ NM_TAG_MAX

#define NM_TAG_MAX   UINT64_MAX

maximum usable nmad tag

Definition at line 60 of file nm_types.h.

Typedef Documentation

◆ nm_len_t

typedef uint64_t nm_len_t

data length used by nmad

Definition at line 70 of file nm_types.h.

◆ nm_prio_t

typedef int32_t nm_prio_t

message priority

Definition at line 80 of file nm_types.h.

◆ nm_proto_t

typedef uint8_t nm_proto_t

protocol flags- not part of the public API, but needed for inline

Definition at line 101 of file nm_types.h.

◆ nm_req_seq_t

typedef uint64_t nm_req_seq_t

sequence number for requests

Definition at line 113 of file nm_types.h.

◆ nm_seq_t

typedef uint32_t nm_seq_t

Sequence number for packets on a given gate/tag.

Definition at line 104 of file nm_types.h.

◆ nm_tag_t

typedef uint64_t nm_tag_t

user tags, 64 bits, contained in indirect hashtable

Definition at line 58 of file nm_types.h.

◆ nm_trk_id_t

typedef int8_t nm_trk_id_t

ID of a track, assigned in order.

Definition at line 88 of file nm_types.h.

◆ nm_trk_kind_t

Enumeration Type Documentation

◆ nm_trk_kind_e

Enumerator
nm_trk_undefined 
nm_trk_small 

small packets with headers & parsing

nm_trk_large 

large packets with rdv, no header

Definition at line 91 of file nm_types.h.

Function Documentation

◆ nm_gate_ref_get()

void * nm_gate_ref_get ( nm_gate_t  p_gate)

Get the user-registered per-gate data.

◆ nm_gate_ref_set()

void nm_gate_ref_set ( nm_gate_t  p_gate,
void *  ref 
)

Set the user-registered per-gate data.

◆ PUK_HASHTABLE_TYPE()

PUK_HASHTABLE_TYPE ( nm_gate_reverse  ,
nm_gate_t  ,
int  ,
puk_hash_pointer_default_hash,
puk_hash_pointer_default_eq,
NULL   
)

hash ranks by gate