/[cvs]/eggdrop1.8/src/eggdrop.h
ViewVC logotype

Diff of /eggdrop1.8/src/eggdrop.h

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.5 by pseudo, Thu Oct 14 09:49:47 2010 UTC revision 1.6 by pseudo, Tue Oct 19 12:13:33 2010 UTC
# Line 274  Line 274 
274  typedef int socklen_t;  typedef int socklen_t;
275  #endif  #endif
276    
277    #ifdef TLS
278    #  include <openssl/ssl.h>
279    #endif
280    
281  /*  /*
282   *    Handy aliases for memory tracking and core dumps   *    Handy aliases for memory tracking and core dumps
283   */   */
# Line 391  struct dcc_t { Line 395  struct dcc_t {
395    IP addr;                      /* IP address in host network byte order. */    IP addr;                      /* IP address in host network byte order. */
396    sockname_t sockname;          /* IPv4/IPv6 sockaddr placeholder */    sockname_t sockname;          /* IPv4/IPv6 sockaddr placeholder */
397    unsigned int port;    unsigned int port;
398    #ifdef TLS
399      int ssl;
400    #endif
401    struct userrec *user;    struct userrec *user;
402    char nick[NICKLEN];    char nick[NICKLEN];
403    char host[UHOSTLEN];    char host[UHOSTLEN];
# Line 536  struct dupwait_info { Line 543  struct dupwait_info {
543    
544  /* For dcc chat & files. */  /* For dcc chat & files. */
545  #define STAT_ECHO    0x00001    /* echo commands back?                  */  #define STAT_ECHO    0x00001    /* echo commands back?                  */
546  #define STAT_DENY    0x00002    /* bad username (ignore password & deny  #define STAT_FPRINT  0x00002    /* fingerprint auth (ignore password &
547                                   * access)                              */                                   * allow access)                        */
548  #define STAT_CHAT    0x00004    /* in file-system but may return        */  #define STAT_CHAT    0x00004    /* in file-system but may return        */
549  #define STAT_TELNET  0x00008    /* connected via telnet                 */  #define STAT_TELNET  0x00008    /* connected via telnet                 */
550  #define STAT_PARTY   0x00010    /* only on party line via 'p' flag      */  #define STAT_PARTY   0x00010    /* only on party line via 'p' flag      */
# Line 566  struct dupwait_info { Line 573  struct dupwait_info {
573  #define STAT_LINKING 0x00100    /* the bot is currently going through  #define STAT_LINKING 0x00100    /* the bot is currently going through
574                                   * the linking stage                     */                                   * the linking stage                     */
575  #define STAT_AGGRESSIVE 0x00200 /* aggressively sharing with this bot    */  #define STAT_AGGRESSIVE 0x00200 /* aggressively sharing with this bot    */
576    #ifdef TLS
577    #define STAT_STARTTLS   0x00400 /* have we sent a starttls request?      */
578    #endif
579    
580  /* Flags for listening sockets */  /* Flags for listening sockets */
581  #define LSTN_PUBLIC  0x000001   /* No access restrictions               */  #define LSTN_PUBLIC  0x000001   /* No access restrictions               */
# Line 690  enum { Line 700  enum {
700  #define HELP_TEXT       2  #define HELP_TEXT       2
701  #define HELP_IRC        16  #define HELP_IRC        16
702    
703    #ifdef TLS
704    /* TLS generic flags */
705    #  define TLS_LISTEN            0x80000000
706    #  define TLS_CONNECT           0x40000000
707    #  define TLS_DEPTH0            0x20000000
708    
709    /* TLS verification flags */
710    #  define TLS_VERIFYPEER        0x00000001
711    #  define TLS_VERIFYCN          0x00000002
712    #  define TLS_VERIFYISSUER      0x00000004
713    #  define TLS_VERIFYFROM        0x00000008
714    #  define TLS_VERIFYTO          0x00000010
715    #  define TLS_VERIFYREV         0x00000020
716    
717    /* Context information to attach to SSL sockets */
718    typedef struct {
719      int flags;            /* listen/connect, generic ssl flags      */
720      int verify;           /* certificate validation mode            */
721      int loglevel;         /* log level to output TLS information to */
722      char host[256];       /* host or IP for certificate validation  */
723      IntFunc cb;
724    } ssl_appdata;
725    #endif /* TLS */
726    
727  /* These are used by the net module to keep track of sockets and what's  /* These are used by the net module to keep track of sockets and what's
728   * queued on them   * queued on them
729   */   */
# Line 708  struct tclsock_handler { Line 742  struct tclsock_handler {
742    
743  typedef struct sock_list {  typedef struct sock_list {
744    int sock;    int sock;
745    #ifdef TLS
746      SSL *ssl;
747    #endif
748    short flags;    short flags;
749    union {    union {
750      struct sock_handler sock;      struct sock_handler sock;

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23