资源简介
一个SIP协议栈的实现源码,对sip协议进行了完整的封装。
Implementation of a SIP protocol stack source code, to sip protocol complete package.
代码片段和文件信息
/*
* This program 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 2 of the License or
* (at your option) any later version.
*
* 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. 59 Temple Place Suite 330 Boston MA 02111-1307 USA
*
* Authors : Benjamin GAUTHIER - 24 Mar 2004
* Joseph BANINO
* Olivier JACQUES
* Richard GAYRAUD
* From Hewlett Packard Company.
* Guillaume Teissier from FTR&D
*/
#include “sipp.hpp“
#include
#ifdef PCAPPLAY
#include “prepare_pcap.h“
#endif
static const char* strIntCmd(CAction::T_IntCmdType type)
{
switch (type)
{
case CAction::E_INTCMD_STOPCALL:
return “stop_call“;
case CAction::E_INTCMD_STOP_ALL:
return “stop_gracefully“;
case CAction::E_INTCMD_STOP_NOW:
return “stop_now“;
default:
case CAction::E_INTCMD_INVALID:
return “invalid“;
}
return “invalid“;
}
const char * CAction::comparatorToString(T_Comparator comp) {
switch(comp) {
case E_C_EQ:
return “==“;
case E_C_NE:
return “!=“;
case E_C_GT:
return “>“;
case E_C_LT:
return “<“;
case E_C_GEQ:
return “>=“;
case E_C_LEQ:
return “<=“;
default:
return “invalid“;
}
}
bool CAction::compare(VariableTable *variableTable) {
double lhs = variableTable->getVar(M_varInId)->getDouble();
double rhs = M_doubleValue;
switch(M_comp) {
case E_C_EQ:
return lhs == rhs;
case E_C_NE:
return lhs != rhs;
case E_C_GT:
return lhs > rhs;
case E_C_LT:
return lhs < rhs;
case E_C_GEQ:
return lhs >= rhs;
case E_C_LEQ:
return lhs <= rhs;
default:
ERROR(“Internal error: Invalid comparison type %d“ M_comp);
return false; /* Shut up warning. */
}
}
void CAction::afficheInfo()
{
if (M_action == E_AT_ASSIGN_FROM_REGEXP) {
if(M_lookingPlace == E_LP_MSG) {
printf(“Type[%d] - regexp[%s] where[%s] - checkIt[%d] - $%s“
M_action
M_regularexpression
“Full Msg“
M_checkIt
display_scenario->allocVars->getName(M_varId));
} else {
printf(“Type[%d] - regexp[%s] where[%s-%s] - checkIt[%d] - $%d“
M_action
M_regularexpression
“Header“
M_lookingChar
M_checkIt display_scenario->allocVars->getName(M_varId));
}
} else if (M_action ==
相关资源
- E4A无障碍跨程序操作类库(带源码、
- 设备管理系统源码
- 安卓wifi直连app源码
- 我的世界源码(易语言版)
- labview编程软件滤波器以及编写程序设
- 我的界面(visual foxpro)源码
- 易语言:一键cf基址源码
- The Secret Path 3D 3D魔方迷宫[源码][scra
- scratch垃圾分类源码(最终版本).sb
- 由浅入深,蓝牙4.0/BLE协议栈开发攻略
- 安卓QQ6.71协议源码易语言,qq协议源码
- 编译原理实验工具及参考源码(lex&
- E盾偷后台工具源码
- UNIX/LINUX编程实践教程的源码
- 十以内加减法练习 powerbuilder源码
- 农场开发项目
- OCR源码
- PLC上位机编程软件
- 用foobar2000听google音乐[更新一下]
- 学生信息管理系统源码
- 用VC 编写的仿QQ聊天室程序源代码
- 毕业论文之温度传感器DS18B20(源码
- 可自定义导航网站源码
- 栅栏填充算法源码(VC)
- msp430F149操作红外接收模块源码
- [免费]图像识别c 源码
- 周易排盘源码
- SIP电话实例
- RSA算法源码
- 一个人脸识别程序源码
评论
共有 条评论