| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- /* enclink.h
- *
- */
- #ifndef _ENCLINK_H
- #define _ENCLINK_H
- #include <sys/types.h>
- enum {
- LINK_GHOST = 0,
- 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 */
|