#define BACKEND_H
#include <proto.h>
+#include <statserv.h>
typedef struct bend_initrequest
{
* OF THIS SOFTWARE.
*
* $Log: comstack.h,v $
- * Revision 1.4 1995-05-16 08:50:29 quinn
+ * Revision 1.5 1995-05-29 08:11:31 quinn
+ * Moved oid from odr/asn to util.
+ *
+ * Revision 1.4 1995/05/16 08:50:29 quinn
* License, documentation, and memory fixes
*
* Revision 1.3 1995/04/20 15:12:44 quinn
#ifndef COMSTACK_H
#define COMSTACK_H
+#include <oid.h>
#include <dmalloc.h>
#define COMSTACK_DEFAULT_TIMEOUT -1
#define CS_DISCON 2
#define CS_LISTEN 3
#define CS_DATA 4
- int protocol; /* what application protocol are we talking? */
-#define CS_Z3950 0
-#define CS_SR 1
+ enum oid_proto protocol; /* what application protocol are we talking? */
int (*f_look)(COMSTACK handle);
int (*f_put)(COMSTACK handle, char *buf, int size);
int (*f_get)(COMSTACK handle, char **buf, int *bufsize);
* OF THIS SOFTWARE.
*
* $Log: odr.h,v $
- * Revision 1.6 1995-05-22 14:47:00 quinn
+ * Revision 1.7 1995-05-29 08:11:32 quinn
+ * Moved oid from odr/asn to util.
+ *
+ * Revision 1.6 1995/05/22 14:47:00 quinn
* ODR_NULLVAL --> void
*
* Revision 1.5 1995/05/22 11:31:24 quinn
int top;
} Odr_bitmask;
-#define ODR_OID_SIZE 100
typedef int Odr_oid; /* terminate by -1 */
typedef struct odr_constack
* OF THIS SOFTWARE.
*
* $Log: oid.h,v $
- * Revision 1.2 1995-05-16 08:50:35 quinn
+ * Revision 1.3 1995-05-29 08:11:33 quinn
+ * Moved oid from odr/asn to util.
+ *
+ * Revision 1.2 1995/05/16 08:50:35 quinn
* License, documentation, and memory fixes
*
* Revision 1.1 1995/03/30 09:39:41 quinn
#ifndef OID_H
#define OID_H
-#include <odr.h>
+#define OID_SIZE 100
typedef struct oident
{
VAL_EXPORTSPEC,
VAL_EXPORTINV
} value;
- Odr_oid oidsuffix[20];
+ int oidsuffix[20];
char *desc;
} oident;
typedef enum oid_class oid_class;
typedef enum oid_value oid_value;
-Odr_oid *oid_getoidbyent(struct oident *ent);
-struct oident *oid_getentbyoid(Odr_oid *o);
+int *oid_getoidbyent(struct oident *ent);
+struct oident *oid_getentbyoid(int *o);
+void oid_oidcpy(int *t, int *s);
+void oid_oidcat(int *t, int *s);
+int oid_oidcmp(int *o1, int *o2);
+int oid_oidlen(int *o);
#endif
* OF THIS SOFTWARE.
*
* $Log: proto.h,v $
- * Revision 1.9 1995-05-22 11:31:25 quinn
+ * Revision 1.10 1995-05-29 08:11:34 quinn
+ * Moved oid from odr/asn to util.
+ *
+ * Revision 1.9 1995/05/22 11:31:25 quinn
* Added PDUs
*
* Revision 1.8 1995/05/17 08:41:35 quinn
#define PROTO_H
#include <odr.h>
+#include <oid.h>
#include <odr_use.h>
/* ----------------- GLOBAL AUXILIARY DEFS ----------------*/
void odr_begin(ODR o);
void odr_end(ODR o);
void odr_release_mem(struct odr_memblock *p);
-void odr_oidcpy(Odr_oid *t, Odr_oid *s);
-void odr_oidcat(Odr_oid *t, Odr_oid *s);
-int odr_oidcmp(Odr_oid *o1, Odr_oid *o2);
-int odr_oidlen(Odr_oid *o);
Odr_oid *odr_oiddup(ODR odr, Odr_oid *o);
int odr_grow_block(odr_ecblock *b, int min_bytes);
int odr_write(ODR o, unsigned char *buf, int bytes);
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: odr_oid.c,v $
- * Revision 1.9 1995-05-16 08:50:57 quinn
+ * Revision 1.10 1995-05-29 08:11:44 quinn
+ * Moved oid from odr/asn to util.
+ *
+ * Revision 1.9 1995/05/16 08:50:57 quinn
* License, documentation, and memory fixes
*
* Revision 1.8 1995/03/17 10:17:55 quinn
*/
#include <odr.h>
+#include <oid.h>
/*
* Top level oid en/decoder.
return 1;
}
if (o->direction == ODR_DECODE)
- *p = odr_malloc(o, ODR_OID_SIZE * sizeof(**p));
+ *p = odr_malloc(o, OID_SIZE * sizeof(**p));
return ber_oidc(o, *p);
}
#include <stdlib.h>
#include <odr.h>
+#include <oid.h>
char *odr_indent(ODR o)
{
return o->bp - base < len;
}
-/* OID utilities */
-
-void odr_oidcpy(Odr_oid *t, Odr_oid *s)
-{
- while ((*(t++) = *(s++)) > -1);
-}
-
-void odr_oidcat(Odr_oid *t, Odr_oid *s)
-{
- while (*t > -1)
- t++;
- while ((*(t++) = *(s++)) > -1);
-}
-
-int odr_oidcmp(Odr_oid *o1, Odr_oid *o2)
-{
- while (*o1 == *o2 && *o1 > -1)
- {
- o1++;
- o2++;
- }
- if (*o1 == *o2)
- return 0;
- else if (*o1 > *o2)
- return 1;
- else
- return -1;
-}
-
-int odr_oidlen(Odr_oid *o)
-{
- int len = 0;
-
- while (*(o++) >= 0)
- len++;
- return len;
-}
-
Odr_oid *odr_oiddup(ODR odr, Odr_oid *o)
{
Odr_oid *r;
if (!o)
return 0;
- if (!(r = odr_malloc(odr, (odr_oidlen(o) + 1) * sizeof(Odr_oid))))
+ if (!(r = odr_malloc(odr, (oid_oidlen(o) + 1) * sizeof(int))))
return 0;
- odr_oidcpy(r, o);
+ oid_oidcpy(r, o);
return r;
}