⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sessctl.h

📁 简单的基于SIP的会话边界控制器
💻 H
字号:
/*
 * SIP Sesssion Controller
 * Save the session information
 */

#ifndef _SESSCTL_H
#define _SESSCTL_H

#define SESSCTL_DEBUG 0		/* Print debug information */
#define SESSNUM_SIZE 200

struct sip_sess_ctl_t {
	int active;
	char cid_old[CALLID_SIZE];	/* original call id */
	char cid_new[CALLID_SIZE];	/* rewrited call id */
	char from_host[HOSTNAME_SIZE];	/* caller hostname */
	char from_port[PORT_SIZE];	/* caller port number */
};

/* Session Information Table */
struct sip_sess_ctl_t sip_sess_ctl[SESSNUM_SIZE];


/* Find element based on call id */
int sessctl_find(const struct sip_sess_ctl_t sessctl_queue[], char *cid, int num);
/* New Session Information */
int sessctl_new(struct sip_sess_ctl_t sessctl_queue[], char *old_cid, char *new_cid, 
			char *from, char *to, int num);
/* Free Session Information */
int sessctl_free(struct sip_sess_ctl_t sessctl_queue[],  int idx);
/* Update Session Informaiton */
int sessctl_update(struct sip_sess_ctl_t sessctl_queue[], char *old_cid, char *new_cid, 
			char *from, char *to, int num);

#endif	/* !_SESSCTL_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -