Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
901072385e | |||
926124dffc | |||
5eb6ddc45b | |||
144eacc0d6 |
15
FAQ
15
FAQ
@ -108,9 +108,10 @@ A: /AK/
|
|||||||
override <фидоадрес> [hidden] [Phone <тлф>] [Ipaddr <dns|ip>] [Flags <флаги>]
|
override <фидоадрес> [hidden] [Phone <тлф>] [Ipaddr <dns|ip>] [Flags <флаги>]
|
||||||
ip-адрес/днс-имя сервера можно подменить как через Ipaddr, так и через
|
ip-адрес/днс-имя сервера можно подменить как через Ipaddr, так и через
|
||||||
флаги, поставив INA:адрес
|
флаги, поставив INA:адрес
|
||||||
|
|
||||||
Пример override:
|
Пример override:
|
||||||
[ÆÌÁÇÉ ÎÏÄÌÉÓÔÁ: CM,IBN,INA:coolbbs.spb.ru,INA:cool2.spb.ru,BEER:lager
|
1) [ÆÌÁÇÉ ÎÏÄÌÉÓÔÁ: CM,IBN,INA:coolbbs.spb.ru,INA:cool2.spb.ru,BEER:lager]
|
||||||
override 2:5030/xxx Phone Unpublished Flags IFC,INA:reservbbs.dyndns.org \
|
override 2:5030/xxx hidden Flags IFC,INA:reservbbs.dyndns.org \
|
||||||
hidden Ipaddr 188.34.34.22 \
|
hidden Ipaddr 188.34.34.22 \
|
||||||
hidden Ipaddr 234.43.44.23 Flags IFC,CM
|
hidden Ipaddr 234.43.44.23 Flags IFC,CM
|
||||||
|
|
||||||
@ -120,6 +121,16 @@ A: /AK/
|
|||||||
3. 188.34.34.22:binkp
|
3. 188.34.34.22:binkp
|
||||||
4. 234.43.44.23:ifcico
|
4. 234.43.44.23:ifcico
|
||||||
5. cool2.spb.ru:binkp
|
5. cool2.spb.ru:binkp
|
||||||
|
|
||||||
|
2) [ÆÌÁÇÉ ÎÏÄÌÉÓÔÁ: CM,IBN,IFC,INA:coolbbs3.spb.ru,BEER:porter]
|
||||||
|
override 2:5030/xxx Phone None Flags IFC,INA:rybak3.dyndns.org \
|
||||||
|
hidden Ipaddr 188.34.35.22
|
||||||
|
|
||||||
|
ðÏÒÑÄÏË ÄÏÚ×ÏÎÁ (ÄÏ ÐÅÒ×ÏÇÏ ÕÓÐÅÛÎÏÇÏ ÕÓÔÁÎÏ×ÌÅÎÉÑ ÓÅÓÓÉÉ):
|
||||||
|
1. rybak3.dyndns.org:ifcico
|
||||||
|
3. 188.34.35.22:ifcico
|
||||||
|
override ÂÅÚ ÏÐÃÉÉ hidden ÚÁÍÅÎÑÅÔ ÎÏÄÌÉÓÔÏ×ÙÅ ÐÏÌÑ!
|
||||||
|
|
||||||
Проверить настроенные override-s и порядок дозвона можно с помощью
|
Проверить настроенные override-s и порядок дозвона можно с помощью
|
||||||
программы nlookup: опция -o показывает override, опция -t - порядок
|
программы nlookup: опция -o показывает override, опция -t - порядок
|
||||||
дозвона (IP+PSTN)
|
дозвона (IP+PSTN)
|
||||||
|
@ -582,7 +582,7 @@ s_nodelist *nodelist_open(const char *dir, char *name, int mode)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
DEB((D_NODELIST, "nodelist_open: endianness = %x", (uint32_t) tmp.endian));
|
||||||
return xmemcpy(&tmp, sizeof(s_nodelist));
|
return xmemcpy(&tmp, sizeof(s_nodelist));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -630,6 +630,7 @@ int nodelist_checkheader(s_nodelist *nlp)
|
|||||||
(long)nlstat.st_size, (long)nlsize);
|
(long)nlstat.st_size, (long)nlsize);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
nlp->endian = buffer_getlong(buffer + 12);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -660,7 +661,7 @@ int nodelist_createheader(s_nodelist *nlp)
|
|||||||
|
|
||||||
buffer_putlong(hdrbuf + 0, nlstat.st_mtime);
|
buffer_putlong(hdrbuf + 0, nlstat.st_mtime);
|
||||||
buffer_putlong(hdrbuf + 4, nlstat.st_size);
|
buffer_putlong(hdrbuf + 4, nlstat.st_size);
|
||||||
|
buffer_putlong(hdrbuf + 12, (long) 0xDEADBEEF);
|
||||||
if( fseek(nlp->fp_index, 0L, SEEK_SET) == -1 )
|
if( fseek(nlp->fp_index, 0L, SEEK_SET) == -1 )
|
||||||
{
|
{
|
||||||
logerr("cannot seek to zero offset of index");
|
logerr("cannot seek to zero offset of index");
|
||||||
@ -717,7 +718,9 @@ int nodelist_putindex(s_nodelist *nlp, const s_bni *bni)
|
|||||||
buffer_putint(buffer + 6, bni->point);
|
buffer_putint(buffer + 6, bni->point);
|
||||||
buffer_putint(buffer + 8, bni->hub);
|
buffer_putint(buffer + 8, bni->hub);
|
||||||
buffer_putlong(buffer + 10, bni->offset);
|
buffer_putlong(buffer + 10, bni->offset);
|
||||||
|
if (bni->point != 0) {
|
||||||
|
DEB((D_NODELIST, "nodelist: findindex found point z: %d, n: %d, l: %d, p: %d, offset: %l", bni->zone, bni->net, bni->node, bni->point, bni->offset));
|
||||||
|
}
|
||||||
if( fwrite(buffer, sizeof(buffer), 1, nlp->fp_index) != 1 )
|
if( fwrite(buffer, sizeof(buffer), 1, nlp->fp_index) != 1 )
|
||||||
{
|
{
|
||||||
logerr("error writing nodelist index file \"%s\"", nlp->name_index);
|
logerr("error writing nodelist index file \"%s\"", nlp->name_index);
|
||||||
@ -752,6 +755,10 @@ int nodelist_findindex(s_nodelist *nlp, s_bni *bni, s_faddr addr)
|
|||||||
bni->point = buffer_getint(p + 6);
|
bni->point = buffer_getint(p + 6);
|
||||||
bni->hub = buffer_getint(p + 8);
|
bni->hub = buffer_getint(p + 8);
|
||||||
bni->offset = buffer_getlong(p + 10);
|
bni->offset = buffer_getlong(p + 10);
|
||||||
|
if ((uint32_t)nlp->endian == 0xBEEFDEAD) {
|
||||||
|
swap_long((char *)&bni->offset);
|
||||||
|
}
|
||||||
|
DEB((D_NODELIST, "nodelist: findindex found" ));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
p += NODELIST_ENTRYSIZE;
|
p += NODELIST_ENTRYSIZE;
|
||||||
@ -856,5 +863,6 @@ void nodelist_initnode(s_node *node, s_faddr addr)
|
|||||||
strcpy(node->sysop, "<none>");
|
strcpy(node->sysop, "<none>");
|
||||||
strcpy(node->location, "<none>");
|
strcpy(node->location, "<none>");
|
||||||
strcpy(node->phone, "<none>");
|
strcpy(node->phone, "<none>");
|
||||||
|
strcpy(node->flags, "<none>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -290,10 +290,10 @@ char *buffer_putint(char *buffer, int val)
|
|||||||
*/
|
*/
|
||||||
long buffer_getlong(const char *buffer)
|
long buffer_getlong(const char *buffer)
|
||||||
{
|
{
|
||||||
return ( (unsigned long) ((unsigned char) buffer[0]) )
|
return (long)( (unsigned long) ((unsigned char) buffer[0]) )
|
||||||
| ( (unsigned long) ((unsigned char) buffer[1]) << 8 )
|
| ( (unsigned long) ((unsigned char) buffer[1]) << 8 )
|
||||||
| ( (unsigned long) ((unsigned char) buffer[2]) << 16 )
|
| ( (unsigned long) ((unsigned char) buffer[2]) << 16 )
|
||||||
| ( (unsigned long) ((unsigned char) buffer[3]) << 24 );
|
| ( (unsigned long) ((unsigned char) buffer[3]) << 24 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
@ -307,8 +307,17 @@ long buffer_getlong(const char *buffer)
|
|||||||
*/
|
*/
|
||||||
int buffer_getint(const char *buffer)
|
int buffer_getint(const char *buffer)
|
||||||
{
|
{
|
||||||
return ( (unsigned int) ((unsigned char) buffer[0]) )
|
return (int)( (unsigned int) ((unsigned char) buffer[0]) )
|
||||||
| ( (unsigned int) ((unsigned char) buffer[1]) << 8 );
|
| ( (unsigned int) ((unsigned char) buffer[1]) << 8 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void swap_long(char *buffer){
|
||||||
|
char *temp = xmemcpy(buffer, sizeof(uint32_t));
|
||||||
|
temp[0] = buffer[2];
|
||||||
|
temp[1] = buffer[3];
|
||||||
|
temp[2] = buffer[0];
|
||||||
|
temp[3] = buffer[1];
|
||||||
|
memcpy(buffer,temp,sizeof(uint32_t));
|
||||||
}
|
}
|
||||||
|
|
||||||
void printf_usage(const char *ident, const char *fmt, ...)
|
void printf_usage(const char *ident, const char *fmt, ...)
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
* 0x0000 4 bytes Nodelist file date
|
* 0x0000 4 bytes Nodelist file date
|
||||||
* 0x0004 4 bytes Nodelist file size
|
* 0x0004 4 bytes Nodelist file size
|
||||||
* 0x0008 4 bytes Total number of entries in index file
|
* 0x0008 4 bytes Total number of entries in index file
|
||||||
* 0x000c 4 bytes Unused
|
* 0x000c 4 bytes ENDIANNES MARK
|
||||||
*
|
*
|
||||||
* Nodelist index is an array of next entries:
|
* Nodelist index is an array of next entries:
|
||||||
*
|
*
|
||||||
@ -123,6 +123,7 @@ typedef struct nodelist
|
|||||||
char name_index[BF_MAXPATH+1];
|
char name_index[BF_MAXPATH+1];
|
||||||
char name_nodelist[BF_MAXPATH+1];
|
char name_nodelist[BF_MAXPATH+1];
|
||||||
long entries;
|
long entries;
|
||||||
|
long endian;
|
||||||
}
|
}
|
||||||
s_nodelist;
|
s_nodelist;
|
||||||
|
|
||||||
|
@ -189,8 +189,10 @@ char *buffer_putlong(char *buffer, long val);
|
|||||||
char *buffer_putint(char *buf, int val);
|
char *buffer_putint(char *buf, int val);
|
||||||
long buffer_getlong(const char *buf);
|
long buffer_getlong(const char *buf);
|
||||||
int buffer_getint(const char *buf);
|
int buffer_getint(const char *buf);
|
||||||
|
void swap_long(char *buffer);
|
||||||
void printf_usage(const char *ident, const char *fmt, ...);
|
void printf_usage(const char *ident, const char *fmt, ...);
|
||||||
|
|
||||||
|
|
||||||
/* u_pkt.c */
|
/* u_pkt.c */
|
||||||
int pkt_createpacket(const char *pktname, const s_packet *pkt);
|
int pkt_createpacket(const char *pktname, const s_packet *pkt);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user