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.
Data Structures | |
| struct | nm_uuid_s |
| uuid in plain text (hex encoding) More... | |
| struct | nm_uuid_binary_s |
| UUID in binary. More... | |
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 | |
| #define | NM_UUID_SIZE 32 |
| 128 bits uuid, as 32 hexadecimal numbers | |
| #define | NM_UUID_BINARY_SIZE 16 |
| 128 bits UUID as 16 binary bytes | |
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_kind_undefined , nm_trk_kind_small , nm_trk_kind_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. | |
| #define | NM_PRIORITY_MIN INT_MIN |
| minimum priority level | |
| #define | NM_PRIORITY_MAX INT_MAX |
| maximum priority level | |
| 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_PRIORITY_MAX
| #define NM_PRIORITY_MAX INT_MAX |
maximum priority level
Definition at line 84 of file nm_types.h.
◆ NM_PRIORITY_MIN
| #define NM_PRIORITY_MIN INT_MIN |
minimum priority level
Definition at line 81 of file nm_types.h.
◆ NM_SEQ_MAX
| #define NM_SEQ_MAX ((nm_seq_t)-1) |
largest sequence number
Definition at line 114 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 111 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.
◆ NM_UUID_BINARY_SIZE
| #define NM_UUID_BINARY_SIZE 16 |
128 bits UUID as 16 binary bytes
Definition at line 130 of file nm_types.h.
◆ NM_UUID_SIZE
| #define NM_UUID_SIZE 32 |
128 bits uuid, as 32 hexadecimal numbers
Definition at line 120 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 105 of file nm_types.h.
◆ nm_req_seq_t
| typedef uint64_t nm_req_seq_t |
sequence number for requests
Definition at line 117 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 108 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 92 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_kind_undefined | |
| nm_trk_kind_small | small packets with headers & parsing |
| nm_trk_kind_large | large packets with rdv, no header |
Definition at line 95 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