Change in osmocom-bb[master]: layer23/sap_interface.c: separate protocol definition

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Vadim Yanitskiy gerrit-no-reply at lists.osmocom.org
Fri Jan 4 18:18:30 UTC 2019


Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/12467


Change subject: layer23/sap_interface.c: separate protocol definition
......................................................................

layer23/sap_interface.c: separate protocol definition

Change-Id: Iad9b3d88b02cc7ec4cf64483bbc85e3a61c9ad10
---
M src/host/layer23/include/osmocom/bb/common/Makefile.am
M src/host/layer23/include/osmocom/bb/common/sap_interface.h
A src/host/layer23/include/osmocom/bb/common/sap_proto.h
M src/host/layer23/src/common/Makefile.am
M src/host/layer23/src/common/sap_interface.c
A src/host/layer23/src/common/sap_proto.c
6 files changed, 200 insertions(+), 156 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/67/12467/1

diff --git a/src/host/layer23/include/osmocom/bb/common/Makefile.am b/src/host/layer23/include/osmocom/bb/common/Makefile.am
index e1ea7eb..eb1dfb7 100644
--- a/src/host/layer23/include/osmocom/bb/common/Makefile.am
+++ b/src/host/layer23/include/osmocom/bb/common/Makefile.am
@@ -1,3 +1,3 @@
 noinst_HEADERS = l1ctl.h l1l2_interface.h l23_app.h logging.h \
 		 networks.h gps.h sysinfo.h osmocom_data.h utils.h \
-		 sap_interface.h
+		 sap_proto.h sap_interface.h
diff --git a/src/host/layer23/include/osmocom/bb/common/sap_interface.h b/src/host/layer23/include/osmocom/bb/common/sap_interface.h
index 5332982..96d056b 100644
--- a/src/host/layer23/include/osmocom/bb/common/sap_interface.h
+++ b/src/host/layer23/include/osmocom/bb/common/sap_interface.h
@@ -16,86 +16,3 @@
 	SAP_PROCESSING_ATR_REQUEST,
 	SAP_PROCESSING_APDU_REQUEST
 };
