
#ifndef _CTCP_H
#define _CTCP_H

/* CTCP definitions */

#define CTCP_XFER       'A'
#define CTCP_FINGER     'B'
#define CTCP_FINGEROUT  'b'
#define CTCP_VERSION    'C'
#define CTCP_VERSIONOUT 'd'
#define CTCP_SECURE     'D'
#define CTCP_TIME       'E'
#define CTCP_TIMEOUT    'e'

#define CTCP_CHATIN     'F'
#define CTCP_CHATOUT    'f'

/* Connect or bind a port */

#define SEND    0
#define GET     1
#define SERVER  2
#define CHAT    3

#define ACTIVE  0
#define WAIT    1

#define IN  0
#define OUT 1

typedef struct secure {
    int s;  /* socket fd */
    int status; /* WAIT or ACTIVE */
    long start; /* chat start time */
    long bytes; /* Bytes sent/recieved */
    unsigned long ip; /* ip address */
    unsigned short port;  /* port number */
    char active;  /* is this still active */
    char initiator; /* Did we start the session? */
    char crypt; /* Using encryption? */
    char who[13]; /* who's on the other end */
    char key[65]; /* Crypt key */
}   SECURE;

#endif /* _CTCP_H */
