4 * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
7 * Sooyoung Ha <yoosah.ha@samsung.com>
8 * YeongKyoon Lee <yeongkyoon.lee@samsung.com>
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
29 #include "oem_tx_gprs.h"
30 #include "linuxtapi.h"
32 #include "vgsm_gprs.h"
34 #include "vgsm_gprs.h"
37 #include "server_tx_gprs.h"
40 extern GprsConfList g_gprs_conflist;
41 extern GSM_SetPDPContext g_pdpcontext;
43 int server_tx_gprs_ipconf_match(void)
47 for (i = 0; i < g_gprs_conflist.num; i++) {
48 log_msg(MSGL_VGSM_INFO,"apn(%s) conflist[%d](%s) \n"
49 , g_pdpcontext.apn, i, g_gprs_conflist.pentry[i].apn);
50 if (strcmp(g_pdpcontext.apn, g_gprs_conflist.pentry[i].apn) != 0)
57 int server_tx_gprs_IPConfigurationNotify(LXT_MESSAGE const* packet)
59 TRACE(MSGL_VGSM_INFO, "\n");
61 char sndbuf[SEND_BUF_SIZE];
62 memset(sndbuf, '\0', sizeof(sndbuf));
64 char* pdp_type = NULL;
66 switch(g_pdpcontext.pdp_type)
68 case GSM_GPRS_DEFINE_PDP_CONTEXT_P_TYPE_IP:
71 case GSM_GPRS_DEFINE_PDP_CONTEXT_P_TYPE_PPP:
74 case GSM_GPRS_DEFINE_PDP_CONTEXT_P_TYPE_IPV6:
83 vgsm_gprs_database_restore();
85 sprintf(sndbuf, "%s%d,%s,%s,%s,%d,%d%s", CGDCONT, g_pdpcontext.cid, pdp_type, g_pdpcontext.apn, g_pdpcontext.pdp_addr, g_pdpcontext.d_comp, g_pdpcontext.h_comp, CRLF);
87 log_msg(MSGL_VGSM_INFO,"packet:%s, length:%zu\n", sndbuf, strlen(sndbuf));
89 return oem_tx_gprs_IPConfigurationNotify(sndbuf, strlen(sndbuf));