+Sat Oct 19 00:39:25 1996 Theodore Y. Ts'o <tytso@mit.edu>
+
+ * util_ordering.c (g_queue_externalize, g_queue_internalize,
+ g_queue_size): New routines which allow the serailizing
+ routines to access the seqstate structure.
+
Thu Oct 10 15:03:38 1996 Tom Yu <tlyu@mit.edu>
* configure.in: Remove calls to CopySrcHeader.
void g_order_free PROTOTYPE((void **queue));
+gss_uint32 g_queue_size(void *vqueue, size_t *sizep);
+gss_uint32 g_queue_externalize(void *vqueue, unsigned char **buf,
+ size_t *lenremain);
+gss_uint32 g_queue_internalize(void **vqueue, unsigned char **buf,
+ size_t *lenremain);
+
char *g_canonicalize_host PROTOTYPE((char *hostname));
char *g_local_host_name PROTOTYPE((void));
*vqueue = NULL;
}
+
+/*
+ * These support functions are for the serialization routines
+ */
+gss_uint32
+g_queue_size(void *vqueue, size_t *sizep)
+{
+ *sizep += sizeof(queue);
+ return 0;
+}
+
+gss_uint32
+g_queue_externalize(void *vqueue, unsigned char **buf, size_t *lenremain)
+{
+ memcpy(*buf, vqueue, sizeof(queue));
+ *buf += sizeof(queue);
+ *lenremain += sizeof(queue);
+
+ return 0;
+}
+
+gss_uint32
+g_queue_internalize(void **vqueue, unsigned char **buf, size_t *lenremain)
+{
+ void *q;
+
+ if ((q = malloc(sizeof(queue))) == 0)
+ return ENOMEM;
+ memcpy(q, *buf, sizeof(queue));
+ *buf += sizeof(queue);
+ *lenremain += sizeof(queue);
+ *vqueue = q;
+ return 0;
+}