主要类型定义:

1、osip_t

/*** Structure for osip handling.* In order to use osip, you have to manage at least one global instance* of an osip_t element. Then, you'll register a set of required callbacks* and a set of optional ones.* @var osip_t*/typedef struct osip osip_t;/*** Structure for osip handling.* @struct osip*/struct osip {void *application_context;/**< User defined Pointer *//* list of transactions for ict, ist, nict, nist */osip_list_t osip_ict_transactions;/**< list of ict transactions */osip_list_t osip_ist_transactions;/**< list of ist transactions */osip_list_t osip_nict_transactions;/**< list of nict transactions */osip_list_t osip_nist_transactions;/**< list of nist transactions */osip_list_t ixt_retransmissions;/**< list of ixt elements */osip_message_cb_t msg_callbacks[OSIP_MESSAGE_CALLBACK_COUNT];     /**@internal */osip_kill_transaction_cb_t kill_callbacks[OSIP_KILL_CALLBACK_COUNT];/**@internal */osip_transport_error_cb_ttp_error_callbacks[OSIP_TRANSPORT_ERROR_CALLBACK_COUNT];/**@internal */int (*cb_send_message) (osip_transaction_t *, osip_message_t *, char *,int, int);/**@internal */#if defined(HAVE_DICT_DICT_H)dict *osip_ict_hastable;          /**< htable of ict transactions */dict *osip_ist_hastable;          /**< htable of ist transactions */dict *osip_nict_hastable;          /**< htable of nict transactions */dict *osip_nist_hastable;          /**< htable of nist transactions */
#endif};注意:
1、ict, ist, nict, nist是osip的四种状态机

2、osip_fsm_type_t

/*** Enumeration for transaction type.* A transaction can be either of:*  ICT,*  IST,*  NICT,*  NIST,*/typedef enum osip_fsm_type_t {ICT,/**< Invite Client (outgoing) Transaction */IST,/**< Invite Server (incoming) Transaction */NICT,/**< Non-Invite Client (outgoing) Transaction */NIST/**< Non-Invite Server (incoming) Transaction */} osip_fsm_type_t;

主要函数定义:

1、osip 4中状态机ict, ist, nict, nist事务处理核心函数osip_*_execute:

/*** Consume ALL pending osip_event_t previously added in the fifos of ict transactions.* @param osip The element to work on.*/int osip_ict_execute(osip_t * osip);
/*** Consume ALL pending osip_event_t previously added in the fifos of ist transactions.* @param osip The element to work on.*/int osip_ist_execute(osip_t * osip);
/*** Consume ALL pending osip_event_t previously added in the fifos of nict transactions.* @param osip The element to work on.*/int osip_nict_execute(osip_t * osip);
/*** Consume ALL pending osip_event_t previously added in the fifos of nist transactions.* @param osip The element to work on.*/int osip_nist_execute(osip_t * osip);

2、osip_timers_gettimeout

/*** Retreive the minimum timer value to be used by an application* so that the osip_timer_*_execute method don't have to be called* often.* * @param osip The element to work on.* @param lower_tv The minimum timer when the application should wake up.*/void osip_timers_gettimeout(osip_t * osip, struct timeval *lower_tv);

3、osip_timers_*_execute

/*** Check if an ict transactions needs a timer event.* @param osip The element to work on.*/void osip_timers_ict_execute(osip_t * osip);
/*** Check if an ist transactions needs a timer event.* @param osip The element to work on.*/void osip_timers_ist_execute(osip_t * osip);
/*** Check if a nict transactions needs a timer event.* @param osip The element to work on.*/void osip_timers_nict_execute(osip_t * osip);
/*** Check if a nist transactions needs a timer event.* @param osip The element to work on.*/void osip_timers_nist_execute(osip_t * osip);

aa

osip_fsm_type_t

osip2 代码分析相关推荐

  1. 20145236《网络攻防》Exp4 恶意代码分析

    20145236<网络攻防>Exp4 恶意代码分析 一.基础问题回答 如果在工作中怀疑一台主机上有恶意代码,但只是猜想,所有想监控下系统一天天的到底在干些什么.请设计下你想监控的操作有哪些 ...

  2. C#中类的继承 override virtual new的作用以及代码分析

    继承中override virtual new的作用 virtual 父类中需要注明允许重写的方法: override 子类中必须显示声明该方法是重写的父类中的方法: new 子类中忽略父类的已存在的 ...

  3. 2017.4.18 静态代码分析工具sonarqube+sonar-runner的安装配置及使用

    配置成功后的代码分析页面: 可以看到对复杂度.语法使用.重复度等等都做了分析,具体到了每一个方法和每一句代码. 四种使用方式: sonarqube + sonar-runner sonarqube + ...

  4. lighttpd1.4.18代码分析

    lighttpd1.4.18代码分析(八)--状态机(2)CON_STATE_READ状态 posted @ 2008-09-24 10:50 那谁 阅读(2225) | 评论 (1)  编辑 lig ...

  5. Device Tree(三):代码分析

    2019独角兽企业重金招聘Python工程师标准>>> 一.前言 Device Tree总共有三篇,分别是: 1.为何要引入Device Tree,这个机制是用来解决什么问题的?(请 ...

  6. 使用Hadoop和ELK进行业务代码分析!分分钟捉到Bug!

    大数据是计算领域的新高地,它有望提供一种方法来应对二十一世纪不断增长的数据生成.越来越多的大数据爱好者正在涌现,越来越多的公司正在采用各种大数据平台,并希望提出以客户为中心的解决方案,帮助他们在竞争激 ...

  7. 20145328 《网络对抗技术》恶意代码分析

    20145328 <网络对抗技术>恶意代码分析 ------看到这句话说明还没写完-------- 实践内容: 使用schtasks指令监控系统运行 使用sysmon工具监控系统运行 使用 ...

  8. starGAN原理代码分析

    下载: git clone https://github.com/yunjey/StarGAN.git 1 cd StarGAN/ 1 下载celebA训练数据: bash download.sh 1 ...

  9. tensorflow笔记:多层CNN代码分析

    tensorflow笔记系列:  (一) tensorflow笔记:流程,概念和简单代码注释  (二) tensorflow笔记:多层CNN代码分析  (三) tensorflow笔记:多层LSTM代 ...

最新文章

  1. 稳健+成长股池(转载)
  2. Java学习记录(补充三:String类)
  3. boost::pfr::tuple_size相关的测试程序
  4. 推荐六款帮助你实现惊艳视差滚动效果的 jQuery 插件
  5. 【Pytorch神经网络实战案例】08 识别黑白图中的服装图案(Fashion-MNIST)
  6. 1.5编程基础之循环控制 38 计算多项式的导函数
  7. 《Linux内核设计与实现》读书笔记(2)--- 进程管理
  8. 学习笔记(1):uni-app实战社区交友类app开发-引入自定义图标库
  9. FF官宣新CFO推进融资和产品交付 贾跃亭激动发声
  10. 想了很久,我还是来了;天天看blog我也就想自己拥有一个了,好事。。。。坚持。。。。...
  11. 日报系统、周报系统推荐
  12. 一文告诉你Java素数怎么判断
  13. 字体主题宝库:25款很好看的液晶数字字体下载
  14. 小米出品——gRPC Name Resolver 原理及实践
  15. python (与C的差别)
  16. 山西省 建筑标准规范 合集
  17. 【超详细图解】字符串匹配Boyer-Moore算法:文本编辑器中的查找功能是如何实现的?
  18. hbw-utils - 基本数据类型进制转换的实现
  19. 凸多面体的表示-H-representation和V-representation
  20. 基于Python的简单验证码识别

热门文章

  1. Linux定时器接口
  2. POJ 3186Treats for the Cows (区间DP)
  3. PHP网站如何解决大流量与高并发的问题
  4. 我要学ASP.NET MVC 3.0(十六): MVC 3.0 实例系列之表格数据的分页
  5. 小熊的人生回忆(八)
  6. Spring自学日志02(对象的创建,依赖注入)
  7. SQL中不建议使用 where 1=1 的说法,是错误的
  8. JavaScript——面向对象之继承(原型对象)与多态(重载、重写)
  9. 用Java实现一个简单的链表迭代器
  10. C语言sizeof和strlen的含义,用法和区别