| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- /* enclink.h
- *
- */
- #ifndef _ENCLINK_H
- #define _ENCLINK_H
- #include <sys/types.h>
- /* must leave old ones in here */
- enum {
- LINK_GHOST = 0, /* attic */
- LINK_GHOSTNAT,
- LINK_GHOSTSHA1,
- LINK_GHOSTMD5,
- LINK_CLEARTEXT
- };
- enum direction_t {
- FROM,
- TO
- };
- struct enc_link {
- const char *name;
- int type;
- void (*link) (int, direction_t);
- char *(*write) (int, char *, size_t *);
- int (*read) (int, char *, size_t *);
- void (*parse) (int, int, char *);
- };
- extern struct enc_link enclink[];
- extern int link_find_by_type(int);
- extern void link_link(int, int, int, direction_t);
- extern char *link_write(int, char *, size_t *);
- extern int link_read(int, char *, size_t *);
- extern void link_hash(int, char *);
- extern void link_send(int, char *, ...) __attribute__((format(printf, 2, 3)));
- extern void link_done(int);
- extern void link_parse(int, char *);
- #endif /* !_ENCLINK_H */
|