-
-/* Table 5.1: Message Overview */
-enum sap_msg_type {
-	SAP_CONNECT_REQ = 0x00,
-	SAP_CONNECT_RESP = 0x01,
-	SAP_DISCONNECT_REQ = 0x02,
-	SAP_DISCONNECT_RESP = 0x03,
-	SAP_DISCONNECT_IND = 0x04,
-	SAP_TRANSFER_APDU_REQ = 0x05,
-	SAP_TRANSFER_APDU_RESP = 0x06,
-	SAP_TRANSFER_ATR_REQ = 0x07,
-	SAP_TRANSFER_ATR_RESP = 0x08,
-	SAP_POWER_SIM_OFF_REQ = 0x09,
-	SAP_POWER_SIM_OFF_RESP = 0x0A,
-	SAP_POWER_SIM_ON_REQ = 0x0B,
-	SAP_POWER_SIM_ON_RESP = 0x0C,
-	SAP_RESET_SIM_REQ = 0x0D,
-	SAP_RESET_SIM_RESP = 0x0E,
-	SAP_TRANSFER_CARD_READER_STATUS_REQ = 0x0F,
-	SAP_TRANSFER_CARD_READER_STATUS_RESP = 0x10,
-	SAP_STATUS_IND = 0x11,
-	SAP_ERROR_RESP = 0x12,
-	SAP_SET_TRANSPORT_PROTOCOL_REQ = 0x13,
-	SAP_SET_TRANSPORT_PROTOCOL_RESP = 0x14
-};
-
-/* Table 5.15: List of Parameter IDs */
-enum sap_param_type {
-	SAP_MAX_MSG_SIZE = 0x00,
-	SAP_CONNECTION_STATUS = 0x01,
-	SAP_RESULT_CODE = 0x02,
-	SAP_DISCONNECTION_TYPE = 0x03,
-	SAP_COMMAND_APDU = 0x04,
-	SAP_COMMAND_APDU_7816 = 0x10,
-	SAP_RESPONSE_APDU = 0x05,
-	SAP_ATR = 0x06,
-	SAP_CARD_READER_STATUS = 0x07,
-	SAP_STATUS_CHANGE = 0x08,
-	SAP_TRANSPORT_PROTOCOL = 0x09
-};
-
-/* Table 5.18: Possible values for ResultCode */
-enum sap_result_type {
-	SAP_RESULT_OK_REQ_PROC_CORR = 0x00,
-	SAP_RESULT_ERROR_NO_REASON = 0x01,
-	SAP_RESULT_ERROR_CARD_NOT_ACC = 0x02,
-	SAP_RESULT_ERROR_CARD_POWERED_OFF = 0x03,
-	SAP_RESULT_ERROR_CARD_REMOVED = 0x04,
-	SAP_RESULT_ERROR_CARD_POWERED_ON = 0x05,
-	SAP_RESULT_ERROR_DATA_UNAVAIL = 0x06,
-	SAP_RESULT_ERROR_NOT_SUPPORTED = 0x07,
-};
-
-/* Table 5.19: Possible values for StatusChange */
-enum sap_card_status_type {
-	SAP_CARD_STATUS_UNKNOWN_ERROR = 0x00,
-	SAP_CARD_STATUS_RESET = 0x01,
-	SAP_CARD_STATUS_NOT_ACC = 0x02,
-	SAP_CARD_STATUS_REMOVED = 0x03,
-	SAP_CARD_STATUS_INSERTED = 0x04,
-	SAP_CARD_STATUS_RECOVERED = 0x05,
-};
-
-/* Table 5.16: Possible values for ConnectionStatus */
-enum sap_conn_status_type {
-	SAP_CONN_STATUS_OK_READY = 0x00,
-	SAP_CONN_STATUS_ERROR_CONN = 0x01,
-	SAP_CONN_STATUS_ERROR_MAX_MSG_SIZE = 0x02,
-	SAP_CONN_STATUS_ERROR_SMALL_MSG_SIZE = 0x03,
-	SAP_CONN_STATUS_OK_CALL = 0x04,
-};
-
-struct sap_param {
-	uint8_t id;
-	uint16_t len;
-	uint8_t *value;
-};
-
-struct sap_msg {
-	uint8_t id;
-	uint8_t num_params;
-	struct sap_param *params;
-};
diff --git a/src/host/layer23/include/osmocom/bb/common/sap_proto.h b/src/host/layer23/include/osmocom/bb/common/sap_proto.h
new file mode 100644
index 0000000..49b30fc
--- /dev/null
+++ b/src/host/layer23/include/osmocom/bb/common/sap_proto.h
@@ -0,0 +1,94 @@
+#pragma once
+
+#include <stdint.h>
+
+#include <osmocom/core/utils.h>
+
+/* Table 5.1: Message Overview */
+enum sap_msg_type {
+	SAP_CONNECT_REQ = 0x00,
+	SAP_CONNECT_RESP = 0x01,
+	SAP_DISCONNECT_REQ = 0x02,
+	SAP_DISCONNECT_RESP = 0x03,
+	SAP_DISCONNECT_IND = 0x04,
+	SAP_TRANSFER_APDU_REQ = 0x05,
+	SAP_TRANSFER_APDU_RESP = 0x06,
+	SAP_TRANSFER_ATR_REQ = 0x07,
+	SAP_TRANSFER_ATR_RESP = 0x08,
+	SAP_POWER_SIM_OFF_REQ = 0x09,
+	SAP_POWER_SIM_OFF_RESP = 0x0A,
+	SAP_POWER_SIM_ON_REQ = 0x0B,
+	SAP_POWER_SIM_ON_RESP = 0x0C,
+	SAP_RESET_SIM_REQ = 0x0D,
+	SAP_RESET_SIM_RESP = 0x0E,
+	SAP_TRANSFER_CARD_READER_STATUS_REQ = 0x0F,
+	SAP_TRANSFER_CARD_READER_STATUS_RESP = 0x10,
+	SAP_STATUS_IND = 0x11,
+	SAP_ERROR_RESP = 0x12,
+	SAP_SET_TRANSPORT_PROTOCOL_REQ = 0x13,
+	SAP_SET_TRANSPORT_PROTOCOL_RESP = 0x14
+};
+
+/* Table 5.15: List of Parameter IDs */
+enum sap_param_type {
+	SAP_MAX_MSG_SIZE = 0x00,
+	SAP_CONNECTION_STATUS = 0x01,
+	SAP_RESULT_CODE = 0x02,
+	SAP_DISCONNECTION_TYPE = 0x03,
+	SAP_COMMAND_APDU = 0x04,
+	SAP_COMMAND_APDU_7816 = 0x10,
+	SAP_RESPONSE_APDU = 0x05,
+	SAP_ATR = 0x06,
+	SAP_CARD_READER_STATUS = 0x07,
+	SAP_STATUS_CHANGE = 0x08,
+	SAP_TRANSPORT_PROTOCOL = 0x09
+};
+
+/* Table 5.18: Possible values for ResultCode */
+enum sap_result_type {
+	SAP_RESULT_OK_REQ_PROC_CORR = 0x00,
+	SAP_RESULT_ERROR_NO_REASON = 0x01,
+	SAP_RESULT_ERROR_CARD_NOT_ACC = 0x02,
+	SAP_RESULT_ERROR_CARD_POWERED_OFF = 0x03,
+	SAP_RESULT_ERROR_CARD_REMOVED = 0x04,
+	SAP_RESULT_ERROR_CARD_POWERED_ON = 0x05,
+	SAP_RESULT_ERROR_DATA_UNAVAIL = 0x06,
+	SAP_RESULT_ERROR_NOT_SUPPORTED = 0x07,
+};
+
+/* Table 5.19: Possible values for StatusChange */
+enum sap_card_status_type {
+	SAP_CARD_STATUS_UNKNOWN_ERROR = 0x00,
+	SAP_CARD_STATUS_RESET = 0x01,
+	SAP_CARD_STATUS_NOT_ACC = 0x02,
+	SAP_CARD_STATUS_REMOVED = 0x03,
+	SAP_CARD_STATUS_INSERTED = 0x04,
+	SAP_CARD_STATUS_RECOVERED = 0x05,
+};
+
+/* Table 5.16: Possible values for ConnectionStatus */
+enum sap_conn_status_type {
+	SAP_CONN_STATUS_OK_READY = 0x00,
+	SAP_CONN_STATUS_ERROR_CONN = 0x01,
+	SAP_CONN_STATUS_ERROR_MAX_MSG_SIZE = 0x02,
+	SAP_CONN_STATUS_ERROR_SMALL_MSG_SIZE = 0x03,
+	SAP_CONN_STATUS_OK_CALL = 0x04,
+};
+
+extern const struct value_string sap_msg_names[];
+extern const struct value_string sap_param_names[];
+extern const struct value_string sap_result_names[];
+extern const struct value_string sap_card_status_names[];
+extern const struct value_string sap_conn_status_names[];
+
+struct sap_param {
+	uint8_t id;
+	uint16_t len;
+	uint8_t *value;
+};
+
+struct sap_msg {
+	uint8_t id;
+	uint8_t num_params;
+	struct sap_param *params;
+};
diff --git a/src/host/layer23/src/common/Makefile.am b/src/host/layer23/src/common/Makefile.am
index b76094c..9eed961 100644
--- a/src/host/layer23/src/common/Makefile.am
+++ b/src/host/layer23/src/common/Makefile.am
@@ -2,5 +2,5 @@
 AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBGPS_CFLAGS)
 
 noinst_LIBRARIES = liblayer23.a
