< 1543105791 652708 :Phantom_Hoover!~phantomho@unaffiliated/phantom-hoover QUIT :Read error: Connection reset by peer < 1543106175 465107 :imode!~imode@unaffiliated/imode JOIN :#esoteric < 1543108350 845218 :Sgeo!~Sgeo@ool-18b98dd9.dyn.optonline.net JOIN :#esoteric < 1543108546 840115 :Sgeo_!~Sgeo@ool-18b98dd9.dyn.optonline.net QUIT :Ping timeout: 268 seconds < 1543108736 248491 :imode!~imode@unaffiliated/imode QUIT :Quit: WeeChat 2.3 < 1543109011 406618 :zzo38!~zzo38@24-207-47-161.eastlink.ca PRIVMSG #esoteric :How in C do I make a DNS lookup in order to compare the result with the result if a inet_aton() call? < 1543109021 869879 :zzo38!~zzo38@24-207-47-161.eastlink.ca PRIVMSG #esoteric :s/result if a/result of a/ < 1543111780 461922 :Essadon!~Essadon@81-225-32-185-no249.tbcn.telia.com QUIT :Quit: Qutting < 1543111797 842499 :arseniiv!~arseniiv@77.79.181.62.dynamic.ufanet.ru QUIT :Ping timeout: 252 seconds < 1543113208 923150 :b_jonas!~x@catv-176-63-24-73.catv.broadband.hu QUIT :Quit: Lost terminal < 1543116737 876520 :pikhq!~pikhq@c-73-181-126-9.hsd1.co.comcast.net PRIVMSG #esoteric :zzo38: Wouldn't you use gethostbyaddr? < 1543116769 239073 :pikhq!~pikhq@c-73-181-126-9.hsd1.co.comcast.net PRIVMSG #esoteric :Or, really, to be reasonably modern and not-obsolescent, getaddrinfo < 1543116834 647483 :zzo38!~zzo38@24-207-47-161.eastlink.ca PRIVMSG #esoteric :I am not trying to perform a reverse DNS lookup (since the reverse DNS might not match the name that the server wants to use anyways) < 1543116923 879122 :pikhq!~pikhq@c-73-181-126-9.hsd1.co.comcast.net PRIVMSG #esoteric :Yeah, sorry, gethostbyname, but getaddrinfo < 1543116939 318951 :zzo38!~zzo38@24-207-47-161.eastlink.ca PRIVMSG #esoteric :Also the type does not seem to match? < 1543117043 888579 :pikhq!~pikhq@c-73-181-126-9.hsd1.co.comcast.net PRIVMSG #esoteric :The struct sockaddr type is a generic type -- you're intended to look at ai_family to know which type to cast the pointer to. < 1543117126 825092 :zzo38!~zzo38@24-207-47-161.eastlink.ca PRIVMSG #esoteric :If it is compared the length sizeof(struct in_addr) will that work then? < 1543117131 35414 :pikhq!~pikhq@c-73-181-126-9.hsd1.co.comcast.net PRIVMSG #esoteric :No. < 1543117178 535782 :pikhq!~pikhq@c-73-181-126-9.hsd1.co.comcast.net PRIVMSG #esoteric :struct sockaddr_in, the type for an IPv4 address-and-port, contains a struct in_addr. < 1543117190 780380 :pikhq!~pikhq@c-73-181-126-9.hsd1.co.comcast.net PRIVMSG #esoteric :https://beej.us/guide/bgnet/html/multi/sockaddr_inman.html is a halfway decent explanation < 1543117210 524562 :zzo38!~zzo38@24-207-47-161.eastlink.ca PRIVMSG #esoteric :O, OK. < 1543117284 179940 :zzo38!~zzo38@24-207-47-161.eastlink.ca PRIVMSG #esoteric :Currently this program is only IPv4, although later I can fix it so that if the REMOTE_HOST environment variable specifies a IPv6 address then the DNS lookup will use IPv6 instead. < 1543117298 786213 :lifthrasiir!~lifthrasi@ec2-52-79-98-81.ap-northeast-2.compute.amazonaws.com QUIT :Remote host closed the connection < 1543117367 957013 :pikhq!~pikhq@c-73-181-126-9.hsd1.co.comcast.net PRIVMSG #esoteric :You'd probably have an easier time just trying to rewrite it to work entirely with getaddrinfo, since getaddrinfo handles it a bit more comprehensively and correctly than you're likely to yourself. < 1543117375 863814 :lifthrasiir!~lifthrasi@ec2-52-79-98-81.ap-northeast-2.compute.amazonaws.com JOIN :#esoteric < 1543117477 749380 :zzo38!~zzo38@24-207-47-161.eastlink.ca PRIVMSG #esoteric :OK, but can the address be compared properly by use of getaddrinfo? The address to compare it to is the contents of the REMOTE_HOST environment variable (set by xinetd, and contains a numeric dotted quad address) < 1543117572 587118 :pikhq!~pikhq@c-73-181-126-9.hsd1.co.comcast.net PRIVMSG #esoteric :Well, you can get the struct in_addr or struct in6_addr out of the getaddrinfo results just fine. < 1543117659 811350 :zzo38!~zzo38@24-207-47-161.eastlink.ca PRIVMSG #esoteric :Yes, and then can do the comparison with that, will work I suppose, since it is only the IP address which needs to be compared. < 1543117807 840971 :zzo38!~zzo38@24-207-47-161.eastlink.ca PRIVMSG #esoteric :Also getaddrinfo can return multiple addresses, and won't that waste memory? < 1543117828 631630 :pikhq!~pikhq@c-73-181-126-9.hsd1.co.comcast.net PRIVMSG #esoteric :It does briefly -- this is why freeaddrinfo exists. < 1543117848 851352 :pikhq!~pikhq@c-73-181-126-9.hsd1.co.comcast.net PRIVMSG #esoteric :freeaddrinfo will free *all* of the allocated memory. < 1543117910 670912 :zzo38!~zzo38@24-207-47-161.eastlink.ca PRIVMSG #esoteric :What is the limit to how much memory it can use? < 1543118282 718081 :pikhq!~pikhq@c-73-181-126-9.hsd1.co.comcast.net PRIVMSG #esoteric :The API as stated does not impose any real limits. However, because it makes a DNS query over UDP in practice, that imposes a limit of at most 48 struct addrinfos being allocated. < 1543118314 463235 :pikhq!~pikhq@c-73-181-126-9.hsd1.co.comcast.net PRIVMSG #esoteric :(and the actual memory usage is a function of the number of A and AAAA records for the queried host) < 1543118727 197128 :Sgeo!~Sgeo@ool-18b98dd9.dyn.optonline.net QUIT :Read error: Connection reset by peer < 1543118965 326530 :Sgeo!~Sgeo@ool-18b98dd9.dyn.optonline.net JOIN :#esoteric < 1543119337 887063 :zzo38!~zzo38@24-207-47-161.eastlink.ca PRIVMSG #esoteric :It seem it can be a problem if it can be caused to waste too much memory < 1543119693 869540 :zzo38!~zzo38@24-207-47-161.eastlink.ca PRIVMSG #esoteric :I found a report of a security problem with these DNS resolving functions, although it seems to be applicable only to AAAA records. I do not have IPv6, so presumably it is OK < 1543122226 269425 :imode!~imode@unaffiliated/imode JOIN :#esoteric < 1543124803 511861 :Lord_of_Life!~Lord@unaffiliated/lord-of-life/x-0885362 QUIT :Ping timeout: 245 seconds < 1543124961 759268 :Lord_of_Life!~Lord@77.28.216.78 JOIN :#esoteric < 1543124961 996617 :Lord_of_Life!~Lord@77.28.216.78 QUIT :Changing host < 1543124961 996716 :Lord_of_Life!~Lord@unaffiliated/lord-of-life/x-0885362 JOIN :#esoteric < 1543127379 284367 :xkapastel!uid17782@gateway/web/irccloud.com/x-jvewwslirelbzokt QUIT :Quit: Connection closed for inactivity < 1543127849 198476 :zzo38!~zzo38@24-207-47-161.eastlink.ca PRIVMSG #esoteric :OK I think I implemented it now (with getaddrinfo), now I can try to test < 1543128118 220293 :zzo38!~zzo38@24-207-47-161.eastlink.ca PRIVMSG #esoteric :Yes, it look like it is work < 1543130478 719834 :atslash!~atslash@static.231.107.9.5.clients.your-server.de JOIN :#esoteric < 1543131903 251520 :imode!~imode@unaffiliated/imode QUIT :Ping timeout: 245 seconds < 1543133922 971562 :oerjan!oerjan@hagbart.nvg.ntnu.no JOIN :#esoteric < 1543137762 408104 :hexfive!~hexfive@50-46-223-124.evrt.wa.frontiernet.net JOIN :#esoteric < 1543143475 863956 :oerjan!oerjan@hagbart.nvg.ntnu.no QUIT :Quit: Later < 1543144313 727642 :AnotherTest!~turingcom@ptr-82l26zf5tit6s260cpd.18120a2.ip6.access.telenet.be JOIN :#esoteric < 1543147347 353717 :Melvar!~melvar@dslb-002-203-016-108.002.203.pools.vodafone-ip.de QUIT :Ping timeout: 240 seconds < 1543148110 394064 :Melvar!~melvar@dslb-002-203-049-190.002.203.pools.vodafone-ip.de JOIN :#esoteric > 1543148875 654785 PRIVMSG #esoteric :14[[07Alchemist14]]4 N10 02https://esolangs.org/w/index.php?oldid=58500 5* 03BMO 5* (+3626) 10Created page with "{{infobox proglang |name=6 |paradigms=[[:Category:Nondeterministic|non-deterministic]] |author=[https://esolangs.org/wiki/User:BMO BMO] |year=[[:Category:2018|2018]] |typesy..." > 1543149158 203853 PRIVMSG #esoteric :14[[07User:BMO14]]4 10 02https://esolangs.org/w/index.php?diff=58501&oldid=57097 5* 03BMO 5* (+141) 10 > 1543151058 451792 PRIVMSG #esoteric :14[[07Alchemist14]]4 10 02https://esolangs.org/w/index.php?diff=58502&oldid=58500 5* 03BMO 5* (+298) 10 < 1543151294 883917 :Phantom_Hoover!~phantomho@unaffiliated/phantom-hoover JOIN :#esoteric < 1543151356 225824 :paul2520!~paul2520@unaffiliated/paul2520 QUIT :Ping timeout: 246 seconds < 1543151418 483962 :paul2520!~paul2520@unaffiliated/paul2520 JOIN :#esoteric < 1543152270 427613 :paul2520!~paul2520@unaffiliated/paul2520 QUIT :Ping timeout: 250 seconds < 1543153597 387583 :xkapastel!uid17782@gateway/web/irccloud.com/x-wgnoglqnilsjcyxo JOIN :#esoteric < 1543153882 766965 :paul2520!~paul2520@paulkaefer.com JOIN :#esoteric < 1543153882 856156 :paul2520!~paul2520@paulkaefer.com QUIT :Changing host < 1543153882 856198 :paul2520!~paul2520@unaffiliated/paul2520 JOIN :#esoteric < 1543154023 747089 :Essadon!~Essadon@81-225-32-185-no249.tbcn.telia.com JOIN :#esoteric < 1543155225 859294 :Phantom_Hoover!~phantomho@unaffiliated/phantom-hoover QUIT :Ping timeout: 252 seconds < 1543155385 582506 :hexfive!~hexfive@50-46-223-124.evrt.wa.frontiernet.net QUIT :Quit: WeeChat 2.2 < 1543155413 864480 :Phantom_Hoover!~phantomho@unaffiliated/phantom-hoover JOIN :#esoteric < 1543158841 255658 :arseniiv!~arseniiv@77.79.181.62.dynamic.ufanet.ru JOIN :#esoteric < 1543159251 838041 :Phantom_Hoover!~phantomho@unaffiliated/phantom-hoover QUIT :Ping timeout: 252 seconds > 1543160445 398482 PRIVMSG #esoteric :14[[07Alchemist14]]4 10 02https://esolangs.org/w/index.php?diff=58503&oldid=58502 5* 03BMO 5* (+6) 10 < 1543161312 840666 :Phantom_Hoover!~phantomho@unaffiliated/phantom-hoover JOIN :#esoteric < 1543165127 410705 :Sgeo!~Sgeo@ool-18b98dd9.dyn.optonline.net QUIT :Ping timeout: 240 seconds < 1543165235 434110 :Sgeo!~Sgeo@ool-18b98dd9.dyn.optonline.net JOIN :#esoteric < 1543167579 680769 :b_jonas!~x@catv-176-63-24-115.catv.broadband.hu JOIN :#esoteric < 1543167604 590577 :b_jonas!~x@catv-176-63-24-115.catv.broadband.hu PRIVMSG #esoteric :zzo38: I may be misunderstanding this, but I think getaddrinfo allocates a linked list, and you can use freeaddrinfo to free any tail of that list < 1543167655 398303 :imode!~imode@unaffiliated/imode JOIN :#esoteric < 1543167834 413481 :b_jonas!~x@catv-176-63-24-115.catv.broadband.hu PRIVMSG #esoteric :zzo38: but sure, there are other DNS query libraries out there if that's what you want < 1543167840 328417 :b_jonas!~x@catv-176-63-24-115.catv.broadband.hu PRIVMSG #esoteric :ones that behave very different from libc < 1543167962 417754 :Lord_of_Life_!~Lord@46.217.124.224 JOIN :#esoteric < 1543168186 840255 :Lord_of_Life!~Lord@unaffiliated/lord-of-life/x-0885362 QUIT :Ping timeout: 272 seconds < 1543168187 265018 :Lord_of_Life_!~Lord@46.217.124.224 NICK :Lord_of_Life < 1543168187 471164 :Lord_of_Life!~Lord@46.217.124.224 QUIT :Changing host < 1543168187 517739 :Lord_of_Life!~Lord@unaffiliated/lord-of-life/x-0885362 JOIN :#esoteric < 1543169124 721580 :AnotherTest!~turingcom@ptr-82l26zf5tit6s260cpd.18120a2.ip6.access.telenet.be QUIT :Ping timeout: 252 seconds < 1543172637 960474 :imode!~imode@unaffiliated/imode QUIT :Quit: WeeChat 2.3 < 1543172931 49470 :paul2520!~paul2520@unaffiliated/paul2520 PRIVMSG #esoteric :@search jokes < 1543172931 140213 :lambdabot!~lambdabot@haskell/bot/lambdabot PRIVMSG #esoteric :Unknown command, try @list < 1543172943 792312 :paul2520!~paul2520@unaffiliated/paul2520 PRIVMSG #esoteric :oops, wrong channel! < 1543174076 338950 :imode!~imode@unaffiliated/imode JOIN :#esoteric < 1543175158 408854 :zzo38!~zzo38@24-207-47-161.eastlink.ca PRIVMSG #esoteric :b_jonas: I am implementing the Netsubscribe program, and I have implemented the DNS verification that works (it frees the entire list after checking though, since only the first entry is used; the address from it is copied out anyways) < 1543176233 505422 :imode!~imode@unaffiliated/imode QUIT :Quit: WeeChat 2.3 < 1543177575 521538 :imode!~imode@unaffiliated/imode JOIN :#esoteric < 1543180619 198724 :AnotherTest!~turingcom@ptr-82l26zf5tit6s260cpd.18120a2.ip6.access.telenet.be JOIN :#esoteric < 1543181209 204932 :imode!~imode@unaffiliated/imode QUIT :Quit: WeeChat 2.3 < 1543183548 325429 :moei!~moei@softbank221078042071.bbtec.net QUIT :Quit: Leaving... < 1543184061 414647 :Sgeo_!~Sgeo@ool-18b98dd9.dyn.optonline.net JOIN :#esoteric < 1543184187 316491 :Sgeo!~Sgeo@ool-18b98dd9.dyn.optonline.net QUIT :Ping timeout: 240 seconds < 1543185066 199001 :AnotherTest!~turingcom@ptr-82l26zf5tit6s260cpd.18120a2.ip6.access.telenet.be QUIT :Ping timeout: 260 seconds < 1543186254 765176 :b_jonas!~x@catv-176-63-24-115.catv.broadband.hu PRIVMSG #esoteric :`" < 1543186255 617164 :HackEso!~h@techne.zem.fi PRIVMSG #esoteric :872) GreyKnight: And Gregor itself is kind of a probability distribution spread all over the globe. \ 1248) I've heard that scow is oerjanspeak for something < 1543186260 477082 :b_jonas!~x@catv-176-63-24-115.catv.broadband.hu PRIVMSG #esoteric :`wisdom < 1543186261 67344 :HackEso!~h@techne.zem.fi PRIVMSG #esoteric :​norway//Norway is the suburb capital of Sweden. It's where the Nobel Peace Prize is announced. It's a warm, dry place, at least compared to Québec. < 1543186271 739242 :b_jonas!~x@catv-176-63-24-115.catv.broadband.hu PRIVMSG #esoteric :`wisdom < 1543186272 368744 :HackEso!~h@techne.zem.fi PRIVMSG #esoteric :​ronald reagan//Ronald Reagan was an actor so great that he managed to convince the US that he was the President. Then he created the Star Wars project to destroy the Soviet Union. < 1543186546 176044 :shachaf!~shachaf@unaffiliated/shachaf PRIVMSG #esoteric :`? star wars < 1543186547 115240 :HackEso!~h@techne.zem.fi PRIVMSG #esoteric :Star Wars was a missile defence system invented by Ronald Reagan. With it, he managed to destroy the Soviet Union, then rode into the sunset. < 1543188384 954121 :Essadon!~Essadon@81-225-32-185-no249.tbcn.telia.com QUIT :Quit: Qutting