22#define OSMO_PRIM(prim, op) ((prim << 8) | (op & 0xFF))
23#define OSMO_PRIM_HDR(oph) OSMO_PRIM((oph)->primitive, (oph)->operation)
40#define _SAP_GSM_SHIFT 24
42#define _SAP_GSM_BASE (0x01 << _SAP_GSM_SHIFT)
43#define _SAP_TETRA_BASE (0x02 << _SAP_GSM_SHIFT)
44#define _SAP_SS7_BASE (0x03 << _SAP_GSM_SHIFT)
83#define OSMO_NO_EVENT 0xFFFFFFFF
osmo_prim_operation
primitive operation
Definition: prim.h:26
uint32_t osmo_event_for_prim(const struct osmo_prim_hdr *oph, const struct osmo_prim_event_map *maps)
resolve the (fsm) event for a given primitive using a map
Definition: prim.c:28
static const char * osmo_prim_operation_name(enum osmo_prim_operation val)
The upper 8 byte of the technology, the lower 24 bits for the SAP.
Definition: prim.h:34
int(* osmo_prim_cb)(struct osmo_prim_hdr *oph, void *ctx)
primitive handler callback type
Definition: prim.h:79
const struct value_string osmo_prim_op_names[]
human-readable string mapping for osmo_prim_operation
Definition: prim.c:16
static void osmo_prim_init(struct osmo_prim_hdr *oph, unsigned int sap, unsigned int primitive, enum osmo_prim_operation operation, struct msgb *msg)
Convenience function to initialize a primitive header.
Definition: prim.h:68
@ PRIM_OP_INDICATION
indication
Definition: prim.h:29
@ PRIM_OP_CONFIRM
confirm
Definition: prim.h:30
@ PRIM_OP_REQUEST
request
Definition: prim.h:27
@ PRIM_OP_RESPONSE
response
Definition: prim.h:28
const char * get_value_string(const struct value_string *vs, uint32_t val)
get human-readable string for given value
Definition: utils.c:62
Osmocom message buffer.
Definition: msgb.h:31
single entry in a SAP/PRIM/OP -> EVENT map
Definition: prim.h:86
uint32_t event
event as result if above match
Definition: prim.h:90
unsigned int sap
SAP to match.
Definition: prim.h:87
unsigned int primitive
primtiive to match
Definition: prim.h:88
enum osmo_prim_operation operation
operation to match
Definition: prim.h:89
Osmocom primitive header.
Definition: prim.h:47
struct msgb * msg
Primitive Operation.
Definition: prim.h:51
enum osmo_prim_operation operation
Definition: prim.h:50
unsigned int primitive
Primitive number.
Definition: prim.h:49
unsigned int sap
Service Access Point Identifier.
Definition: prim.h:48
A mapping between human-readable string and numeric value.
Definition: utils.h:51