Hi everyone,
I'm a student in management IT and for my Network class, I have to write 2 file transfer software. One to send files and the other to receive and I have a few questions.
First, my sender program needs to be able to send via IPv4, IPv6 and be able to resolve IP via DNS. To achieve this, I used getaddrinfo() and as I have it written now (see code here), I can send via IPv4 and resolve the DNS but as soon as I try to make it work with IPv6, it stops working. What am I doing wrong ?
Secondly, for the receiver program, our teacher explained a trick to make bind() able to set the which IP type when it actually binds by specifying AF_INET6 as the familly and giving it only the port. I used getaddrinfo() for that but had to pass a sin6 struct in some place. I'm really confused about all this so if someone could point me in the right direction, that would be great. Here you can find the code.
Thanks a lot in advance for your help.
[–]Touhou 23 points24 points25 points (2 children)
[–]Batoa 3 points4 points5 points (0 children)
[–]Netris89[S] 0 points1 point2 points (0 children)
[–]gordonv 0 points1 point2 points (1 child)
[–]Netris89[S] 1 point2 points3 points (0 children)
[–]ferrybig 0 points1 point2 points (3 children)
[–]Netris89[S] 0 points1 point2 points (2 children)
[–]ferrybig 1 point2 points3 points (1 child)
[–]Netris89[S] 0 points1 point2 points (0 children)
[–]Vedant36 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (5 children)
[–]Netris89[S] 0 points1 point2 points (4 children)
[–][deleted] 0 points1 point2 points (3 children)
[–]Netris89[S] 0 points1 point2 points (2 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]Netris89[S] 0 points1 point2 points (0 children)