summaryrefslogtreecommitdiffstats
path: root/src/ccapi/common
diff options
context:
space:
mode:
authorAlexandra Ellwood <lxs@mit.edu>2008-09-30 21:23:17 +0000
committerAlexandra Ellwood <lxs@mit.edu>2008-09-30 21:23:17 +0000
commit89db2820d03f280d0bf0e217d520e89c2bb8acd2 (patch)
treebaf4c5e5930974bf928509aea9d511d947b623f2 /src/ccapi/common
parent6b6d24e1ae0aadffb9062ac94ae8e600e09dbef0 (diff)
downloadkrb5-89db2820d03f280d0bf0e217d520e89c2bb8acd2.tar.gz
krb5-89db2820d03f280d0bf0e217d520e89c2bb8acd2.tar.xz
krb5-89db2820d03f280d0bf0e217d520e89c2bb8acd2.zip
CCAPI should use common ipc and stream code
KIM and CCAPI should share the same IPC and stream object types. Modified CCAPI to use code in src/util (stream) and src/util/mac (ipc) ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20787 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/ccapi/common')
-rw-r--r--src/ccapi/common/cci_common.h3
-rw-r--r--src/ccapi/common/cci_cred_union.c128
-rw-r--r--src/ccapi/common/cci_cred_union.h4
-rw-r--r--src/ccapi/common/cci_identifier.c16
-rw-r--r--src/ccapi/common/cci_identifier.h4
-rw-r--r--src/ccapi/common/cci_message.c70
-rw-r--r--src/ccapi/common/cci_message.h13
-rw-r--r--src/ccapi/common/cci_stream.c498
-rw-r--r--src/ccapi/common/cci_stream.h77
-rw-r--r--src/ccapi/common/cci_types.h4
-rw-r--r--src/ccapi/common/mac/cci_mig.defs54
-rw-r--r--src/ccapi/common/mac/cci_mig_reply.defs58
-rw-r--r--src/ccapi/common/mac/cci_mig_request.defs62
-rw-r--r--src/ccapi/common/mac/cci_mig_types.h56
-rw-r--r--src/ccapi/common/win/tls.c4
-rw-r--r--src/ccapi/common/win/tls.h6
16 files changed, 149 insertions, 908 deletions
diff --git a/src/ccapi/common/cci_common.h b/src/ccapi/common/cci_common.h
index 56f21c3706..c1a5d08648 100644
--- a/src/ccapi/common/cci_common.h
+++ b/src/ccapi/common/cci_common.h
@@ -51,6 +51,7 @@
#include "cci_debugging.h"
#include "cci_identifier.h"
#include "cci_message.h"
-#include "cci_stream.h"
+
+#include "k5-ipc_stream.h"
#endif /* CCI_COMMON_H */
diff --git a/src/ccapi/common/cci_cred_union.c b/src/ccapi/common/cci_cred_union.c
index e8e230d49d..9740ffd473 100644
--- a/src/ccapi/common/cci_cred_union.c
+++ b/src/ccapi/common/cci_cred_union.c
@@ -49,7 +49,7 @@ static cc_uint32 cci_credentials_v4_release (cc_credentials_v4_t *io_v4creds)
/* ------------------------------------------------------------------------ */
static cc_uint32 cci_credentials_v4_read (cc_credentials_v4_t **out_v4creds,
- cci_stream_t io_stream)
+ k5_ipc_stream io_stream)
{
cc_int32 err = ccNoError;
cc_credentials_v4_t *v4creds = NULL;
@@ -63,59 +63,59 @@ static cc_uint32 cci_credentials_v4_read (cc_credentials_v4_t **out_v4creds,
}
if (!err) {
- err = cci_stream_read_uint32 (io_stream, &v4creds->version);
+ err = k5_ipc_stream_read_uint32 (io_stream, &v4creds->version);
}
if (!err) {
- err = cci_stream_read (io_stream, v4creds->principal, cc_v4_name_size);
+ err = k5_ipc_stream_read (io_stream, v4creds->principal, cc_v4_name_size);
}
if (!err) {
- err = cci_stream_read (io_stream, v4creds->principal_instance, cc_v4_instance_size);
+ err = k5_ipc_stream_read (io_stream, v4creds->principal_instance, cc_v4_instance_size);
}
if (!err) {
- err = cci_stream_read (io_stream, v4creds->service, cc_v4_name_size);
+ err = k5_ipc_stream_read (io_stream, v4creds->service, cc_v4_name_size);
}
if (!err) {
- err = cci_stream_read (io_stream, v4creds->service_instance, cc_v4_instance_size);
+ err = k5_ipc_stream_read (io_stream, v4creds->service_instance, cc_v4_instance_size);
}
if (!err) {
- err = cci_stream_read (io_stream, v4creds->realm, cc_v4_realm_size);
+ err = k5_ipc_stream_read (io_stream, v4creds->realm, cc_v4_realm_size);
}
if (!err) {
- err = cci_stream_read (io_stream, v4creds->session_key, cc_v4_key_size);
+ err = k5_ipc_stream_read (io_stream, v4creds->session_key, cc_v4_key_size);
}
if (!err) {
- err = cci_stream_read_int32 (io_stream, &v4creds->kvno);
+ err = k5_ipc_stream_read_int32 (io_stream, &v4creds->kvno);
}
if (!err) {
- err = cci_stream_read_int32 (io_stream, &v4creds->string_to_key_type);
+ err = k5_ipc_stream_read_int32 (io_stream, &v4creds->string_to_key_type);
}
if (!err) {
- err = cci_stream_read_time (io_stream, &v4creds->issue_date);
+ err = k5_ipc_stream_read_time (io_stream, &v4creds->issue_date);
}
if (!err) {
- err = cci_stream_read_int32 (io_stream, &v4creds->lifetime);
+ err = k5_ipc_stream_read_int32 (io_stream, &v4creds->lifetime);
}
if (!err) {
- err = cci_stream_read_uint32 (io_stream, &v4creds->address);
+ err = k5_ipc_stream_read_uint32 (io_stream, &v4creds->address);
}
if (!err) {
- err = cci_stream_read_int32 (io_stream, &v4creds->ticket_size);
+ err = k5_ipc_stream_read_int32 (io_stream, &v4creds->ticket_size);
}
if (!err) {
- err = cci_stream_read (io_stream, v4creds->ticket, cc_v4_ticket_size);
+ err = k5_ipc_stream_read (io_stream, v4creds->ticket, cc_v4_ticket_size);
}
if (!err) {
@@ -131,7 +131,7 @@ static cc_uint32 cci_credentials_v4_read (cc_credentials_v4_t **out_v4creds,
/* ------------------------------------------------------------------------ */
static cc_uint32 cci_credentials_v4_write (cc_credentials_v4_t *in_v4creds,
- cci_stream_t io_stream)
+ k5_ipc_stream io_stream)
{
cc_int32 err = ccNoError;
@@ -139,59 +139,59 @@ static cc_uint32 cci_credentials_v4_write (cc_credentials_v4_t *in_v4creds,
if (!in_v4creds) { err = cci_check_error (ccErrBadParam); }
if (!err) {
- err = cci_stream_write_uint32 (io_stream, in_v4creds->version);
+ err = k5_ipc_stream_write_uint32 (io_stream, in_v4creds->version);
}
if (!err) {
- err = cci_stream_write (io_stream, in_v4creds->principal, cc_v4_name_size);
+ err = k5_ipc_stream_write (io_stream, in_v4creds->principal, cc_v4_name_size);
}
if (!err) {
- err = cci_stream_write (io_stream, in_v4creds->principal_instance, cc_v4_instance_size);
+ err = k5_ipc_stream_write (io_stream, in_v4creds->principal_instance, cc_v4_instance_size);
}
if (!err) {
- err = cci_stream_write (io_stream, in_v4creds->service, cc_v4_name_size);
+ err = k5_ipc_stream_write (io_stream, in_v4creds->service, cc_v4_name_size);
}
if (!err) {
- err = cci_stream_write (io_stream, in_v4creds->service_instance, cc_v4_instance_size);
+ err = k5_ipc_stream_write (io_stream, in_v4creds->service_instance, cc_v4_instance_size);
}
if (!err) {
- err = cci_stream_write (io_stream, in_v4creds->realm, cc_v4_realm_size);
+ err = k5_ipc_stream_write (io_stream, in_v4creds->realm, cc_v4_realm_size);
}
if (!err) {
- err = cci_stream_write (io_stream, in_v4creds->session_key, cc_v4_key_size);
+ err = k5_ipc_stream_write (io_stream, in_v4creds->session_key, cc_v4_key_size);
}
if (!err) {
- err = cci_stream_write_int32 (io_stream, in_v4creds->kvno);
+ err = k5_ipc_stream_write_int32 (io_stream, in_v4creds->kvno);
}
if (!err) {
- err = cci_stream_write_int32 (io_stream, in_v4creds->string_to_key_type);
+ err = k5_ipc_stream_write_int32 (io_stream, in_v4creds->string_to_key_type);
}
if (!err) {
- err = cci_stream_write_time (io_stream, in_v4creds->issue_date);
+ err = k5_ipc_stream_write_time (io_stream, in_v4creds->issue_date);
}
if (!err) {
- err = cci_stream_write_int32 (io_stream, in_v4creds->lifetime);
+ err = k5_ipc_stream_write_int32 (io_stream, in_v4creds->lifetime);
}
if (!err) {
- err = cci_stream_write_uint32 (io_stream, in_v4creds->address);
+ err = k5_ipc_stream_write_uint32 (io_stream, in_v4creds->address);
}
if (!err) {
- err = cci_stream_write_int32 (io_stream, in_v4creds->ticket_size);
+ err = k5_ipc_stream_write_int32 (io_stream, in_v4creds->ticket_size);
}
if (!err) {
- err = cci_stream_write (io_stream, in_v4creds->ticket, cc_v4_ticket_size);
+ err = k5_ipc_stream_write (io_stream, in_v4creds->ticket, cc_v4_ticket_size);
}
return cci_check_error (err);
@@ -238,7 +238,7 @@ static cc_uint32 cci_cc_data_release (cc_data *io_ccdata)
/* ------------------------------------------------------------------------ */
static cc_uint32 cci_cc_data_read (cc_data *io_ccdata,
- cci_stream_t io_stream)
+ k5_ipc_stream io_stream)
{
cc_int32 err = ccNoError;
cc_uint32 type = 0;
@@ -249,11 +249,11 @@ static cc_uint32 cci_cc_data_read (cc_data *io_ccdata,
if (!io_ccdata) { err = cci_check_error (ccErrBadParam); }
if (!err) {
- err = cci_stream_read_uint32 (io_stream, &type);
+ err = k5_ipc_stream_read_uint32 (io_stream, &type);
}
if (!err) {
- err = cci_stream_read_uint32 (io_stream, &length);
+ err = k5_ipc_stream_read_uint32 (io_stream, &length);
}
if (!err && length > 0) {
@@ -261,7 +261,7 @@ static cc_uint32 cci_cc_data_read (cc_data *io_ccdata,
if (!data) { err = cci_check_error (ccErrNoMem); }
if (!err) {
- err = cci_stream_read (io_stream, data, length);
+ err = k5_ipc_stream_read (io_stream, data, length);
}
}
@@ -280,7 +280,7 @@ static cc_uint32 cci_cc_data_read (cc_data *io_ccdata,
/* ------------------------------------------------------------------------ */
static cc_uint32 cci_cc_data_write (cc_data *in_ccdata,
- cci_stream_t io_stream)
+ k5_ipc_stream io_stream)
{
cc_int32 err = ccNoError;
@@ -288,15 +288,15 @@ static cc_uint32 cci_cc_data_write (cc_data *in_ccdata,
if (!in_ccdata) { err = cci_check_error (ccErrBadParam); }
if (!err) {
- err = cci_stream_write_uint32 (io_stream, in_ccdata->type);
+ err = k5_ipc_stream_write_uint32 (io_stream, in_ccdata->type);
}
if (!err) {
- err = cci_stream_write_uint32 (io_stream, in_ccdata->length);
+ err = k5_ipc_stream_write_uint32 (io_stream, in_ccdata->length);
}
if (!err && in_ccdata->length > 0) {
- err = cci_stream_write (io_stream, in_ccdata->data, in_ccdata->length);
+ err = k5_ipc_stream_write (io_stream, in_ccdata->data, in_ccdata->length);
}
return cci_check_error (err);
@@ -329,7 +329,7 @@ static cc_uint32 cci_cc_data_array_release (cc_data **io_ccdata_array)
/* ------------------------------------------------------------------------ */
static cc_uint32 cci_cc_data_array_read (cc_data ***io_ccdata_array,
- cci_stream_t io_stream)
+ k5_ipc_stream io_stream)
{
cc_int32 err = ccNoError;
cc_uint32 count = 0;
@@ -340,7 +340,7 @@ static cc_uint32 cci_cc_data_array_read (cc_data ***io_ccdata_array,
if (!io_ccdata_array) { err = cci_check_error (ccErrBadParam); }
if (!err) {
- err = cci_stream_read_uint32 (io_stream, &count);
+ err = k5_ipc_stream_read_uint32 (io_stream, &count);
}
if (!err && count > 0) {
@@ -376,7 +376,7 @@ static cc_uint32 cci_cc_data_array_read (cc_data ***io_ccdata_array,
/* ------------------------------------------------------------------------ */
static cc_uint32 cci_cc_data_array_write (cc_data **in_ccdata_array,
- cci_stream_t io_stream)
+ k5_ipc_stream io_stream)
{
cc_int32 err = ccNoError;
cc_uint32 count = 0;
@@ -387,7 +387,7 @@ static cc_uint32 cci_cc_data_array_write (cc_data **in_ccdata_array,
if (!err) {
for (count = 0; in_ccdata_array && in_ccdata_array[count]; count++);
- err = cci_stream_write_uint32 (io_stream, count);
+ err = k5_ipc_stream_write_uint32 (io_stream, count);
}
if (!err) {
@@ -443,7 +443,7 @@ static cc_uint32 cci_credentials_v5_release (cc_credentials_v5_t *io_v5creds)
/* ------------------------------------------------------------------------ */
static cc_uint32 cci_credentials_v5_read (cc_credentials_v5_t **out_v5creds,
- cci_stream_t io_stream)
+ k5_ipc_stream io_stream)
{
cc_int32 err = ccNoError;
cc_credentials_v5_t *v5creds = NULL;
@@ -461,11 +461,11 @@ static cc_uint32 cci_credentials_v5_read (cc_credentials_v5_t **out_v5creds,
}
if (!err) {
- err = cci_stream_read_string (io_stream, &v5creds->client);
+ err = k5_ipc_stream_read_string (io_stream, &v5creds->client);
}
if (!err) {
- err = cci_stream_read_string (io_stream, &v5creds->server);
+ err = k5_ipc_stream_read_string (io_stream, &v5creds->server);
}
if (!err) {
@@ -473,27 +473,27 @@ static cc_uint32 cci_credentials_v5_read (cc_credentials_v5_t **out_v5creds,
}
if (!err) {
- err = cci_stream_read_time (io_stream, &v5creds->authtime);
+ err = k5_ipc_stream_read_time (io_stream, &v5creds->authtime);
}
if (!err) {
- err = cci_stream_read_time (io_stream, &v5creds->starttime);
+ err = k5_ipc_stream_read_time (io_stream, &v5creds->starttime);
}
if (!err) {
- err = cci_stream_read_time (io_stream, &v5creds->endtime);
+ err = k5_ipc_stream_read_time (io_stream, &v5creds->endtime);
}
if (!err) {
- err = cci_stream_read_time (io_stream, &v5creds->renew_till);
+ err = k5_ipc_stream_read_time (io_stream, &v5creds->renew_till);
}
if (!err) {
- err = cci_stream_read_uint32 (io_stream, &v5creds->is_skey);
+ err = k5_ipc_stream_read_uint32 (io_stream, &v5creds->is_skey);
}
if (!err) {
- err = cci_stream_read_uint32 (io_stream, &v5creds->ticket_flags);
+ err = k5_ipc_stream_read_uint32 (io_stream, &v5creds->ticket_flags);
}
if (!err) {
@@ -525,7 +525,7 @@ static cc_uint32 cci_credentials_v5_read (cc_credentials_v5_t **out_v5creds,
/* ------------------------------------------------------------------------ */
static cc_uint32 cci_credentials_v5_write (cc_credentials_v5_t *in_v5creds,
- cci_stream_t io_stream)
+ k5_ipc_stream io_stream)
{
cc_int32 err = ccNoError;
@@ -533,11 +533,11 @@ static cc_uint32 cci_credentials_v5_write (cc_credentials_v5_t *in_v5creds,
if (!in_v5creds) { err = cci_check_error (ccErrBadParam); }
if (!err) {
- err = cci_stream_write_string (io_stream, in_v5creds->client);
+ err = k5_ipc_stream_write_string (io_stream, in_v5creds->client);
}
if (!err) {
- err = cci_stream_write_string (io_stream, in_v5creds->server);
+ err = k5_ipc_stream_write_string (io_stream, in_v5creds->server);
}
if (!err) {
@@ -545,27 +545,27 @@ static cc_uint32 cci_credentials_v5_write (cc_credentials_v5_t *in_v5creds,
}
if (!err) {
- err = cci_stream_write_time (io_stream, in_v5creds->authtime);
+ err = k5_ipc_stream_write_time (io_stream, in_v5creds->authtime);
}
if (!err) {
- err = cci_stream_write_time (io_stream, in_v5creds->starttime);
+ err = k5_ipc_stream_write_time (io_stream, in_v5creds->starttime);
}
if (!err) {
- err = cci_stream_write_time (io_stream, in_v5creds->endtime);
+ err = k5_ipc_stream_write_time (io_stream, in_v5creds->endtime);
}
if (!err) {
- err = cci_stream_write_time (io_stream, in_v5creds->renew_till);
+ err = k5_ipc_stream_write_time (io_stream, in_v5creds->renew_till);
}
if (!err) {
- err = cci_stream_write_uint32 (io_stream, in_v5creds->is_skey);
+ err = k5_ipc_stream_write_uint32 (io_stream, in_v5creds->is_skey);
}
if (!err) {
- err = cci_stream_write_uint32 (io_stream, in_v5creds->ticket_flags);
+ err = k5_ipc_stream_write_uint32 (io_stream, in_v5creds->ticket_flags);
}
if (!err) {
@@ -615,7 +615,7 @@ cc_uint32 cci_credentials_union_release (cc_credentials_union *io_cred_union)
/* ------------------------------------------------------------------------ */
cc_uint32 cci_credentials_union_read (cc_credentials_union **out_credentials_union,
- cci_stream_t io_stream)
+ k5_ipc_stream io_stream)
{
cc_int32 err = ccNoError;
cc_credentials_union *credentials_union = NULL;
@@ -629,7 +629,7 @@ cc_uint32 cci_credentials_union_read (cc_credentials_union **out_credentials_uni
}
if (!err) {
- err = cci_stream_read_uint32 (io_stream, &credentials_union->version);
+ err = k5_ipc_stream_read_uint32 (io_stream, &credentials_union->version);
}
if (!err) {
@@ -660,7 +660,7 @@ cc_uint32 cci_credentials_union_read (cc_credentials_union **out_credentials_uni
/* ------------------------------------------------------------------------ */
cc_uint32 cci_credentials_union_write (const cc_credentials_union *in_credentials_union,
- cci_stream_t io_stream)
+ k5_ipc_stream io_stream)
{
cc_int32 err = ccNoError;
@@ -668,7 +668,7 @@ cc_uint32 cci_credentials_union_write (const cc_credentials_union *in_credential
if (!in_credentials_union) { err = cci_check_error (ccErrBadParam); }
if (!err) {
- err = cci_stream_write_uint32 (io_stream, in_credentials_union->version);
+ err = k5_ipc_stream_write_uint32 (io_stream, in_credentials_union->version);
}
if (!err) {
diff --git a/src/ccapi/common/cci_cred_union.h b/src/ccapi/common/cci_cred_union.h
index 3264d350a5..44dd6348d9 100644
--- a/src/ccapi/common/cci_cred_union.h
+++ b/src/ccapi/common/cci_cred_union.h
@@ -33,10 +33,10 @@
cc_uint32 cci_credentials_union_release (cc_credentials_union *io_credentials);
cc_uint32 cci_credentials_union_read (cc_credentials_union **out_credentials_union,
- cci_stream_t io_stream);
+ k5_ipc_stream io_stream);
cc_uint32 cci_credentials_union_write (const cc_credentials_union *in_credentials_union,
- cci_stream_t io_stream);
+ k5_ipc_stream io_stream);
cc_uint32 cci_cred_union_release (cred_union *io_cred_union);
diff --git a/src/ccapi/common/cci_identifier.c b/src/ccapi/common/cci_identifier.c
index dac2e15449..5ca962f1cd 100644
--- a/src/ccapi/common/cci_identifier.c
+++ b/src/ccapi/common/cci_identifier.c
@@ -242,7 +242,7 @@ cc_int32 cci_identifier_is_initialized (cci_identifier_t in_identifier,
/* ------------------------------------------------------------------------ */
cc_uint32 cci_identifier_read (cci_identifier_t *out_identifier,
- cci_stream_t io_stream)
+ k5_ipc_stream io_stream)
{
cc_int32 err = ccNoError;
cci_uuid_string_t server_id = NULL;
@@ -252,19 +252,19 @@ cc_uint32 cci_identifier_read (cci_identifier_t *out_identifier,
if (!io_stream ) { err = cci_check_error (ccErrBadParam); }
if (!err) {
- err = cci_stream_read_string (io_stream, &server_id);
+ err = k5_ipc_stream_read_string (io_stream, &server_id);
}
if (!err) {
- err = cci_stream_read_string (io_stream, &object_id);
+ err = k5_ipc_stream_read_string (io_stream, &object_id);
}
if (!err) {
err = cci_identifier_alloc (out_identifier, server_id, object_id);
}
- if (server_id) { free (server_id); }
- if (object_id) { free (object_id); }
+ k5_ipc_stream_free_string (server_id);
+ k5_ipc_stream_free_string (object_id);
return cci_check_error (err);
}
@@ -272,7 +272,7 @@ cc_uint32 cci_identifier_read (cci_identifier_t *out_identifier,
/* ------------------------------------------------------------------------ */
cc_uint32 cci_identifier_write (cci_identifier_t in_identifier,
- cci_stream_t io_stream)
+ k5_ipc_stream io_stream)
{
cc_int32 err = ccNoError;
@@ -280,11 +280,11 @@ cc_uint32 cci_identifier_write (cci_identifier_t in_identifier,
if (!io_stream ) { err = cci_check_error (ccErrBadParam); }
if (!err) {
- err = cci_stream_write_string (io_stream, in_identifier->server_id);
+ err = k5_ipc_stream_write_string (io_stream, in_identifier->server_id);
}
if (!err) {
- err = cci_stream_write_string (io_stream, in_identifier->object_id);
+ err = k5_ipc_stream_write_string (io_stream, in_identifier->object_id);
}
return cci_check_error (err);
diff --git a/src/ccapi/common/cci_identifier.h b/src/ccapi/common/cci_identifier.h
index 7d835de0a3..2c7ea20abf 100644
--- a/src/ccapi/common/cci_identifier.h
+++ b/src/ccapi/common/cci_identifier.h
@@ -57,9 +57,9 @@ cc_int32 cci_identifier_is_initialized (cci_identifier_t in_identifier,
cc_uint32 *out_is_initialized);
cc_uint32 cci_identifier_read (cci_identifier_t *out_identifier,
- cci_stream_t io_stream);
+ k5_ipc_stream io_stream);
cc_uint32 cci_identifier_write (cci_identifier_t in_identifier,
- cci_stream_t io_stream);
+ k5_ipc_stream io_stream);
#endif /* CCI_IDENTIFIER_H */
diff --git a/src/ccapi/common/cci_message.c b/src/ccapi/common/cci_message.c
index 4152e6c3cf..b541558893 100644
--- a/src/ccapi/common/cci_message.c
+++ b/src/ccapi/common/cci_message.c
@@ -57,21 +57,21 @@ cc_int32 cci_message_invalid_object_err (enum cci_msg_id_t in_request_name)
/* ------------------------------------------------------------------------ */
-cc_int32 cci_message_new_request_header (cci_stream_t *out_request,
+cc_int32 cci_message_new_request_header (k5_ipc_stream *out_request,
enum cci_msg_id_t in_request_name,
cci_identifier_t in_identifier)
{
cc_int32 err = ccNoError;
- cci_stream_t request = NULL;
+ k5_ipc_stream request = NULL;
if (!out_request) { err = cci_check_error (ccErrBadParam); }
if (!err) {
- err = cci_stream_new (&request);
+ err = k5_ipc_stream_new (&request);
}
if (!err) {
- err = cci_stream_write_uint32 (request, in_request_name);
+ err = k5_ipc_stream_write_uint32 (request, in_request_name);
}
if (!err) {
@@ -83,14 +83,14 @@ cc_int32 cci_message_new_request_header (cci_stream_t *out_request,
request = NULL;
}
- cci_stream_release (request);
+ k5_ipc_stream_release (request);
return cci_check_error (err);
}
/* ------------------------------------------------------------------------ */
-cc_int32 cci_message_read_request_header (cci_stream_t in_request,
+cc_int32 cci_message_read_request_header (k5_ipc_stream in_request,
enum cci_msg_id_t *out_request_name,
cci_identifier_t *out_identifier)
{
@@ -103,7 +103,7 @@ cc_int32 cci_message_read_request_header (cci_stream_t in_request,
if (!out_identifier ) { err = cci_check_error (ccErrBadParam); }
if (!err) {
- err = cci_stream_read_uint32 (in_request, &request_name);
+ err = k5_ipc_stream_read_uint32 (in_request, &request_name);
}
if (!err) {
@@ -123,20 +123,20 @@ cc_int32 cci_message_read_request_header (cci_stream_t in_request,
/* ------------------------------------------------------------------------ */
-cc_int32 cci_message_new_reply_header (cci_stream_t *out_reply,
+cc_int32 cci_message_new_reply_header (k5_ipc_stream *out_reply,
cc_int32 in_error)
{
cc_int32 err = ccNoError;
- cci_stream_t reply = NULL;
+ k5_ipc_stream reply = NULL;
if (!out_reply) { err = cci_check_error (ccErrBadParam); }
if (!err) {
- err = cci_stream_new (&reply);
+ err = k5_ipc_stream_new (&reply);
}
if (!err) {
- err = cci_stream_write_int32 (reply, in_error);
+ err = k5_ipc_stream_write_int32 (reply, in_error);
}
if (!err) {
@@ -144,14 +144,14 @@ cc_int32 cci_message_new_reply_header (cci_stream_t *out_reply,
reply = NULL;
}
- cci_stream_release (reply);
+ k5_ipc_stream_release (reply);
return cci_check_error (err);
}
/* ------------------------------------------------------------------------ */
-cc_int32 cci_message_read_reply_header (cci_stream_t in_reply,
+cc_int32 cci_message_read_reply_header (k5_ipc_stream in_reply,
cc_int32 *out_reply_error)
{
cc_int32 err = ccNoError;
@@ -161,7 +161,7 @@ cc_int32 cci_message_read_reply_header (cci_stream_t in_reply,
if (!out_reply_error) { err = cci_check_error (ccErrBadParam); }
if (!err) {
- err = cci_stream_read_int32 (in_reply, &reply_err);
+ err = k5_ipc_stream_read_int32 (in_reply, &reply_err);
}
if (!err) {
@@ -170,3 +170,45 @@ cc_int32 cci_message_read_reply_header (cci_stream_t in_reply,
return cci_check_error (err);
}
+
+#ifdef TARGET_OS_MAC
+#pragma mark -
+#endif
+
+/* ------------------------------------------------------------------------ */
+
+uint32_t k5_ipc_stream_read_time (k5_ipc_stream io_stream,
+ cc_time_t *out_time)
+{
+ int32_t err = 0;
+ int64_t t = 0;
+
+ if (!io_stream) { err = cci_check_error (ccErrBadParam); }
+ if (!out_time ) { err = cci_check_error (ccErrBadParam); }
+
+ if (!err) {
+ err = k5_ipc_stream_read_int64 (io_stream, &t);
+ }
+
+ if (!err) {
+ *out_time = t;
+ }
+
+ return cci_check_error (err);
+}
+
+/* ------------------------------------------------------------------------ */
+
+uint32_t k5_ipc_stream_write_time (k5_ipc_stream io_stream,
+ cc_time_t in_time)
+{
+ int32_t err = 0;
+
+ if (!io_stream) { err = cci_check_error (ccErrBadParam); }
+
+ if (!err) {
+ err = k5_ipc_stream_write_int64 (io_stream, in_time);
+ }
+
+ return cci_check_error (err);
+}
diff --git a/src/ccapi/common/cci_message.h b/src/ccapi/common/cci_message.h
index 7cab2dc766..27ed9c1f2d 100644
--- a/src/ccapi/common/cci_message.h
+++ b/src/ccapi/common/cci_message.h
@@ -31,18 +31,23 @@
cc_int32 cci_message_invalid_object_err (enum cci_msg_id_t in_request_name);
-cc_int32 cci_message_new_request_header (cci_stream_t *out_request,
+cc_int32 cci_message_new_request_header (k5_ipc_stream *out_request,
enum cci_msg_id_t in_request_name,
cci_identifier_t in_identifier);
-cc_int32 cci_message_read_request_header (cci_stream_t in_request,
+cc_int32 cci_message_read_request_header (k5_ipc_stream in_request,
enum cci_msg_id_t *out_request_name,
cci_identifier_t *out_identifier);
-cc_int32 cci_message_new_reply_header (cci_stream_t *out_reply,
+cc_int32 cci_message_new_reply_header (k5_ipc_stream *out_reply,
cc_int32 in_error);
-cc_int32 cci_message_read_reply_header (cci_stream_t in_reply,
+cc_int32 cci_message_read_reply_header (k5_ipc_stream in_reply,
cc_int32 *out_reply_error);
+uint32_t k5_ipc_stream_read_time (k5_ipc_stream io_stream,
+ cc_time_t *out_time);
+uint32_t k5_ipc_stream_write_time (k5_ipc_stream io_stream,
+ cc_time_t in_time);
+
#endif /* CCI_MESSAGE_H */
diff --git a/src/ccapi/common/cci_stream.c b/src/ccapi/common/cci_stream.c
deleted file mode 100644
index 2f06789479..0000000000
--- a/src/ccapi/common/cci_stream.c
+++ /dev/null
@@ -1,498 +0,0 @@
-/*
- * $Header$
- *
- * Copyright 2006, 2007 Massachusetts Institute of Technology.
- * All Rights Reserved.
- *
- * Export of this software from the United States of America may
- * require a specific license from the United States Government.
- * It is the responsibility of any person or organization contemplating
- * export to obtain such a license before exporting.
- *
- * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
- * distribute this software and its documentation for any purpose and
- * without fee is hereby granted, provided that the above copyright
- * notice appear in all copies and that both that copyright notice and
- * this permission notice appear in supporting documentation, and that
- * the name of M.I.T. not be used in advertising or publicity pertaining
- * to distribution of the software without specific, written prior
- * permission. Furthermore if you modify this software you must label
- * your software as modified software and not distribute it in such a
- * fashion that it might be confused with the original M.I.T. software.
- * M.I.T. makes no representations about the suitability of
- * this software for any purpose. It is provided "as is" without express
- * or implied warranty.
- */
-
-#include "cci_common.h"
-#include "k5-platform.h" /* for byte swapping */
-
-#if !defined(htonll)
-#define htonll(x) k5_htonll(x)
-#endif
-
-#if !defined(ntohll)
-#define ntohll(x) k5_ntohll(x)
-#endif
-
-struct cci_stream_d {
- char *data;
- cc_uint64 size;
- cc_uint64 max_size;
-};
-
-const struct cci_stream_d cci_stream_initializer = { NULL, 0, 0 };
-
-#define CC_STREAM_SIZE_INCREMENT 128
-
-/* ------------------------------------------------------------------------ */
-
-static cc_uint32 cci_stream_reallocate (cci_stream_t io_stream,
- cc_uint64 in_new_size)
-{
- cc_int32 err = ccNoError;
- cc_uint64 new_max_size = 0;
-
- if (!io_stream) { err = cci_check_error (ccErrBadParam); }
-
- if (!err) {
- cc_uint64 old_max_size = io_stream->max_size;
- new_max_size = io_stream->max_size;
-
- if (in_new_size > old_max_size) {
- /* Expand the stream */
- while (in_new_size > new_max_size) {
- new_max_size += CC_STREAM_SIZE_INCREMENT;
- }
-
-
- } else if ((in_new_size + CC_STREAM_SIZE_INCREMENT) < old_max_size) {
- /* Shrink the array, but never drop below CC_LIST_COUNT_INCREMENT */
- while ((in_new_size + CC_STREAM_SIZE_INCREMENT) < new_max_size &&
- (new_max_size > CC_STREAM_SIZE_INCREMENT)) {
- new_max_size -= CC_STREAM_SIZE_INCREMENT;
- }
- }
- }
-
- if (!err && new_max_size != io_stream->max_size) {
- char *data = io_stream->data;
-
- if (!data) {
- data = malloc (new_max_size * sizeof (*data));
- } else {
- data = realloc (data, new_max_size * sizeof (*data));
- }
-
- if (data) {
- io_stream->data = data;
- io_stream->max_size = new_max_size;
- } else {
- err = cci_check_error (ccErrNoMem);
- }
- }
-
- return cci_check_error (err);
-}
-
-/* ------------------------------------------------------------------------ */
-
-cc_int32 cci_stream_new (cci_stream_t *out_stream)
-{
- cc_int32 err = ccNoError;
- cci_stream_t stream = NULL;
-
- if (!out_stream) { err = cci_check_error (ccErrBadParam); }
-
- if (!err) {
- stream = malloc (sizeof (*stream));
- if (stream) {
- *stream = cci_stream_initializer;
- } else {
- err = cci_check_error (ccErrNoMem);
- }
- }
-
- if (!err) {
- *out_stream = stream;
- stream = NULL;
- }
-
- cci_stream_release (stream);
-
- return cci_check_error (err);
-}
-
-
-/* ------------------------------------------------------------------------ */
-
-cc_uint32 cci_stream_release (cci_stream_t io_stream)
-{
- cc_int32 err = ccNoError;
-
- if (!err && io_stream) {
- free (io_stream->data);
- free (io_stream);
- }
-
- return err;
-}
-
-/* ------------------------------------------------------------------------ */
-
-cc_uint64 cci_stream_size (cci_stream_t in_stream)
-{
- return in_stream ? in_stream->size : 0;
-}
-
-
-/* ------------------------------------------------------------------------ */
-
-const char *cci_stream_data (cci_stream_t in_stream)
-{
- return in_stream ? in_stream->data : NULL;
-}
-
-#ifdef TARGET_OS_MAC
-#pragma mark -
-#endif
-
-/* ------------------------------------------------------------------------ */
-
-cc_uint32 cci_stream_read (cci_stream_t io_stream,
- void *io_data,
- cc_uint64 in_size)
-{
- cc_int32 err = ccNoError;
-
- if (!io_stream) { err = cci_check_error (ccErrBadParam); }
- if (!io_data ) { err = cci_check_error (ccErrBadParam); }
-
- if (!err) {
- if (in_size > io_stream->size) {
- err = cci_check_error (ccErrBadInternalMessage);
- }
- }
-
- if (!err) {
- memcpy (io_data, io_stream->data, in_size);
- memmove (io_stream->data, &io_stream->data[in_size],
- io_stream->size - in_size);
-
- err = cci_stream_reallocate (io_stream, io_stream->size - in_size);
-
- if (!err) {
- io_stream->size -= in_size;
- }
- }
-
- return cci_check_error (err);
-}
-
-/* ------------------------------------------------------------------------ */
-
-cc_uint32 cci_stream_write (cci_stream_t io_stream,
- const void *in_data,
- cc_uint64 in_size)
-{
- cc_int32 err = ccNoError;
-
- if (!io_stream) { err = cci_check_error (ccErrBadParam); }
- if (!in_data ) { err = cci_check_error (ccErrBadParam); }
-
- if (!err) {
- /* Security check: Do not let the caller overflow the length */
- if (in_size > (UINT64_MAX - io_stream->size)) {
- err = cci_check_error (ccErrBadParam);
- }
- }
-
- if (!err) {
- err = cci_stream_reallocate (io_stream, io_stream->size + in_size);
- }
-
- if (!err) {
- memcpy (&io_stream->data[io_stream->size], in_data, in_size);
- io_stream->size += in_size;
- }
-
- return cci_check_error (err);
-}
-
-#ifdef TARGET_OS_MAC
-#pragma mark -
-#endif
-
-/* ------------------------------------------------------------------------ */
-
-cc_uint32 cci_stream_read_string (cci_stream_t io_stream,
- char **out_string)
-{
- cc_int32 err = ccNoError;
- cc_uint32 length = 0;
- char *string = NULL;
-
- if (!io_stream ) { err = cci_check_error (ccErrBadParam); }
- if (!out_string) { err = cci_check_error (ccErrBadParam); }
-
- if (!err) {
- err = cci_stream_read_uint32 (io_stream, &length);
- }
-
- if (!err) {
- string = malloc (length);
- if (!string) { err = cci_check_error (ccErrNoMem); }
- }
-
- if (!err) {
- err = cci_stream_read (io_stream, string, length);
- }
-
- if (!err) {
- *out_string = string;
- string = NULL;
- }
-
- free (string);
-
- return cci_check_error (err);
-}
-
-/* ------------------------------------------------------------------------ */
-
-cc_uint32 cci_stream_write_string (cci_stream_t io_stream,
- const char *in_string)
-{
- cc_int32 err = ccNoError;
- cc_uint32 length = 0;
-
- if (!io_stream) { err = cci_check_error (ccErrBadParam); }
- if (!in_string) { err = cci_check_error (ccErrBadParam); }
-
- if (!err) {
- length = strlen (in_string) + 1;
-
- err = cci_stream_write_uint32 (io_stream, length);
- }
-
- if (!err) {
- err = cci_stream_write (io_stream, in_string, length);
- }
-
- return cci_check_error (err);
-}
-
-#ifdef TARGET_OS_MAC
-#pragma mark -
-#endif
-
-/* ------------------------------------------------------------------------ */
-
-cc_uint32 cci_stream_read_int32 (cci_stream_t io_stream,
- cc_int32 *out_int32)
-{
- cc_int32 err = ccNoError;
- cc_int32 int32 = 0;
-
- if (!io_stream) { err = cci_check_error (ccErrBadParam); }
- if (!out_int32) { err = cci_check_error (ccErrBadParam); }
-
- if (!err) {
- err = cci_stream_read (io_stream, &int32, sizeof (int32));
- }
-
- if (!err) {
- *out_int32 = ntohl (int32);
- }
-
- return cci_check_error (err);
-}
-
-/* ------------------------------------------------------------------------ */
-
-cc_uint32 cci_stream_write_int32 (cci_stream_t io_stream,
- cc_int32 in_int32)
-{
- cc_int32 err = ccNoError;
- cc_int32 int32 = htonl (in_int32);
-
- if (!io_stream) { err = cci_check_error (ccErrBadParam); }
-
- if (!err) {
- err = cci_stream_write (io_stream, &int32, sizeof (int32));
- }
-
- return cci_check_error (err);
-}
-
-#ifdef TARGET_OS_MAC
-#pragma mark -
-#endif
-
-/* ------------------------------------------------------------------------ */
-
-cc_uint32 cci_stream_read_uint32 (cci_stream_t io_stream,
- cc_uint32 *out_uint32)
-{
- cc_int32 err = ccNoError;
- cc_uint32 uint32 = 0;
-
- if (!io_stream) { err = cci_check_error (ccErrBadParam); }
- if (!out_uint32) { err = cci_check_error (ccErrBadParam); }
-
- if (!err) {
- err = cci_stream_read (io_stream, &uint32, sizeof (uint32));
- }
-
- if (!err) {
- *out_uint32 = ntohl (uint32);
- }
-
- return cci_check_error (err);
-}
-
-/* ------------------------------------------------------------------------ */
-
-cc_uint32 cci_stream_write_uint32 (cci_stream_t io_stream,
- cc_uint32 in_uint32)
-{
- cc_int32 err = ccNoError;
- cc_int32 uint32 = htonl (in_uint32);
-
- if (!io_stream) { err = cci_check_error (ccErrBadParam); }
-
- if (!err) {
- err = cci_stream_write (io_stream, &uint32, sizeof (uint32));
- }
-
- return cci_check_error (err);
-}
-
-#ifdef TARGET_OS_MAC
-#pragma mark -
-#endif
-
-/* ------------------------------------------------------------------------ */
-
-cc_uint32 cci_stream_read_int64 (cci_stream_t io_stream,
- cc_int64 *out_int64)
-{
- cc_int32 err = ccNoError;
- cc_uint64 int64 = 0;
-
- if (!io_stream) { err = cci_check_error (ccErrBadParam); }
- if (!out_int64) { err = cci_check_error (ccErrBadParam); }
-
- if (!err) {
- err = cci_stream_read (io_stream, &int64, sizeof (int64));
- }
-
- if (!err) {
- *out_int64 = ntohll (int64);
- }
-
- return cci_check_error (err);
-}
-
-/* ------------------------------------------------------------------------ */
-
-cc_uint32 cci_stream_write_int64 (cci_stream_t io_stream,
- cc_int64 in_int64)
-{
- cc_int32 err = ccNoError;
- cc_int64 int64 = htonll (in_int64);
-
- if (!io_stream) { err = cci_check_error (ccErrBadParam); }
-
- if (!err) {
- err = cci_stream_write (io_stream, &int64, sizeof (int64));
- }
-
- return cci_check_error (err);
-}
-
-
-#ifdef TARGET_OS_MAC
-#pragma mark -
-#endif
-
-/* ------------------------------------------------------------------------ */
-
-cc_uint32 cci_stream_read_uint64 (cci_stream_t io_stream,
- cc_uint64 *out_uint64)
-{
- cc_int32 err = ccNoError;
- cc_uint64 uint64 = 0;
-
- if (!io_stream) { err = cci_check_error (ccErrBadParam); }
- if (!out_uint64) { err = cci_check_error (ccErrBadParam); }
-
- if (!err) {
- err = cci_stream_read (io_stream, &uint64, sizeof (uint64));
- }
-
- if (!err) {
- *out_uint64 = ntohll (uint64);
- }
-
- return cci_check_error (err);
-}
-
-/* ------------------------------------------------------------------------ */
-
-cc_uint32 cci_stream_write_uint64 (cci_stream_t io_stream,
- cc_uint64 in_uint64)
-{
- cc_int32 err = ccNoError;
- cc_int64 uint64 = htonll (in_uint64);
-
- if (!io_stream) { err = cci_check_error (ccErrBadParam); }
-
- if (!err) {
- err = cci_stream_write (io_stream, &uint64, sizeof (uint64));
- }
-
- return cci_check_error (err);
-}
-
-#ifdef TARGET_OS_MAC
-#pragma mark -
-#endif
-
-/* ------------------------------------------------------------------------ */
-
-cc_uint32 cci_stream_read_time (cci_stream_t io_stream,
- cc_time_t *out_time)
-{
- cc_int32 err = ccNoError;
- cc_int64 t = 0;
-
- if (!io_stream) { err = cci_check_error (ccErrBadParam); }
- if (!out_time ) { err = cci_check_error (ccErrBadParam); }
-
- if (!err) {
- err = cci_stream_read_int64 (io_stream, &t);
- }
-
- if (!err) {
- *out_time = t;
- }
-
- return cci_check_error (err);
-}
-
-/* ------------------------------------------------------------------------ */
-
-cc_uint32 cci_stream_write_time (cci_stream_t io_stream,
- cc_time_t in_time)
-{
- cc_int32 err = ccNoError;
-
- if (!io_stream) { err = cci_check_error (ccErrBadParam); }
-
- if (!err) {
- err = cci_stream_write_int64 (io_stream, in_time);
- }
-
- return cci_check_error (err);
-}
diff --git a/src/ccapi/common/cci_stream.h b/src/ccapi/common/cci_stream.h
deleted file mode 100644
index 76df2c846b..0000000000
--- a/src/ccapi/common/cci_stream.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * $Header$
- *
- * Copyright 2006 Massachusetts Institute of Technology.
- * All Rights Reserved.
- *
- * Export of this software from the United States of America may
- * require a specific license from the United States Government.
- * It is the responsibility of any person or organization contemplating
- * export to obtain such a license before exporting.
- *
- * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
- * distribute this software and its documentation for any purpose and
- * without fee is hereby granted, provided that the above copyright
- * notice appear in all copies and that both that copyright notice and
- * this permission notice appear in supporting documentation, and that
- * the name of M.I.T. not be used in advertising or publicity pertaining
- * to distribution of the software without specific, written prior
- * permission. Furthermore if you modify this software you must label
- * your software as modified software and not distribute it in such a
- * fashion that it might be confused with the original M.I.T. software.
- * M.I.T. makes no representations about the suitability of
- * this software for any purpose. It is provided "as is" without express
- * or implied warranty.
- */
-
-#ifndef CCI_STREAM_H
-#define CCI_STREAM_H
-
-#include "cci_types.h"
-
-cc_int32 cci_stream_new (cci_stream_t *out_stream);
-
-cc_uint32 cci_stream_release (cci_stream_t io_stream);
-
-cc_uint64 cci_stream_size (cci_stream_t in_stream);
-
-const char *cci_stream_data (cci_stream_t in_stream);
-
-cc_uint32 cci_stream_read (cci_stream_t in_stream,
- void *io_data,
- cc_uint64 in_size);
-cc_uint32 cci_stream_write (cci_stream_t in_stream,
- const void *in_data,
- cc_uint64 in_size);
-
-cc_uint32 cci_stream_read_string (cci_stream_t io_stream,
- char **out_string);
-cc_uint32 cci_stream_write_string (cci_stream_t io_stream,
- const char *in_string);
-
-cc_uint32 cci_stream_read_int32 (cci_stream_t io_stream,
- cc_int32 *out_int32);
-cc_uint32 cci_stream_write_int32 (cci_stream_t io_stream,
- cc_int32 in_int32);
-
-cc_uint32 cci_stream_read_uint32 (cci_stream_t io_stream,
- cc_uint32 *out_uint32);
-cc_uint32 cci_stream_write_uint32 (cci_stream_t io_stream,
- cc_uint32 in_uint32);
-
-cc_uint32 cci_stream_read_int64 (cci_stream_t io_stream,
- cc_int64 *out_int64);
-cc_uint32 cci_stream_write_int64 (cci_stream_t io_stream,
- cc_int64 in_int64);
-
-cc_uint32 cci_stream_read_uint64 (cci_stream_t io_stream,
- cc_uint64 *out_uint64);
-cc_uint32 cci_stream_write_uint64 (cci_stream_t io_stream,
- cc_uint64 in_uint64);
-
-cc_uint32 cci_stream_read_time (cci_stream_t io_stream,
- cc_time_t *out_time);
-cc_uint32 cci_stream_write_time (cci_stream_t io_stream,
- cc_time_t in_time);
-
-#endif /* CCI_STREAM_H */
diff --git a/src/ccapi/common/cci_types.h b/src/ccapi/common/cci_types.h
index 8ace67ce7b..20c64701a2 100644
--- a/src/ccapi/common/cci_types.h
+++ b/src/ccapi/common/cci_types.h
@@ -28,9 +28,7 @@
#define CCI_TYPES_H
#include <CredentialsCache.h>
-
-struct cci_stream_d;
-typedef struct cci_stream_d *cci_stream_t;
+#include <k5-ipc_stream.h>
typedef char *cci_uuid_string_t;
diff --git a/src/ccapi/common/mac/cci_mig.defs b/src/ccapi/common/mac/cci_mig.defs
deleted file mode 100644
index 3a573681a9..0000000000
--- a/src/ccapi/common/mac/cci_mig.defs
+++ /dev/null
@@ -1,54 +0,0 @@
-/* $Copyright:
- *
- * Copyright 2004-2006 by the Massachusetts Institute of Technology.
- *
- * All rights reserved.
- *
- * Export of this software from the United States of America may require a
- * specific license from the United States Government. It is the
- * responsibility of any person or organization contemplating export to
- * obtain such a license before exporting.
- *
- * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and distribute
- * this software and its documentation for any purpose and without fee is
- * hereby granted, provided that the above copyright notice appear in all
- * copies and that both that copyright notice and this permission notice
- * appear in supporting documentation, and that the name of M.I.T. not be
- * used in advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission. Furthermore if you
- * modify this software you must label your software as modified software
- * and not distribute it in such a fashion that it might be confused with
- * the original MIT software. M.I.T. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Individual source code files are copyright MIT, Cygnus Support,
- * OpenVision, Oracle, Sun Soft, FundsXpress, and others.
- *
- * Project Athena, Athena, Athena MUSE, Discuss, Hesiod, Kerberos, Moira,
- * and Zephyr are trademarks of the Massachusetts Institute of Technology
- * (MIT). No commercial use of these trademarks may be made without prior
- * written permission of MIT.
- *
- * "Commercial use" means use of a name in a product or other for-profit
- * manner. It does NOT prevent a commercial firm from referring to the MIT
- * trademarks in order to convey information (although in doing so,
- * recognition of their trademark status should be given).
- * $
- */
-
-#include <mach/std_types.defs>
-#include <mach/mach_types.defs>
-
-import "cci_mig_types.h";
-
-/* Note the 1024 must be the same as kCCAPIMaxILMsgSize */
-type cci_mipc_inl_request_t = array [ * : 1024 ] of char;
-type cci_mipc_ool_request_t = array [] of char;
-
-type cci_mipc_inl_reply_t = array [ * : 1024 ] of char;
-type cci_mipc_ool_reply_t = array [] of char;
diff --git a/src/ccapi/common/mac/cci_mig_reply.defs b/src/ccapi/common/mac/cci_mig_reply.defs
deleted file mode 100644
index f500ef9ac5..0000000000
--- a/src/ccapi/common/mac/cci_mig_reply.defs
+++ /dev/null
@@ -1,58 +0,0 @@
-/* $Copyright:
- *
- * Copyright 2004-2006 by the Massachusetts Institute of Technology.
- *
- * All rights reserved.
- *
- * Export of this software from the United States of America may require a
- * specific license from the United States Government. It is the
- * responsibility of any person or organization contemplating export to
- * obtain such a license before exporting.
- *
- * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and distribute
- * this software and its documentation for any purpose and without fee is
- * hereby granted, provided that the above copyright notice appear in all
- * copies and that both that copyright notice and this permission notice
- * appear in supporting documentation, and that the name of M.I.T. not be
- * used in advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission. Furthermore if you
- * modify this software you must label your software as modified software
- * and not distribute it in such a fashion that it might be confused with
- * the original MIT software. M.I.T. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Individual source code files are copyright MIT, Cygnus Support,
- * OpenVision, Oracle, Sun Soft, FundsXpress, and others.
- *
- * Project Athena, Athena, Athena MUSE, Discuss, Hesiod, Kerberos, Moira,
- * and Zephyr are trademarks of the Massachusetts Institute of Technology
- * (MIT). No commercial use of these trademarks may be made without prior
- * written permission of MIT.
- *
- * "Commercial use" means use of a name in a product or other for-profit
- * manner. It does NOT prevent a commercial firm from referring to the MIT
- * trademarks in order to convey information (although in doing so,
- * recognition of their trademark status should be given).
- * $
- */
-
-#include "cci_mig.defs"
-
-subsystem cci 200;
-
-serverprefix cci_mipc_;
-userprefix ccs_mipc_;
-
-/* ",dealloc" means that the vm_read() memory will be moved to
- * the other process rather than copied. This is necessary on the
- * client side because we can't know when server has copied our
- * buffers so we can't vm_deallocate() them ourselves. */
-
-simpleroutine reply (in_reply_port : mach_port_move_send_once_t;
- in_inl_reply : cci_mipc_inl_reply_t;
- in_ool_reply : cci_mipc_ool_reply_t, dealloc);
diff --git a/src/ccapi/common/mac/cci_mig_request.defs b/src/ccapi/common/mac/cci_mig_request.defs
deleted file mode 100644
index 45887e1a1a..0000000000
--- a/src/ccapi/common/mac/cci_mig_request.defs
+++ /dev/null
@@ -1,62 +0,0 @@
-/* $Copyright:
- *
- * Copyright 2004-2006 by the Massachusetts Institute of Technology.
- *
- * All rights reserved.
- *
- * Export of this software from the United States of America may require a
- * specific license from the United States Government. It is the
- * responsibility of any person or organization contemplating export to
- * obtain such a license before exporting.
- *
- * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and distribute
- * this software and its documentation for any purpose and without fee is
- * hereby granted, provided that the above copyright notice appear in all
- * copies and that both that copyright notice and this permission notice
- * appear in supporting documentation, and that the name of M.I.T. not be
- * used in advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission. Furthermore if you
- * modify this software you must label your software as modified software
- * and not distribute it in such a fashion that it might be confused with
- * the original MIT software. M.I.T. makes no representations about the
- * suitability of this software for any purpose. It is provided "as is"
- * without express or implied warranty.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Individual source code files are copyright MIT, Cygnus Support,
- * OpenVision, Oracle, Sun Soft, FundsXpress, and others.
- *
- * Project Athena, Athena, Athena MUSE, Discuss, Hesiod, Kerberos, Moira,
- * and Zephyr are trademarks of the Massachusetts Institute of Technology
- * (MIT). No commercial use of these trademarks may be made without prior
- * written permission of MIT.
- *
- * "Commercial use" means use of a name in a product or other for-profit
- * manner. It does NOT prevent a commercial firm from referring to the MIT
- * trademarks in order to convey information (although in doing so,
- * recognition of their trademark status should be given).
- * $
- */
-
-#include "cci_mig.defs"
-
-subsystem ccs 100;
-
-serverprefix ccs_mipc_;
-userprefix cci_mipc_;
-
-routine create_client_connection (in_server_port : mach_port_t;
- out out_connection_port : mach_port_t = MACH_MSG_TYPE_MAKE_SEND);
-
-/* ",dealloc" means that the vm_read() memory will be moved to
- * the other process rather than copied. This is necessary on the
- * server side because we can't know when client has copied our
- * buffers so we can't vm_deallocate() them ourselves. */
-
-simpleroutine request (in_connection_port : mach_port_t;
- in_reply_port : mach_port_make_send_once_t;
- in_inl_request : cci_mipc_inl_request_t;
- in_ool_request : cci_mipc_ool_request_t, dealloc);
diff --git a/src/ccapi/common/mac/cci_mig_types.h b/src/ccapi/common/mac/cci_mig_types.h
deleted file mode 100644
index d82d5ac59d..0000000000
--- a/src/ccapi/common/mac/cci_mig_types.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* $Copyright:
-*
-* Copyright 2004-2006 by the Massachusetts Institute of Technology.
-*
-* All rights reserved.
-*
-* Export of this software from the United States of America may require a
-* specific license from the United States Government. It is the
-* responsibility of any person or organization contemplating export to
-* obtain such a license before exporting.
-*
-* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and distribute
-* this software and its documentation for any purpose and without fee is
-* hereby granted, provided that the above copyright notice appear in all
-* copies and that both that copyright notice and this permission notice
-* appear in supporting documentation, and that the name of M.I.T. not be
-* used in advertising or publicity pertaining to distribution of the
-* software without specific, written prior permission. Furthermore if you
-* modify this software you must label your software as modified software
-* and not distribute it in such a fashion that it might be confused with
-* the original MIT software. M.I.T. makes no representations about the
-* suitability of this software for any purpose. It is provided "as is"
-* without express or implied warranty.
-*
-* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
-* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
-* MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-*
-* Individual source code files are copyright MIT, Cygnus Support,
-* OpenVision, Oracle, Sun Soft, FundsXpress, and others.
-*
-* Project Athena, Athena, Athena MUSE, Discuss, Hesiod, Kerberos, Moira,
-* and Zephyr are trademarks of the Massachusetts Institute of Technology
-* (MIT). No commercial use of these trademarks may be made without prior
-* written permission of MIT.
-*
-* "Commercial use" means use of a name in a product or other for-profit
-* manner. It does NOT prevent a commercial firm from referring to the MIT
-* trademarks in order to convey information (although in doing so,
-* recognition of their trademark status should be given).
-* $
-*/
-
-#ifndef CCI_MIG_TYPES_H
-#define CCI_MIG_TYPES_H
-
-#include "cci_common.h"
-
-#define kCCAPIMaxILMsgSize 1024
-
-typedef const char cci_mipc_inl_request_t[kCCAPIMaxILMsgSize];
-typedef const char *cci_mipc_ool_request_t;
-typedef char cci_mipc_inl_reply_t[kCCAPIMaxILMsgSize];
-typedef char *cci_mipc_ool_reply_t;
-
-#endif /* CCI_MIG_TYPES_H */
diff --git a/src/ccapi/common/win/tls.c b/src/ccapi/common/win/tls.c
index 45020b5707..5e0e11d7af 100644
--- a/src/ccapi/common/win/tls.c
+++ b/src/ccapi/common/win/tls.c
@@ -57,7 +57,7 @@ void tspdata_setRpcAState (struct tspdata* p, RPC_ASYNC_STATE* rpcState)
void tspdata_setSST (struct tspdata* p, time_t t) {p->_sst = t;}
-void tspdata_setStream (struct tspdata* p, cci_stream_t s) {p->_stream = s;}
+void tspdata_setStream (struct tspdata* p, k5_ipc_stream s) {p->_stream = s;}
BOOL tspdata_getConnected (const struct tspdata* p) {return p->_CCAPI_Connected;}
@@ -66,7 +66,7 @@ HANDLE tspdata_getReplyEvent(const struct tspdata* p) {return p->_
time_t tspdata_getSST (const struct tspdata* p) {return p->_sst;}
-cci_stream_t tspdata_getStream (const struct tspdata* p) {return p->_stream;}
+k5_ipc_stream tspdata_getStream (const struct tspdata* p) {return p->_stream;}
char* tspdata_getUUID (const struct tspdata* p) {return p->_uuid;}
diff --git a/src/ccapi/common/win/tls.h b/src/ccapi/common/win/tls.h
index 1a6086888b..b6761c8bb3 100644
--- a/src/ccapi/common/win/tls.h
+++ b/src/ccapi/common/win/tls.h
@@ -46,7 +46,7 @@ struct tspdata {
RPC_ASYNC_STATE* _rpcState;
HANDLE _replyEvent;
time_t _sst;
- cci_stream_t _stream;
+ k5_ipc_stream _stream;
char _uuid[UUID_SIZE];
};
@@ -57,14 +57,14 @@ void tspdata_setConnected (struct tspdata* p, BOOL b);
void tspdata_setReplyEvent(struct tspdata* p, HANDLE h);
void tspdata_setRpcAState (struct tspdata* p, RPC_ASYNC_STATE* rpcState);
void tspdata_setSST (struct tspdata* p, time_t t);
-void tspdata_setStream (struct tspdata* p, cci_stream_t s);
+void tspdata_setStream (struct tspdata* p, k5_ipc_stream s);
void tspdata_setUUID (struct tspdata* p, unsigned char __RPC_FAR* uuidString);
HANDLE tspdata_getReplyEvent(const struct tspdata* p);
BOOL tspdata_getConnected(const struct tspdata* p);
RPC_ASYNC_STATE* tspdata_getRpcAState(const struct tspdata* p);
time_t tspdata_getSST (const struct tspdata* p);
-cci_stream_t tspdata_getStream (const struct tspdata* p);
+k5_ipc_stream tspdata_getStream (const struct tspdata* p);
char* tspdata_getUUID (const struct tspdata* p);
BOOL WINAPI PutTspData(DWORD tlsIndex, struct tspdata* dw);