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

📄 msd.c

📁 一个Megaco实现源代码
💻 C
字号:
#include <stdlib.h>#include <stdio.h>#include "ic.h"#include "megaco_session.h"#define INBUFSZ    2048#define OUTBUFSZ   2048static ___map___* InitSwitch();int main(int args, char** argv) {  FILE* fd;  int   i,j;  ___map___*         map;  CORBA_Environment* senvP;    CORBA_Environment* renvP;      senvP = CORBA_Environment_alloc(INBUFSZ, OUTBUFSZ);   renvP = CORBA_Environment_alloc(INBUFSZ, OUTBUFSZ);   map = InitSwitch();    printf("starting\n");    if ((fd = fopen("msg.txt", "r")) == NULL) {    fprintf(stderr, "failed opening message file\n");    exit(EXIT_FAILURE);  }  for (i = 0; fscanf(fd, "%02x", &j) != EOF; i++) {    senvP->_inbuf[i] = (char)j;  }    senvP->_inbufsz = i;  for (; i < senvP->_inbufsz ; i++)    senvP->_inbuf[i] = 0;      printf("message read\n");  ___switch___(renvP, senvP, map);    printf("done\n");  exit(EXIT_SUCCESS);}static ___map___* InitSwitch() {        ___map___ marray[3] = {       ___Megaco_SessionUser_map___,	___MegacoSessionTcpUser_map___, 	___MegacoSessionUdpUser_map___    };      return ___merge___(marray,3);}

⌨️ 快捷键说明

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