📄 sndremote.c
字号:
/*
* BANKING TRANSACTION SWITCHING SYSTEM (version 1.0).
*
* (C) COPYRIGHT International Business Machines Corp. 1997
* All Rights Reserved
* Licensed Materials - Property of IBM
*/
/*
***************************************************************************
* (1) File Name : sndremote.c *
* (2) Module ID : *
* (3) Module Name : Send message to remote monitor module. *
* *
* (4) Purpose : 1. Initialize the object for remote communication.*
* 2. Send a byte string to remote monitor. *
* 3. Close the object for remote communication. *
* *
* (5) Author : Chen Li (IBM China) *
* (6) Date Created : 1997/06/01 *
* (7) Version : 1.0 *
* (8) Environment : AIX 4.x *
* (9) Warnings : *
***************************************************************************
* (10) Changed Logs : *
* Change No. Date Author Reason For Change *
* *
***************************************************************************
*/
#include <stdio.h>
#include <stdlib.h>
#include "udp_send.h"
int initFlag = 0;
int InitRemoteCommObj()
{
int ret;
int fn[1024];
char *p;
p = getenv("HOME");
strcpy(fn, p);
strcat(fn, "/etc/remotenet.data");
ret = ReadNetCfgFile(fn);
if (ret < 0)
return -1;
ret = UDP_Init();
if (ret < 0)
return -2;
initFlag = 1;
return 0;
}
int SendToRemote(int netid, const unsigned char* msg, int len)
{
if (initFlag == 0)
return -1;
return(SysBoraccastToNet(netid-1, msg, len));
}
int CloseRemoteCommObj()
{
UDP_Close();
initFlag = 0;
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -