Added experimental support for the ICM flag (FSP-1033)
This commit is contained in:
@@ -1091,13 +1091,20 @@ node *getnlent(faddr *addr)
|
||||
if (addr->domain == NULL)
|
||||
addr->domain = xstrcpy(nodebuf.addr.domain);
|
||||
|
||||
nodebuf.can_pots = (nodebuf.mflags || nodebuf.dflags) ? TRUE : FALSE;
|
||||
nodebuf.can_ip = (nodebuf.iflags) ? TRUE : FALSE;
|
||||
nodebuf.is_cm = (nodebuf.oflags & 0x00000001) ? TRUE : FALSE;
|
||||
nodebuf.is_icm = (nodebuf.oflags & 0x00000002) ? TRUE : FALSE;
|
||||
|
||||
Syslog('n', "getnlent: system %s, %s", nodebuf.name, nodebuf.location);
|
||||
Syslog('n', "getnlent: sysop %s, %s", nodebuf.sysop, nodebuf.phone);
|
||||
Syslog('n', "getnlent: URL %s", printable(nodebuf.url, 0));
|
||||
Syslog('n', "getnlent: online POTS %s CM %s, IP %s ICM %s", nodebuf.can_pots ?"Yes":"No",
|
||||
nodebuf.is_cm ?"Yes":"No", nodebuf.can_ip ?"Yes":"No", nodebuf.is_icm ?"Yes":"No");
|
||||
// moflags(nodebuf.mflags);
|
||||
// diflags(nodebuf.dflags);
|
||||
// ipflags(nodebuf.iflags);
|
||||
olflags(nodebuf.oflags);
|
||||
// olflags(nodebuf.oflags);
|
||||
// rqflags(nodebuf.xflags);
|
||||
free(mydomain);
|
||||
|
||||
@@ -1225,25 +1232,3 @@ void ipflags(unsigned long flags)
|
||||
}
|
||||
|
||||
|
||||
|
||||
unsigned long getCMmask(void)
|
||||
{
|
||||
nodelist_flag **tmpm;
|
||||
static unsigned long mask = 0L;
|
||||
|
||||
for (tmpm = &nl_online; *tmpm; tmpm=&((*tmpm)->next)) {
|
||||
if (strcmp("CM", (*tmpm)->name) == 0) {
|
||||
mask |= (*tmpm)->value;
|
||||
}
|
||||
if (strcmp("ICM", (*tmpm)->name) == 0) {
|
||||
mask |= (*tmpm)->value;
|
||||
}
|
||||
}
|
||||
if (mask)
|
||||
return mask;
|
||||
|
||||
WriteError("CM and ICM mask not found in %s/etc/nodelist.conf", getenv("MBSE_ROOT"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -44,13 +44,13 @@
|
||||
|
||||
|
||||
|
||||
# Online special flags.
|
||||
# Online special flags. CM and ICM must be the first two!
|
||||
#
|
||||
online CM 0x00000001
|
||||
online MO 0x00000002
|
||||
online LO 0x00000004
|
||||
online MN 0x00000008
|
||||
online ICM 0x00000010
|
||||
online ICM 0x00000002
|
||||
online MO 0x00000004
|
||||
online LO 0x00000008
|
||||
online MN 0x00000010
|
||||
|
||||
|
||||
# Request flags, masks:
|
||||
|
@@ -34,6 +34,10 @@ typedef struct _node {
|
||||
int t1; /* T flag, first char */
|
||||
int t2; /* T flag, second char */
|
||||
char *url; /* URL for connection */
|
||||
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 */
|
||||
} node;
|
||||
|
||||
|
||||
@@ -122,7 +126,6 @@ void rqflags(unsigned long);
|
||||
void moflags(unsigned long);
|
||||
void diflags(unsigned long);
|
||||
void ipflags(unsigned long);
|
||||
unsigned long getCMmask(void);
|
||||
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user