1 /* Generic declarations of libtlspool for swig
3 * We use swig to generate wrappers for Python.
5 * We also include the generated result in the Git repository for TLS Pool,
6 * so there is no requirement to install Swig unless you run "make veryclean"
7 * instead of the usual "make clean".
9 * From: Rick van Rein <rick@openfortress.nl>
15 #include <tlspool/starttls.h>
16 #include <tlspool/commands.h>
21 // by default, export nothing (we rename most anyway)
26 // welcome flags and tags
28 %rename("%(strip:[TLSPOOL_])s") "";
29 %rename("%s", regexpmatch$name="^PIOC_") "";
30 %rename("%s", regexpmatch$name="^PIOF_") "";
33 // basic data types -- retyping a few parameters in SWIG-understandable terms
35 %apply unsigned char { uint8_t }
36 %apply unsigned short { uint16_t }
37 %apply unsigned int { uint32_t }
38 %apply short { int16_t }
42 typedef char identity_t [128];
44 typedef uint8_t ctlkey_t [16];
46 typedef char service_t [16];
48 typedef int pool_handle_t;
56 char YYYYMMDD_producer [8+128]; // when & who?
57 uint32_t facilities; // PIOF_FACILITY_xxx
79 int16_t in1_len, in2_len, prng_len;
97 int tlspool_pid (char *opt_pidfile);
99 pool_handle_t tlspool_open_poolhandle (char *path);
101 int tlspool_ping (ping_data *pingdata);
103 int tlspool_starttls (int cryptfd, starttls_data *tlsdata,
105 // int (*namedconnect) (starttls_t *tlsdata,void *privdata));
106 void *swig_null_callback);
108 int tlspool_control_detach (ctlkey_t ctlkey);
110 int tlspool_control_reattach (ctlkey_t ctlkey);
112 int tlspool_prng (char *label, char *opt_ctxvalue,
113 uint16_t prng_len, uint8_t *prng_buf,
116 char *tlspool_configvar (char *cfgfile, char *varname);
119 // libtlspool_pinentry.c
121 // NOT MAPPED -- callbacks are not part of SWIG's powers
123 //NOTMAPPED// %rename(pin_service) tlspool_pin_service;
124 //NOTMAPPED// // int tlspool_pin_service (char *path, uint32_t regflags, int responsetimeout_usec, void (*cb) (struct pioc_pinentry *entry, void *data), void *data);
128 // libtlspool_lidentry.c
130 // NOT MAPPED -- callbacks are not part of SWIG's powers
132 //NOTMAPPED// %rename(localid_service) tlspool_localid_service;
133 //NOTMAPPED// // int tlspool_localid_service (char *path, uint32_t regflags, int responsetimeout, char * (*cb) (lidentry_t *entry, void *data), void *data);