annotate libutil/mncc_utils.c @ 241:d7c2a2c0b922

utils/Makefile: only using libnumdb2 now
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 14 Aug 2023 15:42:49 -0800
parents dbc0a8677b69
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
dbc0a8677b69 libutil: import from ThemWi1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /* simple utility functions for MNCC */
dbc0a8677b69 libutil: import from ThemWi1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2
dbc0a8677b69 libutil: import from ThemWi1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 #include <sys/types.h>
dbc0a8677b69 libutil: import from ThemWi1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 #include <sys/socket.h>
dbc0a8677b69 libutil: import from ThemWi1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 #include <stdio.h>
dbc0a8677b69 libutil: import from ThemWi1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 #include <stdint.h>
dbc0a8677b69 libutil: import from ThemWi1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 #include <stdlib.h>
dbc0a8677b69 libutil: import from ThemWi1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 #include "../include/mncc.h"
dbc0a8677b69 libutil: import from ThemWi1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 #include "../include/gsm48_const.h"
dbc0a8677b69 libutil: import from ThemWi1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10
dbc0a8677b69 libutil: import from ThemWi1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 mncc_set_cause(msg, loc, val)
dbc0a8677b69 libutil: import from ThemWi1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 struct gsm_mncc *msg;
dbc0a8677b69 libutil: import from ThemWi1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 {
dbc0a8677b69 libutil: import from ThemWi1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 msg->fields |= MNCC_F_CAUSE;
dbc0a8677b69 libutil: import from ThemWi1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 msg->cause.coding = GSM48_CAUSE_CODING_GSM;
dbc0a8677b69 libutil: import from ThemWi1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 msg->cause.location = loc;
dbc0a8677b69 libutil: import from ThemWi1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 msg->cause.value = val;
dbc0a8677b69 libutil: import from ThemWi1
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 }