5359edc160de518d8e43fdd3448365c15b912c3c galt Mon Jul 22 11:48:10 2019 -0700 Added ipv6 support. Listening processes us hybrid dual stack feature of OS to simplify implementation and use a single listening socket. Works with both TCP and UDP. Parasol working. geoIp also updated and ready for IPv6. Should be invisible to most users, while providing connections via ipv6 where available. Supports both ipv4 and ipv6. diff --git src/parasol/paraHub/paraHub.h src/parasol/paraHub/paraHub.h index 2d01ba4..7db8ff8 100644 --- src/parasol/paraHub/paraHub.h +++ src/parasol/paraHub/paraHub.h @@ -36,31 +36,31 @@ }; struct machine /* A machine for running jobs on. */ { struct machine *next; /* Next in master list. */ struct dlNode *node; /* List node of machine. */ char *name; /* Name. Not alloced here. */ struct dlList *jobs; /* List of current jobs. */ int errCount; /* Number of errors. */ int goodCount; /* Number of good runs. */ time_t lastChecked; /* Last time we checked machine in seconds past 1972 */ boolean isDead; /* True if machine dead. */ char *tempDir; /* Name of local temp dir. */ struct slInt *deadJobIds; /* List of job Ids that machine was running when it died. */ - bits32 ip; /* IP address in host order. */ + char ipStr[NI_MAXHOST]; /* IP address as a string. */ struct machSpec *machSpec; /* Machine spec of resources */ struct slRef *plannedBatches; /* List of planned batches. */ }; struct batch /* A batch of jobs from a user. */ { struct batch *next; /* Next in master list. */ struct dlNode *node; /* Node in active/done list. */ char *name; /* Batch name. Not allocated here. */ struct user *user; /* User this is associated with. */ struct dlList *jobQueue; /* List of jobs not running */ int runningCount; /* Number of jobs running */ int queuedCount; /* Number of jobs queued */ int doneCount; /* Number of jobs done */ @@ -144,25 +144,24 @@ void hubMessagePut(struct paraMessage *pm); /* Add message to central queue. Message must be dynamically allocated. */ void hubMessageQueueInit(); /* Setup stuff for hub message queue. Must be called once * at the beginning before spawning threads. */ void sockSuckStart(struct rudp *ru); /* Start socket sucker deamon. */ extern char *hubHost; /* Name of machine running this. */ extern char hubHAddress[32]; /* Host address of machine running this. Not IP address. * Just for use between hub daemon and spokes*/ extern struct cidr *hubSubnet; /* Subnet to check. */ -extern struct cidr *localHostSubnet; /* Subnet to check for localHost. */ void logIt(char *format, ...); /* Print message to log file. */ #define uglyLog logIt #define MINUTE 60 #endif /* PARAHUB_H */