diff options
| author | Alexandra Ellwood <lxs@mit.edu> | 2008-09-28 19:43:47 +0000 |
|---|---|---|
| committer | Alexandra Ellwood <lxs@mit.edu> | 2008-09-28 19:43:47 +0000 |
| commit | b5dce4285a9330d25542528030ce93da78e36375 (patch) | |
| tree | c8cbd6a729cddb99bda84991e1c7c231449434f2 /src/include | |
| parent | 01a5986cbf7afdba2b805bdd16893b6b52c87f42 (diff) | |
| download | krb5-b5dce4285a9330d25542528030ce93da78e36375.tar.gz krb5-b5dce4285a9330d25542528030ce93da78e36375.tar.xz krb5-b5dce4285a9330d25542528030ce93da78e36375.zip | |
Create common stream and ipc layer for CCAPI and KIM.
Will switch CCAPI to this new code later though, so as
not to destabilize KfM and the Windows builds.
ticket: 6055
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20769 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/k5-ipc_stream.h | 82 | ||||
| -rw-r--r-- | src/include/k5-thread.h | 3 | ||||
| -rw-r--r-- | src/include/kim/kim_ui_plugin.h | 2 |
3 files changed, 86 insertions, 1 deletions
diff --git a/src/include/k5-ipc_stream.h b/src/include/k5-ipc_stream.h new file mode 100644 index 0000000000..55397ef908 --- /dev/null +++ b/src/include/k5-ipc_stream.h @@ -0,0 +1,82 @@ +/* + * $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 K5_IPC_STREAM_H +#define K5_IPC_STREAM_H + +#include "k5-platform.h" + +struct k5_ipc_stream; +typedef struct k5_ipc_stream *k5_ipc_stream; + + +int32_t k5_ipc_stream_new (k5_ipc_stream *out_stream); + +uint32_t k5_ipc_stream_release (k5_ipc_stream io_stream); + +uint64_t k5_ipc_stream_size (k5_ipc_stream in_stream); + +const char *k5_ipc_stream_data (k5_ipc_stream in_stream); + +uint32_t k5_ipc_stream_read (k5_ipc_stream in_stream, + void *io_data, + uint64_t in_size); +uint32_t k5_ipc_stream_write (k5_ipc_stream in_stream, + const void *in_data, + uint64_t in_size); + +uint32_t k5_ipc_stream_read_string (k5_ipc_stream io_stream, + char **out_string); +uint32_t k5_ipc_stream_write_string (k5_ipc_stream io_stream, + const char *in_string); +void k5_ipc_stream_free_string (char *in_string); + +uint32_t k5_ipc_stream_read_int32 (k5_ipc_stream io_stream, + int32_t *out_int32); +uint32_t k5_ipc_stream_write_int32 (k5_ipc_stream io_stream, + int32_t in_int32); + +uint32_t k5_ipc_stream_read_uint32 (k5_ipc_stream io_stream, + uint32_t *out_uint32); +uint32_t k5_ipc_stream_write_uint32 (k5_ipc_stream io_stream, + uint32_t in_uint32); + +uint32_t k5_ipc_stream_read_int64 (k5_ipc_stream io_stream, + int64_t *out_int64); +uint32_t k5_ipc_stream_write_int64 (k5_ipc_stream io_stream, + int64_t in_int64); + +uint32_t k5_ipc_stream_read_uint64 (k5_ipc_stream io_stream, + uint64_t *out_uint64); +uint32_t k5_ipc_stream_write_uint64 (k5_ipc_stream io_stream, + uint64_t in_uint64); + +uint32_t k5_ipc_stream_read_time (k5_ipc_stream io_stream, + time_t *out_time); +uint32_t k5_ipc_stream_write_time (k5_ipc_stream io_stream, + time_t in_time); + +#endif /* K5_IPC_STREAM_H */ diff --git a/src/include/k5-thread.h b/src/include/k5-thread.h index c2d4f4bf28..57aa78f4b9 100644 --- a/src/include/k5-thread.h +++ b/src/include/k5-thread.h @@ -414,6 +414,9 @@ typedef enum { K5_KEY_CCAPI_REQUEST_PORT, K5_KEY_CCAPI_REPLY_STREAM, K5_KEY_CCAPI_SERVER_DIED, + K5_KEY_IPC_REQUEST_PORT, + K5_KEY_IPC_REPLY_STREAM, + K5_KEY_IPC_SERVER_DIED, K5_KEY_COM_ERR_REENTER, #endif K5_KEY_MAX diff --git a/src/include/kim/kim_ui_plugin.h b/src/include/kim/kim_ui_plugin.h index b7d48ad89a..0f6895ffc6 100644 --- a/src/include/kim/kim_ui_plugin.h +++ b/src/include/kim/kim_ui_plugin.h @@ -40,7 +40,7 @@ enum kim_prompt_type_enum { kim_prompt_type_password = 0, kim_prompt_type_preauth = 1 }; - + /* * Plugins for Controlling Identity Selection and Credential Acquisition * |
