资源简介
一个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 ==
相关资源
- 很好的幼儿园网站源码
- FreeRTOS V7.4.2(官方原版)
- SpringMvc自动任务调度之task实现项目源
- 网上商城项目源码
- vue 饿了吗vue源码
- 鲜花销售系统源码
- PCIE FPGA工程源码
- 一个美食网站的源码 包括前后台
- w5100打包整理原理图源码全套解决方案
- 合同管理系统源码+设计文档
- 15款Flash AS3.0游戏源码文件
- 房屋租赁管理系统源码 房屋租赁管理
- QT实现日志文件备份功能(源码
- 仿新浪抢工长装修招标网站源码老工
- 一个很好的WCF 架构ERP 项目源码
- .Net药店管理系统源码
- 一种有效的稀疏编码源码
- 2018年吉林省电子设计竞赛智能物流车
- 《x86汇编语言:从实模式到保护模式
- SSM框架源码
- 基于安卓开发医疗诊断系统含设计文
- MUI做的手机购物网站的THML源码
- 钢铁侠启动盘源码
- modbus-主机-stm32移植源码与调试工具
- 列车运行图自动生成系统的设计
- Spring + JPA + Hibernate配置
- 北风网手机进销存系统源码
- 网上订餐系统论文和源码
- 王者荣耀源码.rar
- struts2 spring hibernate框架技术与项目实
评论
共有 条评论