User's Manual

Table Of Contents
SDK SCR-API ______________________________________________ Boomer II User Manual & Integrator’s Guide
Wavenet Technology 158 BM210012WT27
*l_msg The SCRMsg structure to have its internal memory allocations
freed. Note that the SCRMsg structure itself is not freed.
Output: None
Example
Refer to the example for the function scr_Decode() on the previous
page.
scr_EncodeLogin()
Prototype:
int scr_EncodeLogin(byte *l_buf, char *l_hostid, char *l_passwd)
Description
For DataTAC
®
5000 Networks Only. This function is used to encode
the RNG login packet that is sent to the RNG when the connection is
first established.
Input:
*l_buf The buffer for the encoded login packet to be returned in. When
calling this function, this parameter must point to an allocated
buffer of at least SCR_MAX_LEN bytes.
*l_hostid The DataTAC host login or host id
*l_passwd The DataTAC host password
Output:
Return value = 0 Operation failed. The Network Type is not set to DataTAC 5000.
Return value < 0 Operation failed. Value SCR_ERROR is returned to indicate an
error
Return value > 0 Operation was successful and the number of bytes is returned in
l_buf.
Example
#include <scrapi.h>
{
byte lbuffer[SCR_MAX_LEN]; /*buffer for SCR login
packet*/
int llen; /*length of SCR login packet*/
. . .
x25call( . . . ); /*make the connection to the RNG*/
llen = scr_EncodeLogin(buffer, 'LOGIN', 'PASSWORD');
if (llen == SCR_ERROR) {
/*report an error*/
. . .
}
else if (llen > 0) { /*for non-DataTAC 5000 networks,'/