DAPNETGateway icon indicating copy to clipboard operation
DAPNETGateway copied to clipboard

IPv6 support

Open jg1uaa opened this issue 5 years ago • 9 comments

Hello,

Current code is strongly dependent on sockaddr_in and limited to IPv4 support. I am trying to rewrite with sockaddr_storage to add IPv6 support. There is a modified code at https://github.com/jg1uaa/DAPNETGateway and tested with MMDVM-POCSAG emulator http://www.uaa.org.uk/gomitext/2019/20190923/fakemmdvmhost-pocsag.c At least they looks working on Linux/OpenBSD (Windows and MacOS not tested), I hope they will be a hint to future expansion of DAPNETGateway/MMDVMHost.

jg1uaa avatar Oct 02 '19 09:10 jg1uaa

I like it! I haven't spent much time looking at IPv6, my fault. If it's that simple then it needs to be rolled out into the whole suite of MMDVM programs for future proofing. You're code looks good.

g4klx avatar Oct 02 '19 15:10 g4klx

Changed some lines for Windows/VisualStudio 2019. No problem for compiling but not tested yet.

Current code does not have IPv4<-->IPv6 fallback. Do we have to implement this function? At least there is no need to with using IP address directly like XLX/BrandMeister.

If there is no problem, I want to issue pull-request. But is there any development (experimental) branch?

jg1uaa avatar Oct 05 '19 07:10 jg1uaa

I have added an "IPv6" branch for testing purposes.

phl0 avatar Oct 06 '19 15:10 phl0

Now I issuing pull request to IPv6 branch. I uploaded MMDVM-POCSAG emulator to https://github.com/jg1uaa/fakemmdvmhost-pocsag and IPv6 capable XLX reflector to https://github.com/jg1uaa/xlxd .

jg1uaa avatar Oct 20 '19 08:10 jg1uaa

@jg1uaa I did compile the IPv6 branch successfully but get a TCP error 97 when trying to use an IPv6 address in DAPNETGateway.ini. Is there any format we need to have in the .ini? Using a domain name yields the same result ... :(

phl0 avatar Oct 24 '19 21:10 phl0

@phl0 this is my DAPNETGateway.ini

[General]
Callsign=jg1uaa
#WhiteList=12345,78901
#BlackList=
#BlacklistRegexfile=/tmp/blregexes.txt
#WhitelistRegexfile=/tmp/wlregexes.txt
RptAddress=::1
RptPort=3800
LocalAddress=::1
LocalPort=4800
Daemon=0

[Log]
# Logging levels, 0=No logging
DisplayLevel=1
FileLevel=1
FilePath=.
FileRoot=DAPNETGateway

[DAPNET]
Address=dapnet.afu.rwth-aachen.de
Port=43434
AuthKey=************
Debug=0

dapnet.afu.rwth-aachen.de has IPv4 address only. If you use other (IPv6-capable) server, please tell me.

jg1uaa avatar Oct 24 '19 22:10 jg1uaa

Jepp, I have an own instance of DAPNET running on my own server. That is IPv6 capable and the core process listens on IPv6 socket. I did try with that host. Let me know if I should give you access to that and how I can supply you with credentials..

phl0 avatar Oct 24 '19 22:10 phl0

@phl0 oh, it is bug of TCPSocket.cpp. It always creates IPv4 socket... I uploaded fixed code to my repo, please test this code https://github.com/jg1uaa/DAPNETGateway/commit/8af07c39077b233711560e2e1800b4805addf023 If there is no problem I will issue pull request.

jg1uaa avatar Oct 25 '19 12:10 jg1uaa

@jg1uaa roger that. Just tested successfully. Go ahead an PR that. My DAPNETGateway is noch connected to my test instance using IPv6:

Bildschirmfoto vom 2019-10-25 15-47-16

phl0 avatar Oct 25 '19 13:10 phl0