summaryrefslogtreecommitdiffstats
path: root/src/include/k5-ipc_stream.h
diff options
context:
space:
mode:
authorAlexandra Ellwood <lxs@mit.edu>2008-09-28 19:43:47 +0000
committerAlexandra Ellwood <lxs@mit.edu>2008-09-28 19:43:47 +0000
commitb5dce4285a9330d25542528030ce93da78e36375 (patch)
treec8cbd6a729cddb99bda84991e1c7c231449434f2 /src/include/k5-ipc_stream.h
parent01a5986cbf7afdba2b805bdd16893b6b52c87f42 (diff)
downloadkrb5-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/k5-ipc_stream.h')
-rw-r--r--src/include/k5-ipc_stream.h82
1 files changed, 82 insertions, 0 deletions
diff --git a/src/include/k5-ipc_stream.h b/src/include/k5-ipc_stream.h
new file mode 100644
index 000000000..55397ef90
--- /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 */