libosmocore
1.5.1
Osmocom core library
|
Go to the documentation of this file.
22 #define OSMO_PRIM(prim, op) ((prim << 8) | (op & 0xFF))
23 #define OSMO_PRIM_HDR(oph) OSMO_PRIM((oph)->primitive, (oph)->operation)
36 #define _SAP_GSM_SHIFT 24
38 #define _SAP_GSM_BASE (0x01 << _SAP_GSM_SHIFT)
39 #define _SAP_TETRA_BASE (0x02 << _SAP_GSM_SHIFT)
40 #define _SAP_SS7_BASE (0x03 << _SAP_GSM_SHIFT)
79 #define OSMO_NO_EVENT 0xFFFFFFFF
int(* osmo_prim_cb)(struct osmo_prim_hdr *oph, void *ctx)
primitive handler callback type
Definition: prim.h:75
single entry in a SAP/PRIM/OP -> EVENT map
Definition: prim.h:82
osmo_prim_operation
primitive operation
Definition: prim.h:26
unsigned int sap
SAP to match.
Definition: prim.h:83
Osmocom primitive header.
Definition: prim.h:43
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:64
@ PRIM_OP_INDICATION
indication
Definition: prim.h:29
@ PRIM_OP_REQUEST
request
Definition: prim.h:27
enum osmo_prim_operation operation
Definition: prim.h:46
Osmocom message buffer.
Definition: msgb.h:35
uint32_t event
event as result if above match
Definition: prim.h:86
struct msgb * msg
Primitive Operation.
Definition: prim.h:47
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
const struct value_string osmo_prim_op_names[5]
The upper 8 byte of the technology, the lower 24 bits for the SAP.
Definition: prim.c:16
enum osmo_prim_operation operation
operation to match
Definition: prim.h:85
A mapping between human-readable string and numeric value.
Definition: utils.h:42
unsigned int primitive
Primitive number.
Definition: prim.h:45
unsigned int primitive
primtiive to match
Definition: prim.h:84
@ PRIM_OP_CONFIRM
confirm
Definition: prim.h:30
unsigned int sap
Service Access Point Identifier.
Definition: prim.h:44
@ PRIM_OP_RESPONSE
response
Definition: prim.h:28