00:15:38  * Sochiroquit (Quit: My Mac has gone to sleep. ZZZzzz…)
01:17:03  * DarkGodquit (Ping timeout: 250 seconds)
02:47:06  * dobsonquit (K-Lined)
02:53:16  * dobsonjoined
05:57:12  * Something12_quit (Ping timeout: 264 seconds)
06:12:33  * SkyRocknRolljoined
07:15:26  * ldub_joined
07:42:14  * DarkGodjoined
07:50:42  * DarkGodquit (Remote host closed the connection)
07:53:05  * DarkGodjoined
08:24:22  * hdmsquit (Quit: hdms)
10:37:53  * ldub_1joined
10:39:35  * ldub_quit (Ping timeout: 272 seconds)
10:42:00  * ldub_1quit (Ping timeout: 240 seconds)
10:47:56  * ldub_joined
10:53:53  * ldub_1joined
10:54:09  * ldub_quit (Ping timeout: 272 seconds)
12:12:26  * hdmsjoined
12:26:57  * Sochirojoined
12:58:30  <rphillips>good morning
13:26:20  * ldub_1quit (Ping timeout: 240 seconds)
13:32:35  * ldub_joined
13:36:44  * SkyRocknRollquit (Remote host closed the connection)
14:28:01  * dan336joined
14:39:47  * Sochiroquit (Quit: My Mac has gone to sleep. ZZZzzz…)
14:43:03  <creationix>mornin
15:08:09  * erlbot--quit (Remote host closed the connection)
15:08:15  * erlbot--joined
16:17:56  <creationix>rphillips: so I think we can (ab)use uv_udp_t to send icmp packets as long as we manually create the socket.
16:17:57  <creationix>https://gist.github.com/creationix/b7f949c3e360773bece2
16:18:48  <creationix>so now I just need to generate the ICMP header and body in lua which your gist seems to do
16:20:02  <creationix>yep, passing real data for uv_udp_send on a raw socket seems to work https://gist.github.com/creationix/b7f949c3e360773bece2
16:27:14  <rphillips>nice
16:32:04  * ldub_quit (Quit: Leaving.)
17:25:15  * DarkGodquit (Ping timeout: 246 seconds)
17:32:23  <creationix>rphillips: where did you get your checksum code? You’re adding HLHLL for odd lengths
17:32:37  <creationix>shouldn’t it he LHLHL or HLHLH?
17:33:01  <creationix>though, I’m pretty sure all pings in practice have even body lengths
17:34:56  <creationix>hmm, the spec just says “The 16 bit one's complement of the one's complement sum of all 16 bit words in the header”, I’m going to assume even length
17:54:06  <rphillips>the checksum code might be off
17:54:18  <rphillips>i wasn't 100% positive of it when I wrote it
18:28:25  * DarkGodjoined
18:52:13  <creationix>alright, got checksum working
18:52:20  <creationix>it helps if I checksum the right data
18:52:33  <creationix>I was including the IP header and kept wondering why I got the wrong result
19:16:52  <creationix>alright, I can form correct ICMP echo requests with any given id, seq, and timestamp https://gist.github.com/creationix/b7f949c3e360773bece2#file-ping-lua-L22-L56
19:19:32  <rphillips>nice, works on osx
19:21:57  <rphillips>something else we will need is ping support over ipv6
19:23:11  <creationix>that’s going to be harder to test, many networks don’t support it
19:23:16  <creationix>(my home ISP for example)
19:23:47  <rphillips>gotcha
19:24:12  <rphillips>cloud server might be a good way
19:25:24  <creationix>nice, the code works on my linux box without changes
19:25:31  <creationix>I guess socket() is portable enough
19:27:19  <creationix>rphillips: yeah, I can test from my servers, I guess darwin just won’t be tested for ping6
19:27:37  <creationix>my creationix.com server (on linode) can ping and ping6 luvit.io just fine
19:28:01  <rphillips>i can test it from darwin over ipv6
19:29:58  <creationix>yay austin internet
19:30:14  <rphillips>yeah, ipv6 is working here
20:08:23  <creationix>rphillips: try this on your mac https://gist.github.com/creationix/b7f949c3e360773bece2#file-ping-lua-L99-L102
20:12:36  <rphillips>creationix: works :)
20:13:01  <creationix>luckilly the bulk of the protocol is the same for ipv6, just slightly different constants in the headers
20:13:02  <rphillips>i see the icmpv6 responses
20:13:22  <creationix>it fails for me on linux though, not sure what's up there
20:18:24  <rphillips>creationix: AF_INET6 is 10 on linux
20:20:36  <creationix>yep, that fixes it
20:23:10  <creationix>updated gist
20:23:53  <creationix>now I need to parse the responses and tie them to the requests and calculate the time difference
23:00:40  * dan336quit (Quit: Leaving.)