Ignore:
Timestamp:
11/13/09 13:11:06 (3 years ago)
Author:
eagle
Message:

Garlicat, 1st try

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/garlicat/src/ocat.h

    r523 r525  
    102102 
    103103#define IP6HLEN sizeof(struct ip6_hdr) 
    104 //! TOR prefix: FD87:D87E:EB43::/48 
     104/*//! TOR prefix: FD87:D87E:EB43::/48 
    105105#define TOR_PREFIX {{{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0,0,0,0,0,0,0,0,0,0}}} 
    106106#define TOR_PREFIX_LEN 48 
     
    111111#define TOR_PREFIX4 {0x0a000000} 
    112112#define TOR_PREFIX4_MASK 0xff000000 
    113 #endif 
     113#endif*/ 
    114114//! Length of an .onion-URL (without ".onion" and '\0') 
    115115#define ONION_URL_LEN 16 
    116 //! Total length of .onion-URL 
     116/*//! Total length of .onion-URL 
    117117#define ONION_NAME_SIZE (ONION_URL_LEN + 7) 
    118118//! Total length of .onion-URL (equal to ONION_NAME_SIZE) 
    119 #define ONION_NAME_LEN ONION_NAME_SIZE 
     119#define ONION_NAME_LEN ONION_NAME_SIZE*/ 
    120120 
    121121#define MAXPEERS 1024 
    122 //! Local listening port for incoming connections from TOR. 
     122/*//! Local listening port for incoming connections from TOR. 
    123123#define OCAT_LISTEN_PORT 8060 
    124124//! Local control port for querying status information. 
     
    127127#define OCAT_DEST_PORT 8060 
    128128//! SOCKS port of TOR proxy 
    129 #define TOR_SOCKS_PORT 9050 
     129#define TOR_SOCKS_PORT 9050*/ 
    130130#ifdef __OpenBSD__ 
    131131#define OCAT_UNAME "_tor" 
     
    235235#define VERSION_STRING_LEN 256 
    236236 
    237 typedef enum PeerType {PT_TOR, PT_I2P} PeerType_t; 
     237 
     238#define NTYPE_TOR 0 
     239#define NTYPE_I2P 1 
     240 
    238241 
    239242struct OcatSetup 
     
    256259   //! user name to change uid to 
    257260   char *usrname; 
    258    char onion_url[ONION_NAME_SIZE]; 
     261   char onion_url[SIZE_256]; 
    259262   struct in6_addr ocat_addr; 
    260263   //! flag to create connection log 
     
    308311   //! communication pipe for socks "selected" connector 
    309312   int socksfd[2]; 
     313   int net_type; 
    310314}; 
    311315 
     
    359363   unsigned inm; 
    360364   unsigned outm; 
    361    PeerType_t type; 
    362365} OcatPeer_t; 
    363366 
     
    566569void print_setup_struct(FILE *); 
    567570void init_setup(void); 
     571void post_init_setup(void); 
    568572void lock_setup(void); 
    569573void unlock_setup(void); 
Note: See TracChangeset for help on using the changeset viewer.