2 * This file is part of libsamsung-ipc.
4 * Copyright (C) 2010-2011 Joerie de Gram <j.de.gram@gmail.com>
5 * Copyright (C) 2011 Simon Busch <morphis@gravedo.de>
6 * Copyright (C) 2011-2014 Paul Kocialkowski <contact@paulk.fr>
8 * libsamsung-ipc is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 2 of the License, or
11 * (at your option) any later version.
13 * libsamsung-ipc is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with libsamsung-ipc. If not, see <http://www.gnu.org/licenses/>.
22 #include <samsung-ipc.h>
24 #ifndef __SAMSUNG_IPC_NET_H__
25 #define __SAMSUNG_IPC_NET_H__
31 #define IPC_NET_PREF_PLMN 0x0801
32 #define IPC_NET_PLMN_SEL 0x0802
33 #define IPC_NET_CURRENT_PLMN 0x0803
34 #define IPC_NET_PLMN_LIST 0x0804
35 #define IPC_NET_REGIST 0x0805
36 #define IPC_NET_SUBSCRIBER_NUM 0x0806
37 #define IPC_NET_BAND_SEL 0x0807
38 #define IPC_NET_SERVICE_DOMAIN_CONFIG 0x0808
39 #define IPC_NET_POWERON_ATTACH 0x0809
40 #define IPC_NET_MODE_SEL 0x080A
41 #define IPC_NET_ACQ_ORDER 0x080B
42 #define IPC_NET_IDENTITY 0x080C
43 #define IPC_NET_CURRENT_RRC_STATUS 0x080D
49 #define IPC_NET_PLMN_SEL_MANUAL 0x03
50 #define IPC_NET_PLMN_SEL_AUTO 0x02
52 #define IPC_NET_MODE_SEL_GSM_UMTS 0x01
53 #define IPC_NET_MODE_SEL_GSM_ONLY 0x02
54 #define IPC_NET_MODE_SEL_UMTS_ONLY 0x03
56 #define IPC_NET_ACCESS_TECHNOLOGY_UNKNOWN 0xFF
57 #define IPC_NET_ACCESS_TECHNOLOGY_GSM 0x00
58 #define IPC_NET_ACCESS_TECHNOLOGY_GSM2 0x01
59 #define IPC_NET_ACCESS_TECHNOLOGY_GPRS 0x02
60 #define IPC_NET_ACCESS_TECHNOLOGY_EDGE 0x03
61 #define IPC_NET_ACCESS_TECHNOLOGY_UMTS 0x04
63 #define IPC_NET_PLMN_STATUS_AVAILABLE 0x02
64 #define IPC_NET_PLMN_STATUS_CURRENT 0x03
65 #define IPC_NET_PLMN_STATUS_FORBIDDEN 0x04
67 #define IPC_NET_SERVICE_DOMAIN_GSM 0x02
68 #define IPC_NET_SERVICE_DOMAIN_GPRS 0x03
70 #define IPC_NET_REGISTRATION_STATUS_NONE 0x01
71 #define IPC_NET_REGISTRATION_STATUS_HOME 0x02
72 #define IPC_NET_REGISTRATION_STATUS_SEARCHING 0x03
73 #define IPC_NET_REGISTRATION_STATUS_EMERGENCY 0x04
74 #define IPC_NET_REGISTRATION_STATUS_UNKNOWN 0x05
75 #define IPC_NET_REGISTRATION_STATUS_ROAMING 0x06
81 struct ipc_net_plmn_sel_response_data {
82 unsigned char plmn_sel; // IPC_NET_PLMN_SEL
83 } __attribute__((__packed__));
85 struct ipc_net_plmn_sel_request_data {
86 unsigned char mode_sel; // IPC_NET_MODE_SEL
88 unsigned char act; // IPC_NET_ACCESS_TECHNOLOGY
89 } __attribute__((__packed__));
91 struct ipc_net_current_plmn_data {
92 unsigned char unknown[3];
96 } __attribute__((__packed__));
98 struct ipc_net_plmn_list_header {
100 } __attribute__((__packed__));
102 struct ipc_net_plmn_list_entry {
103 unsigned char status; // IPC_NET_PLMN_STATUS
106 unsigned char unknown[2];
107 } __attribute__((__packed__));
109 struct ipc_net_regist_request_data {
110 unsigned char act; // IPC_NET_ACCESS_TECHNOLOGY
111 unsigned char domain; // IPC_NET_SERVICE_DOMAIN
112 } __attribute__((__packed__));
114 struct ipc_net_regist_response_data {
115 unsigned char act; // IPC_NET_ACCESS_TECHNOLOGY
116 unsigned char domain; // IPC_NET_SERVICE_DOMAIN
117 unsigned char status; // IPC_NET_REGISTRATION_STATUS
121 unsigned char fail_cause;
122 } __attribute__((__packed__));
124 struct ipc_net_mode_sel_data {
125 unsigned char mode_sel; // IPC_NET_MODE_SEL
126 } __attribute__((__packed__));
132 void ipc_net_regist_setup(struct ipc_net_regist_request_data *message,
133 unsigned char domain);
134 void ipc_net_plmn_sel_set_setup(struct ipc_net_plmn_sel_request_data *message,
135 unsigned char mode, char *plmn, unsigned char act);
139 // vim:ts=4:sw=4:expandtab