FreeCalypso > hg > themwi-system-sw
annotate libutil/mncc_utils.c @ 200:834656633fa0
sip-manual-out TFO: use is_hunt_fill mechanism
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 02 Apr 2023 17:44:23 -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 } |