-liblayer23_a_SOURCES = l1ctl.c l1l2_interface.c sap_interface.c \
+liblayer23_a_SOURCES = l1ctl.c l1l2_interface.c sap_proto.c sap_interface.c \
 	logging.c networks.c sim.c sysinfo.c gps.c l1ctl_lapdm_glue.c utils.c
diff --git a/src/host/layer23/src/common/sap_interface.c b/src/host/layer23/src/common/sap_interface.c
index a152c18..7b8717d 100644
--- a/src/host/layer23/src/common/sap_interface.c
+++ b/src/host/layer23/src/common/sap_interface.c
@@ -26,6 +26,7 @@
 #include <osmocom/bb/common/osmocom_data.h>
 #include <osmocom/bb/common/logging.h>
 #include <osmocom/bb/common/sap_interface.h>
+#include <osmocom/bb/common/sap_proto.h>
 
 #include <osmocom/core/utils.h>
 #include <osmocom/core/talloc.h>
@@ -47,77 +48,6 @@
 
 static void sap_connect(struct osmocom_ms *ms);
 
-/* Table 5.15: List of Parameter IDs */
-static const struct value_string sap_param_names[] = {
-	{ SAP_MAX_MSG_SIZE,		"MaxMsgSize" },
-	{ SAP_CONNECTION_STATUS,	"ConnectionStatus" },
-	{ SAP_RESULT_CODE,		"ResultCode" },
-	{ SAP_DISCONNECTION_TYPE,	"DisconnectionType" },
-	{ SAP_COMMAND_APDU,		"CommandAPDU" },
-	{ SAP_COMMAND_APDU_7816,	"CommandAPDU7816" },
-	{ SAP_RESPONSE_APDU,		"ResponseAPDU" },
-	{ SAP_ATR,			"ATR" },
-	{ SAP_CARD_READER_STATUS,	"CardReaderStatus" },
-	{ SAP_STATUS_CHANGE,		"StatusChange" },
-	{ SAP_TRANSPORT_PROTOCOL,	"TransportProtocol" },
-};
-
-/* Table 5.1: Message Overview */
-static const struct value_string sap_msg_names[] = {
-	{ SAP_CONNECT_REQ,			"CONNECT_REQ" },
-	{ SAP_CONNECT_RESP,			"CONNECT_RESP" },
-	{ SAP_DISCONNECT_REQ,			"DISCONNECT_REQ" },
-	{ SAP_DISCONNECT_RESP,			"DISCONNECT_RESP" },
-	{ SAP_DISCONNECT_IND,			"DISCONNECT_IND" },
-	{ SAP_TRANSFER_APDU_REQ,		"TRANSFER_APDU_REQ" },
-	{ SAP_TRANSFER_APDU_RESP,		"TRANSFER_APDU_RESP" },
-	{ SAP_TRANSFER_ATR_REQ,			"TRANSFER_ATR_REQ" },
-	{ SAP_TRANSFER_ATR_RESP,		"TRANSFER_ATR_RESP" },
-	{ SAP_POWER_SIM_OFF_REQ,		"POWER_SIM_OFF_REQ" },
-	{ SAP_POWER_SIM_OFF_RESP,		"POWER_SIM_OFF_RESP" },
-	{ SAP_POWER_SIM_ON_REQ,			"POWER_SIM_ON_REQ" },
-	{ SAP_POWER_SIM_ON_RESP,		"POWER_SIM_ON_RESP" },
-	{ SAP_RESET_SIM_REQ,			"RESET_SIM_REQ" },
-	{ SAP_RESET_SIM_RESP,			"RESET_SIM_RESP" },
-	{ SAP_TRANSFER_CARD_READER_STATUS_REQ,	"TRANSFER_CARD_READER_STATUS_REQ" },
-	{ SAP_TRANSFER_CARD_READER_STATUS_RESP,	"TRANSFER_CARD_READER_STATUS_RESP" },
-	{ SAP_STATUS_IND,			"STATUS_IND" },
-	{ SAP_ERROR_RESP,			"ERROR_RESP" },
-	{ SAP_SET_TRANSPORT_PROTOCOL_REQ,	"SET_TRANSPORT_PROTOCOL_REQ" },
-	{ SAP_SET_TRANSPORT_PROTOCOL_RESP,	"SET_TRANSPORT_PROTOCOL_RESP" },
-};
-
-/* Table 5.18: Possible values for ResultCode */
-static const struct value_string sap_result_names[] = {
-	{ SAP_RESULT_OK_REQ_PROC_CORR,		"OK, request processed correctly" },
-	{ SAP_RESULT_ERROR_NO_REASON,		"Error, no reason defined" },
-	{ SAP_RESULT_ERROR_CARD_NOT_ACC,	"Error, card not accessible" },
-	{ SAP_RESULT_ERROR_CARD_POWERED_OFF,	"Error, card (already) powered off" },
-	{ SAP_RESULT_ERROR_CARD_REMOVED,	"Error, card removed" },
-	{ SAP_RESULT_ERROR_CARD_POWERED_ON,	"Error, card already powered on" },
-	{ SAP_RESULT_ERROR_DATA_UNAVAIL,	"Error, data not available" },
-	{ SAP_RESULT_ERROR_NOT_SUPPORTED,	"Error, not supported "}
-};
-
-/* Table 5.19: Possible values for StatusChange */
-static const struct value_string sap_card_status_names[] = {
-	{ SAP_CARD_STATUS_UNKNOWN_ERROR,	"Unknown Error" },
-	{ SAP_CARD_STATUS_RESET,		"Card reset" },
-	{ SAP_CARD_STATUS_NOT_ACC,		"Card not accessible" },
-	{ SAP_CARD_STATUS_REMOVED,		"Card removed" },
-	{ SAP_CARD_STATUS_INSERTED,		"Card inserted" },
-	{ SAP_CARD_STATUS_RECOVERED,		"Card recovered" },
-};
-
-/* Table 5.16: Possible values for ConnectionStatus */
-static const struct value_string sap_conn_status_names[] = {
-	{ SAP_CONN_STATUS_OK_READY,		"OK, Server can fulfill requirements" },
-	{ SAP_CONN_STATUS_ERROR_CONN,		"Error, Server unable to establish connection" },
-	{ SAP_CONN_STATUS_ERROR_MAX_MSG_SIZE,	"Error, Server does not support maximum message size" },
-	{ SAP_CONN_STATUS_ERROR_SMALL_MSG_SIZE,	"Error, maximum message size by Client is too small" },
-	{ SAP_CONN_STATUS_OK_CALL,		"OK, ongoing call" },
-};
-
 static struct msgb *sap_create_msg(uint8_t id, uint8_t num_params, struct sap_param *params)
 {
 	struct msgb *msg;
@@ -181,9 +111,13 @@
 				get_value_string(sap_result_names, param->value[0]));
 	}
 
+#if 0
+	/* FIXME: ARRAY_SIZE() is not applicable to
+	 * extern const struct value_string[] */
 	if(param->value[0] > ARRAY_SIZE(sap_result_names)){
 		return -1;
 	}
+#endif
 
 	return 0;
 }
diff --git a/src/host/layer23/src/common/sap_proto.c b/src/host/layer23/src/common/sap_proto.c
new file mode 100644
index 0000000..c84a357
--- /dev/null
+++ b/src/host/layer23/src/common/sap_proto.c
@@ -0,0 +1,99 @@
+/*
+ * SAP (SIM Access Profile) protocol definition
+ * based on Bluetooth SAP specification
+ *
+ * (C) 2011 by Nico Golde <nico at ngolde.de>
+ * (C) 2018 by Vadim Yanitskiy <axilirator at gmail.com>
+ *
+ * All Rights Reserved
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+
+#include <osmocom/core/utils.h>
+
+#include <osmocom/bb/common/sap_proto.h>
+
+/* Table 5.1: Message Overview */
+const struct value_string sap_msg_names[] = {
+	{ SAP_CONNECT_REQ,			"CONNECT_REQ" },
+	{ SAP_CONNECT_RESP,			"CONNECT_RESP" },
+	{ SAP_DISCONNECT_REQ,			"DISCONNECT_REQ" },
+	{ SAP_DISCONNECT_RESP,			"DISCONNECT_RESP" },
+	{ SAP_DISCONNECT_IND,			"DISCONNECT_IND" },
+	{ SAP_TRANSFER_APDU_REQ,		"TRANSFER_APDU_REQ" },
+	{ SAP_TRANSFER_APDU_RESP,		"TRANSFER_APDU_RESP" },
+	{ SAP_TRANSFER_ATR_REQ,			"TRANSFER_ATR_REQ" },
+	{ SAP_TRANSFER_ATR_RESP,		"TRANSFER_ATR_RESP" },
+	{ SAP_POWER_SIM_OFF_REQ,		"POWER_SIM_OFF_REQ" },
+	{ SAP_POWER_SIM_OFF_RESP,		"POWER_SIM_OFF_RESP" },
+	{ SAP_POWER_SIM_ON_REQ,			"POWER_SIM_ON_REQ" },
+	{ SAP_POWER_SIM_ON_RESP,		"POWER_SIM_ON_RESP" },
+	{ SAP_RESET_SIM_REQ,			"RESET_SIM_REQ" },
+	{ SAP_RESET_SIM_RESP,			"RESET_SIM_RESP" },
+	{ SAP_TRANSFER_CARD_READER_STATUS_REQ,	"TRANSFER_CARD_READER_STATUS_REQ" },
+	{ SAP_TRANSFER_CARD_READER_STATUS_RESP,	"TRANSFER_CARD_READER_STATUS_RESP" },
+	{ SAP_STATUS_IND,			"STATUS_IND" },
+	{ SAP_ERROR_RESP,			"ERROR_RESP" },
+	{ SAP_SET_TRANSPORT_PROTOCOL_REQ,	"SET_TRANSPORT_PROTOCOL_REQ" },
+	{ SAP_SET_TRANSPORT_PROTOCOL_RESP,	"SET_TRANSPORT_PROTOCOL_RESP" },
+};
+
+/* Table 5.15: List of Parameter IDs */
+const struct value_string sap_param_names[] = {
+	{ SAP_MAX_MSG_SIZE,		"MaxMsgSize" },
+	{ SAP_CONNECTION_STATUS,	"ConnectionStatus" },
+	{ SAP_RESULT_CODE,		"ResultCode" },
+	{ SAP_DISCONNECTION_TYPE,	"DisconnectionType" },
+	{ SAP_COMMAND_APDU,		"CommandAPDU" },
+	{ SAP_COMMAND_APDU_7816,	"CommandAPDU7816" },
+	{ SAP_RESPONSE_APDU,		"ResponseAPDU" },
+	{ SAP_ATR,			"ATR" },
+	{ SAP_CARD_READER_STATUS,	"CardReaderStatus" },
+	{ SAP_STATUS_CHANGE,		"StatusChange" },
+	{ SAP_TRANSPORT_PROTOCOL,	"TransportProtocol" },
+};
+
+/* Table 5.18: Possible values for ResultCode */
+const struct value_string sap_result_names[] = {
+	{ SAP_RESULT_OK_REQ_PROC_CORR,		"OK, request processed correctly" },
+	{ SAP_RESULT_ERROR_NO_REASON,		"Error, no reason defined" },
+	{ SAP_RESULT_ERROR_CARD_NOT_ACC,	"Error, card not accessible" },
+	{ SAP_RESULT_ERROR_CARD_POWERED_OFF,	"Error, card (already) powered off" },
+	{ SAP_RESULT_ERROR_CARD_REMOVED,	"Error, card removed" },
+	{ SAP_RESULT_ERROR_CARD_POWERED_ON,	"Error, card already powered on" },
+	{ SAP_RESULT_ERROR_DATA_UNAVAIL,	"Error, data not available" },
+	{ SAP_RESULT_ERROR_NOT_SUPPORTED,	"Error, not supported "}
+};
+
+/* Table 5.19: Possible values for StatusChange */
+const struct value_string sap_card_status_names[] = {
+	{ SAP_CARD_STATUS_UNKNOWN_ERROR,	"Unknown Error" },
+	{ SAP_CARD_STATUS_RESET,		"Card reset" },
+	{ SAP_CARD_STATUS_NOT_ACC,		"Card not accessible" },
+	{ SAP_CARD_STATUS_REMOVED,		"Card removed" },
+	{ SAP_CARD_STATUS_INSERTED,		"Card inserted" },
+	{ SAP_CARD_STATUS_RECOVERED,		"Card recovered" },
+};
+
+/* Table 5.16: Possible values for ConnectionStatus */
+const struct value_string sap_conn_status_names[] = {
+	{ SAP_CONN_STATUS_OK_READY,		"OK, Server can fulfill requirements" },
+	{ SAP_CONN_STATUS_ERROR_CONN,		"Error, Server unable to establish connection" },
+	{ SAP_CONN_STATUS_ERROR_MAX_MSG_SIZE,	"Error, Server does not support maximum message size" },
+	{ SAP_CONN_STATUS_ERROR_SMALL_MSG_SIZE,	"Error, maximum message size by Client is too small" },
+	{ SAP_CONN_STATUS_OK_CALL,		"OK, ongoing call" },
+};

-- 
To view, visit https://gerrit.osmocom.org/12467
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iad9b3d88b02cc7ec4cf64483bbc85e3a61c9ad10
Gerrit-Change-Number: 12467
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190104/4999dd2c/attachment.htm>


More information about the gerrit-log mailing list