#define DEBUG #define ENCRYPT 1 #define MAX(x,y) (((x)>(y))?(x):(y)) #define READ_TIMEOUT 90 #define WRITE_TIMEOUT 60 #define CONNECT_TIMEOUT 60 #define IPLEN 16 #define LINELEN 256 #define BIGBUFLEN 16384 #define NOIP_NAME "dynupdate.no-ip.com" #define CLIENT_IP_PORT 8245 #define VERSION "2.1.1" #define USER_AGENT "User-Agent: Linux-DUC/"VERSION #define SETTING_SCRIPT "settings.php?" #define USTRNG "username=" #define PWDSTRNG "&pass=" #define GETIP_SCRIPT "ip.php" #if ENCRYPT #define REQUEST "requestL=" #else #define REQUEST "" #endif #define UPDATE_SCRIPT "ducupdate.php" #ifdef DEBUG #define OPTCHARS "CYU:Fc:dD:hp:u:x:SMi:K:I:" #else #define OPTCHARS "CYU:Fc:hp:u:x:SMi:K:I:" #endif #define ARGC 1 #define ARGF (1<<1) #define ARGY (1<<2) #define ARGU (1<<3) #define ARGI (1<<4) #define ARGu (1<<5) #define ARGp (1<<6) #define ARGx (1<<7) #define ARGD (1<<8) #define ARGS (1<<9) #define ARGM (1<<10) #define ARGK (1<<11) #define ARGi (1<<12) #define NODNSGROUP "@@NO_GROUP@@" #define HOST 1 #define GROUP 2 #ifndef PREFIX #define PREFIX "/usr/local" #endif #define CONFIG_FILEPATH PREFIX"/etc" #define CONFIG_FILENAME PREFIX"/etc/no-ip2.conf" #define CONFSTRLEN 1024 #define MAX_DEVLEN 16 #define MAX_INSTANCE 4 #define MAX_NET_DEVS 48 #define B64MOD 4 #define CONFIG_MAGIC 0x414a324c #define NOIP_KEY 0x50494f4e #define SHMEM_SIZE (MAX_INSTANCE * sizeof(struct INSTANCE)) #define DEFAULT_NAT_INTERVAL 30 #define SPACE ' ' #define EQUALS '=' #define COMMENT '#' #define COMMA ',' #define ALREADYSET 0 #define SUCCESS 1 #define BADHOST 2 #define BADPASSWD 3 #define BADUSER 4 #define TOSVIOLATE 6 #define PRIVATEIP 7 #define HOSTDISABLED 8 #define HOSTISREDIRECT 9 #define BADGRP 10 #define SUCCESSGRP 11 #define ALREADYSETGRP 12 #define RELEASEDISABLED 99 #define UNKNOWNERR -1 #define FATALERR -1 #define NOHOSTLOOKUP -2 #define SOCKETFAIL -3 #define CONNTIMEOUT -4 #define CONNFAIL -5 #define READTIMEOUT -6 #define READFAIL -7 #define WRITETIMEOUT -8 #define WRITEFAIL -9 #define NOCONFIG -10 #define BADCONFIG1 -11 #define BADCONFIG2 -12 #define BADCONFIG3 -13 #define BADCONFIG4 -14 #define BADCONFIG5 -15 #define BADCONFIG6 -16 #define CMSG01 "Can't locate configuration file %s. (Try -c). Ending!\n" #define CMSG02 "'%s' is a badly constructed configuration file. Ending!\n" #define CMSG03 "'%s' is not a valid configuration file. Ending!\n" #define CMSG04 "Request elements unreadable in '%s'. Ending!\n" #define CMSG05 "Checksum error in '%s'. Ending!\n" #define CMSG06 "No hosts are available for this user." #define CMSG07 "Go to www.no-ip.com and create some!\n" #define CMSG08 "Configuration file can NOT be created.\n" #define CMSG09 "You have entered an incorrect username" #define CMSG10 "\t-or-" #define CMSG11 "an incorrect password for this username." #define CMSG12 "Only one host [%s] is registered to this account." #define CMSG13 "It will be used." #define CMSG14 "Only one group [%s] is registered to this account." #define CMSG16 "Too many hosts and/or groups!" #define CMSG17 "Please consolidate via www.no-ip.com" #define CMSG18 "Can't find network device names! Ending\n" #define CMSG19 "No network devices found! Ending." #define CMSG20 "Multiple network devices have been detected.\n" #define CMSG21 "Please select the Internet interface from this list.\n" #define CMSG22 "By typing the number associated with it." #define CMSG23 "Too many network devices. Limit is %d" #define CMSG24 "\nAuto configuration for Linux client of no-ip.com.\n" #define CMSG25 "Can't create config file (%s)" #define CMSG25a "Re-run noip, adding '-c configfilename' as a parameter." #define CMSG26 "Can't rename config file (%s)" #define CMSG27 "Network must be operational to create configfile. Ending!" #define CMSG28 "\nNew configuration file '%s' created.\n" #define CMSG29 "Nothing selected. Configuration file '%s' NOT created.\n" #define CMSG30 "Please enter the login/email string for no-ip.com " #define CMSG31 "Please enter the password for user '%s' " #define CMSG32 " are registered to this account.\n" #define CMSG33 "Do you wish to have them all updated?[N] (y/N) " #define CMSG34 "Do you wish to have group [%s] updated?[N] (y/N) " #define CMSG35 "Do you wish to have host [%s] updated?[N] (y/N) " #define CMSG36 "Empty request list in '%s'. Ending!" #define CMSG37 "No hosts or groups are registered to this account.\n" #define CMSG38 "Please enter an update interval:[%d] " #define CMSG39 "\nConfiguration file '%s' is in use by process %d.\nEnding!\n" #define CMSG40 "Do you wish to run something at successful update?[N] (y/N) " #define CMSG40a "Please enter the script/program name " #define CMSG41 "Exec path unreadable in '%s'. Ending!\n" #define CMSG99 "\nThis client has expired. Please go to http://www.no-ip.com/downloads.php" #define CMSG99a "to get our most recent version.\n" #define CMSG100 \ "Error! -C option can only be used with -F -Y -U -I -c -u -p -x options." #define CMSG101 " Both -u and -p options must be used together."