diff libutil/mncc_utils.c @ 1:dbc0a8677b69

libutil: import from ThemWi1
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 25 Jun 2022 18:33:29 -0800
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libutil/mncc_utils.c	Sat Jun 25 18:33:29 2022 -0800
@@ -0,0 +1,18 @@
+/* simple utility functions for MNCC */
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include "../include/mncc.h"
+#include "../include/gsm48_const.h"
+
+mncc_set_cause(msg, loc, val)
+	struct gsm_mncc *msg;
+{
+	msg->fields |= MNCC_F_CAUSE;
+	msg->cause.coding = GSM48_CAUSE_CODING_GSM;
+	msg->cause.location = loc;
+	msg->cause.value = val;
+}