summaryrefslogtreecommitdiffstats
path: root/src/ss.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ss.c')
-rw-r--r--src/ss.c49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/ss.c b/src/ss.c
new file mode 100644
index 0000000..3fcaee0
--- /dev/null
+++ b/src/ss.c
@@ -0,0 +1,49 @@
+/*
+ * DECT Supplementary Services (SS)
+ *
+ * Copyright (c) 2009 Patrick McHardy <kaber@trash.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <linux/dect.h>
+
+#include <libdect.h>
+#include <utils.h>
+#include <s_fmt.h>
+#include <lce.h>
+#include <ss.h>
+
+
+static const struct dect_sfmt_ie_desc ciss_facility_msg_desc[] = {
+ DECT_SFMT_IE(S_VL_IE_FACILITY, IE_OPTIONAL, IE_OPTIONAL, DECT_SFMT_IE_REPEAT),
+ DECT_SFMT_IE(S_DO_IE_SINGLE_DISPLAY, IE_OPTIONAL, IE_NONE, 0),
+ DECT_SFMT_IE(S_DO_IE_SINGLE_KEYPAD, IE_NONE, IE_OPTIONAL, 0),
+ DECT_SFMT_IE(S_VL_IE_FEATURE_ACTIVATE, IE_NONE, IE_OPTIONAL, 0),
+ DECT_SFMT_IE(S_VL_IE_FEATURE_INDICATE, IE_OPTIONAL, IE_NONE, 0),
+ DECT_SFMT_IE(S_VL_IE_IWU_TO_IWU, IE_OPTIONAL, IE_OPTIONAL, DECT_SFMT_IE_REPEAT),
+ DECT_SFMT_IE(S_VL_IE_ESCAPE_TO_PROPRIETARY, IE_OPTIONAL, IE_OPTIONAL, 0),
+ DECT_SFMT_IE(S_VL_IE_TIME_DATE, IE_OPTIONAL, IE_OPTIONAL, 0),
+ DECT_SFMT_IE(S_VL_IE_EVENTS_NOTIFICATION, IE_OPTIONAL, IE_OPTIONAL, 0),
+ DECT_SFMT_IE(S_VL_IE_CALL_INFORMATION, IE_OPTIONAL, IE_OPTIONAL, 0),
+ DECT_SFMT_IE_END_MSG
+};
+
+void dect_clss_rcv(struct dect_handle *dh, struct dect_msg_buf *mb)
+{
+ struct dect_ciss_facility_msg msg;
+
+ if (mb->type != CISS_FACILITY)
+ return;
+
+ if (dect_parse_sfmt_msg(dh, ciss_facility_msg_desc, &msg.common, mb) < 0)
+ return;
+}