FreeCalypso > hg > themwi-interim
annotate libutil/mncc_utils.c @ 11:aa2ba9b432af
mtctest: implement play and play-stop commands
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 09 Jun 2024 04:32:57 +0000 |
parents | b161dbfffdaa |
children |
rev | line source |
---|---|
1
b161dbfffdaa
include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* simple utility functions for MNCC */ |
b161dbfffdaa
include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 |
b161dbfffdaa
include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 #include <sys/types.h> |
b161dbfffdaa
include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 #include <sys/socket.h> |
b161dbfffdaa
include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 #include <stdio.h> |
b161dbfffdaa
include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 #include <stdint.h> |
b161dbfffdaa
include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 #include <stdlib.h> |
b161dbfffdaa
include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 #include "../include/mncc.h" |
b161dbfffdaa
include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 #include "../include/gsm48_const.h" |
b161dbfffdaa
include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 |
b161dbfffdaa
include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 mncc_set_cause(msg, loc, val) |
b161dbfffdaa
include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 struct gsm_mncc *msg; |
b161dbfffdaa
include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 { |
b161dbfffdaa
include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 msg->fields |= MNCC_F_CAUSE; |
b161dbfffdaa
include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 msg->cause.coding = GSM48_CAUSE_CODING_GSM; |
b161dbfffdaa
include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 msg->cause.location = loc; |
b161dbfffdaa
include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 msg->cause.value = val; |
b161dbfffdaa
include, libutil: port from old ThemWi
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 } |