aboutsummaryrefslogtreecommitdiffstats
path: root/samsung-ipc/net.c
blob: 994e9ef96ed2282181593f3f1ecd84c5a5eebd3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/**
 * This file is part of libsamsung-ipc.
 *
 * Copyright (C) 2010-2011 Joerie de Gram <j.de.gram@gmail.com
 *
 * libsamsung-ipc 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 3 of the License, or
 * (at your option) any later version.
 *
 * libsamsung-ipc 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 libsamsung-ipc.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

#include <radio.h>

void ipc_net_regist_setup(struct ipc_net_regist_get *message, unsigned char domain)
{
    message->net = 0xff;
    message->domain = domain;
}

void ipc_net_plmn_sel_setup(struct ipc_net_plmn_sel *message, unsigned char mode, unsigned char *plmn)
{
    if (mode == IPC_NET_PLMN_SEL_MODE_AUTO)
    {
        message->mode = IPC_NET_PLMN_SEL_MODE_AUTO;
        message->unk1 = 0xff;
    }
    else if (mode == IPC_NET_PLMN_SEL_MODE_MANUAL)
    {
        message->mode = IPC_NET_PLMN_SEL_MODE_MANUAL;
        strncpy(message->plmn, plmn, 5);
        message->unk0 = 0x23;
        message->unk1 = 0x4;
    }
}

// vim:ts=4:sw=4:expandtab