From: Adam Dickmeiss Date: Mon, 27 Mar 1995 08:23:17 +0000 (+0000) Subject: First version of gip interface (gateway IPc). X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=d3b3396613660100d6d830c336fd3df9d01c0a77;p=egate.git First version of gip interface (gateway IPc). First version of gw-db: gateway hash db. --- diff --git a/include/gip.h b/include/gip.h new file mode 100644 index 0000000..45b4003 --- /dev/null +++ b/include/gip.h @@ -0,0 +1,36 @@ +/* Gateway kernel + * Europagate, 1995 + * + * $Log: gip.h,v $ + * Revision 1.1 1995/03/27 08:23:17 adam + * First version of gip interface (gateway IPc). + * First version of gw-db: gateway hash db. + * + */ + +typedef struct GIP_info { + int rfd; + int wfd; + char *name; + int ret; + int errno; +} *GIP; + +GIP gip_initialize (const char *name); +int gip_destroy (GIP gip); +int gip_infileno (GIP gip); +int gip_errno (GIP gip); +int gip_read (GIP gip, char *buf, size_t count); +int gip_write (GIP gip, const char *buf, size_t count); +int gip_wline (GIP gip, const char *buf); + +GIP gipc_initialize (const char *name); +int gipc_destroy (GIP gip); +int gipc_open (GIP gip, const char *server, int sync); +int gipc_close (GIP gip); + +GIP gips_initialize (const char *name); +int gips_destroy (GIP gip); +int gips_open (GIP gip, const char *client); +int gips_close (GIP gip); + diff --git a/include/gw-db.h b/include/gw-db.h new file mode 100644 index 0000000..859df2d --- /dev/null +++ b/include/gw-db.h @@ -0,0 +1,21 @@ +/* Gateway db utility + * Europagate, 1995 + * + * $Log: gw-db.h,v $ + * Revision 1.1 1995/03/27 08:23:18 adam + * First version of gip interface (gateway IPc). + * First version of gw-db: gateway hash db. + * + */ + +typedef struct gw_db *GW_DB; + +int gw_db_lookup (GW_DB db, const char *name, int name_length, + void **buf, size_t *count); +int gw_db_insert (GW_DB db, const char *name, int name_length, + const void *buf, size_t count); +GW_DB gw_db_open (const char *fname, int write_flag); +int gw_db_close (GW_DB db); + +int gw_db_no_ent (GW_DB db); +int gw_db_seq_no (GW_DB db);