Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPv6 support #25

Open
jg1uaa opened this issue Oct 2, 2019 · 9 comments
Open

IPv6 support #25

jg1uaa opened this issue Oct 2, 2019 · 9 comments

Comments

@jg1uaa
Copy link
Contributor

jg1uaa commented Oct 2, 2019

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.

@g4klx
Copy link
Owner

g4klx commented Oct 2, 2019

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.

@jg1uaa
Copy link
Contributor Author

jg1uaa commented Oct 5, 2019

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?

@phl0
Copy link
Collaborator

phl0 commented Oct 6, 2019

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

@jg1uaa
Copy link
Contributor Author

jg1uaa commented Oct 20, 2019

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 .

@phl0
Copy link
Collaborator

phl0 commented Oct 24, 2019

@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 ... :(

@jg1uaa
Copy link
Contributor Author

jg1uaa commented Oct 24, 2019

@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.

@phl0
Copy link
Collaborator

phl0 commented Oct 24, 2019

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..

@jg1uaa
Copy link
Contributor Author

jg1uaa commented Oct 25, 2019

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

@phl0
Copy link
Collaborator

phl0 commented Oct 25, 2019

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants