| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- /* 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, /* attic */
- LINK_GHOSTSHA1, /* attic */
- LINK_GHOSTMD5, /* attic */
- LINK_CLEARTEXT,
- LINK_GHOSTCASE, /* attic */
- LINK_GHOSTCASE2
- };
- 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 *);
- };
- struct enc_link_dcc {
- struct enc_link *method;
- int method_number;
- };
- 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, const char *, ...) __attribute__((format(printf, 2, 3)));
- extern void link_done(int);
- extern void link_parse(int, char *);
- extern void link_get_method(int);
- #endif /* !_ENCLINK_H */
|