sessctl.h

来自「简单的基于SIP的会话边界控制器」· C头文件 代码 · 共 36 行

H
36
字号
/*
 * 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 + =
减小字号Ctrl + -
显示快捷键?