Add PN_GSS codepoints and debugging

This commit is contained in:
Aki Niemi 2010-02-04 23:39:30 +02:00
parent 8d4004d182
commit bf6195f0c2
4 changed files with 89 additions and 1 deletions

View File

@ -102,7 +102,8 @@ builtin_sources += $(gisi_sources) \
drivers/isimodem/call-settings.c \
drivers/isimodem/call-barring.c \
drivers/isimodem/call-meter.c \
drivers/isimodem/ss.h
drivers/isimodem/ss.h \
drivers/isimodem/gss.h
endif
if ATMODEM

View File

@ -49,6 +49,7 @@ const char *pn_resource_name(int value)
_(PN_SMS);
_(PN_SIM);
_(PN_MTC);
_(PN_GSS);
}
return "PN_<UNKNOWN>";
}
@ -746,6 +747,24 @@ const char *net_subblock_name(enum net_subblock value)
return "NET_<UNKNOWN>";
}
const char *gss_message_id_name(enum gss_message_id value)
{
switch (value) {
_(GSS_CS_SERVICE_REQ);
_(GSS_CS_SERVICE_RESP);
_(GSS_CS_SERVICE_FAIL_RESP);
}
return "GSS_<UNKNOWN>";
}
const char *gss_subblock_name(enum gss_subblock value)
{
switch (value) {
_(GSS_RAT_INFO);
}
return "GSS_<UNKNOWN>";
}
#undef _
static void hex_dump(const char *name, const uint8_t m[], size_t len)
@ -816,3 +835,9 @@ void net_debug(const void *restrict buf, size_t len, void *data)
const uint8_t *m = buf;
hex_dump(net_message_id_name(m[0]), m, len);
}
void gss_debug(const void *restrict buf, size_t len, void *data)
{
const uint8_t *m = buf;
hex_dump(gss_message_id_name(m[0]), m, len);
}

View File

@ -29,6 +29,7 @@
#include "info.h"
#include "call.h"
#include "network.h"
#include "gss.h"
const char *ss_message_id_name(enum ss_message_id value);
const char *ss_subblock_name(enum ss_subblock value);
@ -61,6 +62,9 @@ const char *net_status_name(enum net_reg_status value);
const char *net_message_id_name(enum net_message_id value);
const char *net_subblock_name(enum net_subblock value);
const char *gss_message_id_name(enum gss_message_id value);
const char *gss_subblock_name(enum gss_subblock value);
void ss_debug(const void *restrict buf, size_t len, void *data);
void mtc_debug(const void *restrict buf, size_t len, void *data);
void sms_debug(const void *restrict buf, size_t len, void *data);
@ -68,6 +72,7 @@ void sim_debug(const void *restrict buf, size_t len, void *data);
void info_debug(const void *restrict buf, size_t len, void *data);
void call_debug(const void *restrict buf, size_t len, void *data);
void net_debug(const void *restrict buf, size_t len, void *data);
void gss_debug(const void *restrict buf, size_t len, void *data);
const char *pn_resource_name(int value);

57
drivers/isimodem/gss.h Normal file
View File

@ -0,0 +1,57 @@
/*
* This file is part of oFono - Open Source Telephony
*
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
*
* 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.
*
* 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 St, Fifth Floor, Boston, MA
* 02110-1301 USA
*
*/
#ifndef __ISIMODEM_GSS_H
#define __ISIMODEM_GSS_H
#ifdef __cplusplus
extern "C" {
#endif
#define PN_GSS 0x32
#define GSS_TIMEOUT 5
enum gss_message_id {
GSS_CS_SERVICE_REQ = 0x00,
GSS_CS_SERVICE_RESP = 0x01,
GSS_CS_SERVICE_FAIL_RESP = 0x02
};
enum gss_subblock {
GSS_RAT_INFO = 0x0B
};
enum gss_selection_mode {
GSS_DUAL_RAT = 0x00,
GSS_GSM_RAT = 0x01,
GSS_UMTS_RAT = 0x02
};
enum gss_operation {
GSS_SELECTED_RAT_WRITE = 0x0E,
GSS_SELECTED_RAT_READ = 0x9C
};
#ifdef __cplusplus
};
#endif
#endif /* !__ISIMODEM_GSS_H */