FreeCalypso > hg > themwi-system-sw
annotate libutil/mncc_utils.c @ 22:7a9eb3df14e6
top Makefile: add mtctest
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 28 Jun 2022 18:27:44 -0800 |
parents | dbc0a8677b69 |
children |
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 } |