parent
0c6c86b1b5
commit
f8b0accafb
@ -1,79 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2016 by Jonathan Naylor G4KLX
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include "Hosts.h"
|
||||
#include "Log.h"
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <cctype>
|
||||
|
||||
CHosts::CHosts(const std::string& filename) :
|
||||
m_filename(filename),
|
||||
m_hosts()
|
||||
{
|
||||
}
|
||||
|
||||
CHosts::~CHosts()
|
||||
{
|
||||
}
|
||||
|
||||
bool CHosts::read()
|
||||
{
|
||||
FILE* fp = ::fopen(m_filename.c_str(), "rt");
|
||||
if (fp == NULL) {
|
||||
LogWarning("Cannot open the YSF Hosts file - %s", m_filename.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
char buffer[100U];
|
||||
while (::fgets(buffer, 100U, fp) != NULL) {
|
||||
if (buffer[0U] == '#')
|
||||
continue;
|
||||
|
||||
char* p1 = ::strtok(buffer, " \t\r\n");
|
||||
char* p2 = ::strtok(NULL, " \t\r\n");
|
||||
|
||||
if (p1 != NULL && p2 != NULL) {
|
||||
std::string address = std::string(p1);
|
||||
unsigned int port = (unsigned int)::atoi(p2);
|
||||
|
||||
CYSFHost* host = new CYSFHost;
|
||||
host->m_address = address;
|
||||
host->m_port = port;
|
||||
|
||||
m_hosts.push_back(host);
|
||||
}
|
||||
}
|
||||
|
||||
::fclose(fp);
|
||||
|
||||
size_t size = m_hosts.size();
|
||||
if (size == 0U)
|
||||
return false;
|
||||
|
||||
LogInfo("Loaded %u YSF reflectors", size);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
std::vector<CYSFHost*>& CHosts::list()
|
||||
{
|
||||
return m_hosts;
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2016 by Jonathan Naylor G4KLX
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef Hosts_H
|
||||
#define Hosts_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class CYSFHost {
|
||||
public:
|
||||
std::string m_address;
|
||||
unsigned int m_port;
|
||||
};
|
||||
|
||||
class CHosts {
|
||||
public:
|
||||
CHosts(const std::string& filename);
|
||||
~CHosts();
|
||||
|
||||
bool read();
|
||||
|
||||
std::vector<CYSFHost*>& list();
|
||||
|
||||
private:
|
||||
std::string m_filename;
|
||||
std::vector<CYSFHost*> m_hosts;
|
||||
};
|
||||
|
||||
#endif
|
@ -1,170 +1,40 @@
|
||||
#
|
||||
# These are the allowed hosts for this node
|
||||
#
|
||||
# The format is <address/name> <port>
|
||||
#
|
||||
# To get your own YSFReflector into this list,
|
||||
# please register it at:
|
||||
# https://register.ysfreflector.de
|
||||
#
|
||||
# It is also possible to export this file by
|
||||
# yourself via wget, curl or something else:
|
||||
# https://register.ysfreflector.de/export.php
|
||||
#
|
||||
|
||||
# Alabama Link / Alabama Link
|
||||
ysf.c4fm.se 42000
|
||||
|
||||
# Arizona USA / MARA C4FM
|
||||
199.66.168.97 42000
|
||||
|
||||
# AU AUYSF001 / 1st World YSFR
|
||||
64.137.181.152 42000
|
||||
|
||||
# AU FUSION2 / AU Reflector2
|
||||
aufusion2.ysfreflector.net 42000
|
||||
|
||||
# BM TG-2148 / BM TG-2148
|
||||
c4fm.ea3hkb.com 42108
|
||||
|
||||
# CA YSF005 / QC Fusion
|
||||
ysf.ve2mrc.com 42000
|
||||
|
||||
# CT WIRESCAT / C4FM Catalunya
|
||||
c4fm.ea3hkb.com 42000
|
||||
|
||||
# CZ Czech / TG2300 DCS019V
|
||||
80.250.3.114 42000
|
||||
|
||||
# DE Germany / TG26208
|
||||
c4fm.ysfreflector.de 42000
|
||||
|
||||
# DE Germany2 / no bridge
|
||||
c4fm.ysfreflector.de 42001
|
||||
|
||||
# DK Denmark / YSF012 C4FM Re
|
||||
oz2ree.dk 42000
|
||||
|
||||
# ES YSF004 EDT / C4FM Reflector
|
||||
c4fm.sustrai.org 42000
|
||||
|
||||
# ES YSF906 / ED7ZAK
|
||||
xrf906.radioclubveleta.es 42000
|
||||
|
||||
# FON-Gateway / AllModes-GW
|
||||
ysf-fon.f1tzo.com 42000
|
||||
|
||||
# FR YSF-France / Fusion France
|
||||
m55.evxonline.net 42000
|
||||
|
||||
# FUSION-ITALY / Italy YSFR
|
||||
c4fm-it.selfip.com 42000
|
||||
|
||||
# FUSIONBE2 / FusionBelgium
|
||||
ysf.on4top.be 42000
|
||||
|
||||
# GB Fusion Kernow / Fusion SW UK
|
||||
mb6cc.dyndns.org 43000
|
||||
|
||||
# GB Scotland / Scottish YSF
|
||||
c4fm.gb7de.co.uk 42000
|
||||
|
||||
# GR YSF202 / Fusion Greece
|
||||
ysf202.dv4gr.eu 42000
|
||||
|
||||
# IT Roma / Roma YSF Ref
|
||||
romaroom.ddns.net 42000
|
||||
|
||||
# IT YRF003 CISAR / www.cisar.it
|
||||
xrf003.iw0red.it 42000
|
||||
|
||||
# IT YSF027 / Zone_1_Italy
|
||||
194.116.29.78 42000
|
||||
|
||||
# NETDA / FusioNET
|
||||
ysf423.netda.us 42000
|
||||
|
||||
# NL Central / CENTRAL NL
|
||||
c4fm.pa7lim.nl 42000
|
||||
|
||||
# NL YSF444 / Dutch Refl.
|
||||
ysf444.pa3dfn.nl 42000
|
||||
|
||||
# PA Panama Link / Enlace Panama
|
||||
69.164.201.29 42000
|
||||
|
||||
# PL POLAND / DMR 260042
|
||||
ysf260.ham-dmr.pl 42026
|
||||
|
||||
# PL YSF016 / SR8UWD Wlodawa
|
||||
ysf016.wiresx.pl 42000
|
||||
|
||||
# PL YSF088 / Bedzin
|
||||
83.142.218.188 42088
|
||||
|
||||
# Poland 21 / DMR TG260021
|
||||
ysf021.ham-dmr.pl 42021
|
||||
|
||||
# Poland 22 / DMR TG260022
|
||||
ysf022.ham-dmr.pl 42022
|
||||
|
||||
# PT YSF009 / C4FM-Portugal
|
||||
c4fm.from-ct.com 42000
|
||||
|
||||
# RO YSF226 / C4FM Romania
|
||||
xrf226.hamnet.ro 42000
|
||||
|
||||
# SE YSF699 / Tekniksnack
|
||||
ysf.tekniksnack.se 42000
|
||||
|
||||
# SK OMO0OUE / Slovakia
|
||||
88.212.32.147 42000
|
||||
|
||||
# SP EmCom / EmCom TG260023
|
||||
ysf023.ham-dmr.pl 42023
|
||||
|
||||
# TechTalk24 / Engineers talk
|
||||
ysf024.ham-dmr.pl 42024
|
||||
|
||||
# TH nakhonthai / C4FM
|
||||
office.nakhonthai.net 42000
|
||||
|
||||
# UK DVMEGA / DVMEGA CHAT
|
||||
c4fm.pa7lim.nl 42001
|
||||
|
||||
# UK_YSF_BM_UK / UK_Ref_DN_ONLY
|
||||
bm-dmr.uk 42000
|
||||
|
||||
# US EPA Exp / WB0YLE Test
|
||||
www.wb0yle.com 42000
|
||||
|
||||
# US ILLINOIS / IL REFLECTOR
|
||||
ilysf.ddns.net 42000
|
||||
|
||||
# US Michigan-MI5 / Michigan MI5
|
||||
c4fm-mi5.kb8zgl.net 42000
|
||||
|
||||
# US Nationwide / United States
|
||||
174.36.222.36 42000
|
||||
|
||||
# US NJ PA Asteris / Link to BM 313
|
||||
ysf.njpaasterisk.org 42000
|
||||
|
||||
# US WMTG / WMTG Fusion
|
||||
ysf.wmtg.me 42000
|
||||
|
||||
# US YSF008 USA / DVSwitch Test
|
||||
ysfreflector.dvswitch.org 42000
|
||||
|
||||
# US-YSF587MiFL / YSF-QNetBridge
|
||||
ysfqbridge.noip.us 42000
|
||||
|
||||
# YSF006 NORWAY / 24299+XLX404D
|
||||
ysf.hamlabs.no 42000
|
||||
|
||||
# YSF017 / YSFLatino TG-9
|
||||
ysf-latino.ddns.net 42000
|
||||
|
||||
# ZZ Parrot / Parrot
|
||||
127.0.0.1 42000
|
||||
|
||||
Alabama Link;Alabama Link;ysf.c4fm.se;42000;000
|
||||
AU AUYSF001;1st World YSFR;64.137.181.152;42000;000
|
||||
AU FUSION2;AU Reflector2;aufusion2.ysfreflector.net;42000;000
|
||||
CA YSF005;QC Fusion;ysf.ve2mrc.com;42000;000
|
||||
CT WIRESCAT;C4FM Catalunya;c4fm.ea3hkb.com;42000;000
|
||||
CZ Czech;TG2300 DCS019V;80.250.3.114;42000;000
|
||||
DE Germany;TG26208;c4fm.ysfreflector.de;42000;000
|
||||
DE Germany2;no bridge;c4fm.ysfreflector.de;42001;000
|
||||
1;ES YSF004 EDT;C4FM Reflector;c4fm.sustrai.org;42000;000
|
||||
2;FON-Gateway;AllModes-GW;ysf-fon.f1tzo.com;42000;000
|
||||
3;FR YSF-France;Fusion France;m55.evxonline.net;42000;000
|
||||
4;FUSION-ITALY;Italy YSFR;c4fm-it.selfip.com;42000;000
|
||||
5;FUSIONBE2;FusionBelgium;ysf.on4top.be;42000;000
|
||||
6;GB Fusion Kernow;Fusion SW UK;mb6cc.dyndns.org;43000;000
|
||||
7;GR YSF202;Fusion Greece;ysf202.dv4gr.eu;42000;000
|
||||
8;IT Roma;Roma YSF Ref;romaroom.ddns.net;42000;000
|
||||
9;IT YRF003 CISAR;www.cisar.it;xrf003.iw0red.it;42000;000
|
||||
10;NL Central;CENTRAL NL;c4fm.pa7lim.nl;42000;000
|
||||
11;NL YSF444;Dutch Refl.;ysf444.pa3dfn.nl;42000;000
|
||||
12;PL POLAND;DMR TG260;ysf260.ham-dmr.pl;42026;000
|
||||
13;PL YSF016;SR8UWD Wlodawa;ysf016.wiresx.pl;42000;000
|
||||
14;Poland 21;DMR TG260021;ysf021.ham-dmr.pl;42021;000
|
||||
15;Poland 22;DMR TG260022;ysf022.ham-dmr.pl;42022;000
|
||||
16;PT YSF009;C4FM-Portugal;c4fm.from-ct.com;42000;000
|
||||
17;RO YSF226;C4FM Romania;xrf226.hamnet.ro;42000;000
|
||||
18;SE YSF699;Tekniksnack;ysf.tekniksnack.se;42000;000
|
||||
19;SP EmCom;EmCom TG260023;ysf023.ham-dmr.pl;42023;000
|
||||
20;TechTalk24;Engineers talk;ysf024.ham-dmr.pl;42024;000
|
||||
21;UK DVMEGA;DVMEGA CHAT;c4fm.pa7lim.nl;42001;000
|
||||
22;UK Scotland;Scottish YSF;c4fm.gb7de.co.uk;42000;000
|
||||
23;UK_YSF_BM_UK;UK_Ref_DN_ONLY;bm-dmr.uk;42000;000
|
||||
24;US Nationwide;United States;174.36.222.36;42000;000
|
||||
25;US NJ PA Asteris;Link to BM 313;ysf.njpaasterisk.org;42000;000
|
||||
26;US WMTG;WMTG Fusion;ysf.wmtg.me;42000;000
|
||||
27;US YSF008 USA;DVSwitch Test;ysfreflector.dvswitch.org;42000;000
|
||||
28;US-YSF587MiFL;YSF-QNetBridge;ysfqbridge.noip.us;42000;000
|
||||
29;YSF004 MI5 SW2;Crossconnect t;c4fm-mi5.kb8zgl.net;42000;000
|
||||
30;YSF006 NORWAY;24299+XLX404D;ysf.hamlabs.no;42000;000
|
||||
31;YSF017;YSFLatino TG-9;ysf-latino.ddns.net;42000;000
|
||||
99;ZZ Parrot;Parrot;127.0.0.1;42000;000
|
||||
|
Loading…
Reference in new issue