25 |
extern unsigned int g_num_channels; |
extern unsigned int g_num_channels; |
26 |
|
|
27 |
/* Parse an ASN.1 BER header */ |
/* Parse an ASN.1 BER header */ |
28 |
static BOOL |
static RD_BOOL |
29 |
ber_parse_header(STREAM s, int tagval, int *length) |
ber_parse_header(STREAM s, int tagval, int *length) |
30 |
{ |
{ |
31 |
int tag, len; |
int tag, len; |
36 |
} |
} |
37 |
else |
else |
38 |
{ |
{ |
39 |
in_uint8(s, tag)} |
in_uint8(s, tag); |
40 |
|
} |
41 |
|
|
42 |
if (tag != tagval) |
if (tag != tagval) |
43 |
{ |
{ |
106 |
} |
} |
107 |
|
|
108 |
/* Parse a DOMAIN_PARAMS structure (ASN.1 BER) */ |
/* Parse a DOMAIN_PARAMS structure (ASN.1 BER) */ |
109 |
static BOOL |
static RD_BOOL |
110 |
mcs_parse_domain_params(STREAM s) |
mcs_parse_domain_params(STREAM s) |
111 |
{ |
{ |
112 |
int length; |
int length; |
148 |
} |
} |
149 |
|
|
150 |
/* Expect a MCS_CONNECT_RESPONSE message (ASN.1 BER) */ |
/* Expect a MCS_CONNECT_RESPONSE message (ASN.1 BER) */ |
151 |
static BOOL |
static RD_BOOL |
152 |
mcs_recv_connect_response(STREAM mcs_data) |
mcs_recv_connect_response(STREAM mcs_data) |
153 |
{ |
{ |
154 |
uint8 result; |
uint8 result; |
222 |
} |
} |
223 |
|
|
224 |
/* Expect a AUcf message (ASN.1 PER) */ |
/* Expect a AUcf message (ASN.1 PER) */ |
225 |
static BOOL |
static RD_BOOL |
226 |
mcs_recv_aucf(uint16 * mcs_userid) |
mcs_recv_aucf(uint16 * mcs_userid) |
227 |
{ |
{ |
228 |
uint8 opcode, result; |
uint8 opcode, result; |
271 |
} |
} |
272 |
|
|
273 |
/* Expect a CJcf message (ASN.1 PER) */ |
/* Expect a CJcf message (ASN.1 PER) */ |
274 |
static BOOL |
static RD_BOOL |
275 |
mcs_recv_cjcf(void) |
mcs_recv_cjcf(void) |
276 |
{ |
{ |
277 |
uint8 opcode, result; |
uint8 opcode, result; |
373 |
} |
} |
374 |
|
|
375 |
/* Establish a connection up to the MCS layer */ |
/* Establish a connection up to the MCS layer */ |
376 |
BOOL |
RD_BOOL |
377 |
mcs_connect(char *server, STREAM mcs_data, char *username) |
mcs_connect(char *server, STREAM mcs_data, char *username) |
378 |
{ |
{ |
379 |
unsigned int i; |
unsigned int i; |
414 |
} |
} |
415 |
|
|
416 |
/* Establish a connection up to the MCS layer */ |
/* Establish a connection up to the MCS layer */ |
417 |
BOOL |
RD_BOOL |
418 |
mcs_reconnect(char *server, STREAM mcs_data) |
mcs_reconnect(char *server, STREAM mcs_data) |
419 |
{ |
{ |
420 |
unsigned int i; |
unsigned int i; |