This file contains some types and constants used throughout NewMad core and interfaces. More...
#include <stdint.h>#include <Padico/Puk.h>

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. | |
| #define | NM_SEQ_MAX ((nm_seq_t)-1) |
| largest sequence number | |
Typedefs | |
| typedef int8_t | nm_trk_id_t |
| ID of a track, assigned in order. | |
| 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 | |
| typedef uint32_t | nm_seq_t |
| Sequence number for packets on a given gate/tag. | |
| typedef uint64_t | nm_req_seq_t |
| sequence number for requests | |
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 | |
| #define | NM_ANY_GATE NM_GATE_NONE |
| #define | NM_TAG_MAX UINT64_MAX |
| maximum usable nmad tag | |
| #define | NM_TAG_MASK_FULL ((nm_tag_t)-1) |
| tag mask that matches all bits | |
| #define | NM_TAG_MASK_NONE ((nm_tag_t)0) |
| tag mask that matches no bits | |
| #define | NM_LEN_UNDEFINED ((nm_len_t)-1) |
| length is undefined | |
| #define | NM_LEN_MAX ((nm_len_t)-2) |
| maximum length usable in nmad. | |
| typedef struct nm_gate_s * | nm_gate_t |
| a gate; opaque type to designate a peer node | |
| typedef uint64_t | nm_tag_t |
| user tags, 64 bits, contained in indirect hashtable | |
| typedef uint64_t | nm_len_t |
| data length used by nmad | |
| typedef int32_t | nm_prio_t |
| message priority | |
| void * | nm_gate_ref_get (nm_gate_t p_gate) |
| Get the user-registered per-gate data. | |
| void | nm_gate_ref_set (nm_gate_t p_gate, void *ref) |
| Set the user-registered per-gate data. | |
| 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 | |
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 41 of file nm_types.h.
◆ NM_GATE_NONE
| #define NM_GATE_NONE ((nm_gate_t)NULL) |
no gate
Definition at line 39 of file nm_types.h.
◆ NM_LEN_MAX
| #define NM_LEN_MAX ((nm_len_t)-2) |
maximum length usable in nmad.
Definition at line 73 of file nm_types.h.
◆ NM_LEN_UNDEFINED
| #define NM_LEN_UNDEFINED ((nm_len_t)-1) |
◆ NM_SEQ_MAX
| #define NM_SEQ_MAX ((nm_seq_t)-1) |
largest sequence number
Definition at line 108 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 105 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 61 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 63 of file nm_types.h.
◆ NM_TAG_MAX
| #define NM_TAG_MAX UINT64_MAX |
maximum usable nmad tag
Definition at line 58 of file nm_types.h.
Typedef Documentation
◆ nm_len_t
| typedef uint64_t nm_len_t |
data length used by nmad
Definition at line 68 of file nm_types.h.
◆ nm_prio_t
| typedef int32_t nm_prio_t |
message priority
Definition at line 78 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 99 of file nm_types.h.
◆ nm_req_seq_t
| typedef uint64_t nm_req_seq_t |
sequence number for requests
Definition at line 111 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 102 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 56 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 86 of file nm_types.h.
◆ nm_trk_kind_t
| typedef enum nm_trk_kind_e nm_trk_kind_t |
Enumeration Type Documentation
◆ nm_trk_kind_e
| enum 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 89 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