Let kannel 1.4.3 support the bootstrap of the WiMAX

本文介绍如何在Kannel1.4.3中为WiMAX设备增加启动支持,包括修改源代码、重新编译及运行步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Let kannel 1.4.3 support the bootstrap of the WiMAX

1.If kannel is runing,stop it first.

wget http://localhost:13000/shutdown?password=bar

2.Modify the pack_accept() function for the Bootstrap of the WiMAX in the wsp_header.c.

static int pack_accept(Octstr *packed, Octstr *value)
{
List *parms;
long media;
char *wi_bootstrap;
char wb_buf[50];

parms = wsp_strip_parameters(value);
/* XXX we need to obey which WSP encoding-version to use */
media = wsp_string_to_content_type(value);
/* media = wsp_string_to_versioned_content_type(value, WSP_1_2);*/

/* added by javen for wimax bootstrap */
wi_bootstrap = "application/vnd.wmf.bootstrap";
octstr_get_many_chars(wb_buf, value, 0, strlen(wi_bootstrap));
//printf("buf is:\n");
//printf("%s\n",buf);
wb_buf[strlen(wi_bootstrap)] = '\0';
if (strcmp(wb_buf, wi_bootstrap) == 0){
media = 0x0318;
}
//printf("strcmp(a,b): %d\n", strcmp(wb_buf, wi_bootstrap));
//printf("media is:\n");//=792
//printf("%d\n",media);

/* See if we can fit this in a Constrained-media encoding */
if (parms == NULL && media <= MAX_SHORT_INTEGER) {
wsp_pack_constrained_value(packed, value, media);
//printf("parms == NULL && media <= MAX_SHORT_INTEGER");
} else {
Octstr *encoding = octstr_create("");

if (media >= 0)
wsp_pack_integer_value(encoding, media);
else
wsp_pack_text(encoding, value);

wsp_pack_parameters(encoding, parms);
wsp_pack_value(packed, encoding);
octstr_destroy(encoding);
}

gwlist_destroy(parms, parm_destroy_item);
return 0;
}

3.Compile the kannel 1.4.3 again

make
make bindir=/OneMS/gateway-1.4.3/bin install

4.Run the the kannel 1.4.3 again


./bearerbox -v 1 pushkannel.conf &
./wapbox -v 1 pushkannel.conf &

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值