2001-12-27 17:33:15 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
2001-08-17 05:46:24 +00:00
|
|
|
#ifndef _NODELIST_H
|
|
|
|
#define _NODELIST_H
|
|
|
|
|
2002-12-28 17:29:06 +00:00
|
|
|
#include "../config.h"
|
|
|
|
|
2004-07-10 11:25:49 +00:00
|
|
|
#define MAXNAME 35
|
|
|
|
#define MAXUFLAGS 16
|
2001-08-17 05:46:24 +00:00
|
|
|
|
2002-12-28 17:29:06 +00:00
|
|
|
|
2001-08-17 05:46:24 +00:00
|
|
|
/*
|
|
|
|
* Nodelist entry
|
|
|
|
*/
|
|
|
|
typedef struct _node {
|
|
|
|
faddr addr; /* Node address */
|
|
|
|
unsigned short upnet; /* Uplink netnumber */
|
|
|
|
unsigned short upnode; /* Uplink nodenumber */
|
|
|
|
unsigned short region; /* Region belongin to */
|
|
|
|
unsigned char type;
|
|
|
|
unsigned char pflag;
|
|
|
|
char *name; /* System name */
|
|
|
|
char *location; /* System location */
|
|
|
|
char *sysop; /* Sysop name */
|
|
|
|
char *phone; /* Phone number */
|
|
|
|
unsigned speed; /* Baudrate */
|
2005-10-11 20:49:41 +00:00
|
|
|
unsigned int mflags; /* Modem flags */
|
|
|
|
unsigned int dflags; /* ISDN flags */
|
|
|
|
unsigned int iflags; /* TCP-IP flags */
|
|
|
|
unsigned int oflags; /* Online flags */
|
|
|
|
unsigned int xflags; /* Request flags */
|
2001-08-17 05:46:24 +00:00
|
|
|
char *uflags[MAXUFLAGS]; /* User flags */
|
2002-12-28 17:29:06 +00:00
|
|
|
int t1; /* T flag, first char */
|
|
|
|
int t2; /* T flag, second char */
|
2002-12-30 22:13:33 +00:00
|
|
|
char *url; /* URL for connection */
|
2004-06-18 19:54:13 +00:00
|
|
|
unsigned is_cm : 1; /* Node is CM */
|
|
|
|
unsigned is_icm : 1; /* Node is ICM */
|
|
|
|
unsigned can_pots : 1; /* Can do POTS or ISDN */
|
|
|
|
unsigned can_ip : 1; /* Can do TCP/IP */
|
2001-08-17 05:46:24 +00:00
|
|
|
} node;
|
|
|
|
|
|
|
|
|
|
|
|
|
2002-12-30 22:13:33 +00:00
|
|
|
/*
|
|
|
|
* Memory array structures read from nodelist.conf
|
|
|
|
*/
|
|
|
|
typedef struct _nodelist_flag {
|
|
|
|
struct _nodelist_flag *next;
|
|
|
|
char *name;
|
2005-10-11 20:49:41 +00:00
|
|
|
unsigned int value;
|
2002-12-30 22:13:33 +00:00
|
|
|
} nodelist_flag;
|
2001-08-17 05:46:24 +00:00
|
|
|
|
|
|
|
|
2002-12-30 22:13:33 +00:00
|
|
|
typedef struct _nodelist_modem {
|
|
|
|
struct _nodelist_modem *next;
|
|
|
|
char *name;
|
2005-10-11 20:49:41 +00:00
|
|
|
unsigned int mask;
|
|
|
|
unsigned int value;
|
2002-12-30 22:13:33 +00:00
|
|
|
} nodelist_modem;
|
2001-08-17 05:46:24 +00:00
|
|
|
|
|
|
|
|
2002-12-30 22:13:33 +00:00
|
|
|
typedef struct _nodelist_array {
|
|
|
|
struct _nodelist_array *next;
|
|
|
|
char *name;
|
|
|
|
} nodelist_array;
|
2001-08-17 05:46:24 +00:00
|
|
|
|
|
|
|
|
2002-12-30 22:13:33 +00:00
|
|
|
typedef struct _nodelist_domsuf {
|
|
|
|
struct _nodelist_domsuf *next;
|
|
|
|
unsigned short zone;
|
|
|
|
char *name;
|
|
|
|
} nodelist_domsuf;
|
2001-08-17 05:46:24 +00:00
|
|
|
|
|
|
|
|
2002-12-30 22:13:33 +00:00
|
|
|
typedef struct _nodelist_service {
|
|
|
|
struct _nodelist_service *next;
|
|
|
|
char *flag;
|
|
|
|
char *service;
|
2005-10-11 20:49:41 +00:00
|
|
|
unsigned int defport; /* Configured default port */
|
|
|
|
unsigned int tmpport; /* Override port for call */
|
2002-12-30 22:13:33 +00:00
|
|
|
} nodelist_service;
|
2001-08-17 05:46:24 +00:00
|
|
|
|
|
|
|
|
|
|
|
extern struct _nodelist {
|
|
|
|
char *domain;
|
|
|
|
FILE *fp;
|
|
|
|
} *nodevector;
|
|
|
|
|
|
|
|
|
|
|
|
struct _ixentry {
|
|
|
|
unsigned short zone;
|
|
|
|
unsigned short net;
|
|
|
|
unsigned short node;
|
|
|
|
unsigned short point;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
extern struct _pkey {
|
|
|
|
char *key;
|
|
|
|
unsigned char type;
|
|
|
|
unsigned char pflag;
|
|
|
|
} pkey[];
|
|
|
|
|
|
|
|
|
2002-12-28 17:29:06 +00:00
|
|
|
|
2002-12-30 22:13:33 +00:00
|
|
|
nodelist_flag *nl_online;
|
|
|
|
nodelist_flag *nl_request;
|
|
|
|
nodelist_flag *nl_reqbits;
|
|
|
|
nodelist_modem *nl_pots;
|
|
|
|
nodelist_modem *nl_isdn;
|
|
|
|
nodelist_modem *nl_tcpip;
|
|
|
|
nodelist_array *nl_search;
|
|
|
|
nodelist_array *nl_dialer;
|
2004-07-11 11:49:51 +00:00
|
|
|
nodelist_array *nl_ipprefix;
|
2002-12-30 22:13:33 +00:00
|
|
|
nodelist_domsuf *nl_domsuffix;
|
|
|
|
nodelist_service *nl_service;
|
|
|
|
|
|
|
|
|
2002-12-28 17:29:06 +00:00
|
|
|
/*
|
|
|
|
* From nodelist.c
|
|
|
|
*/
|
2001-08-17 05:46:24 +00:00
|
|
|
int initnl(void);
|
2002-12-30 22:13:33 +00:00
|
|
|
void deinitnl(void);
|
2001-08-17 05:46:24 +00:00
|
|
|
node *getnlent(faddr *);
|
2005-10-11 20:49:41 +00:00
|
|
|
void olflags(unsigned int);
|
|
|
|
void rqflags(unsigned int);
|
|
|
|
void moflags(unsigned int);
|
|
|
|
void diflags(unsigned int);
|
|
|
|
void ipflags(unsigned int);
|
2001-08-17 05:46:24 +00:00
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|