From: Che C. <che...@cy...> - 2003-03-07 17:34:40
|
That part was from page 2 of the article: http://www.onlamp.com/pub/a/bsd/2001/04/04/FreeBSD_Basics.html?page=2 Maybe this is a FreeBSD thing [here is an exerpt] tcpshow < dump <snipped to just show packets 4 and 5> ------------------------------------------------- Packet 4 TIME: 10:25:28.608640 (0.000355) LINK: 00:00:B4:3C:56:40 -> 00:50:BA:DE:36:33 type=IP IP: 10.0.0.2 -> 10.0.0.1 hlen=20 TOS=00 dgramlen=84 id=0010 MF/DF=0/0 frag=0 TTL=255 proto=ICMP cksum=A796 ICMP: echo-request cksum=169F DATA: ....:_.:6.... ..................... !"#$%&'()*+,-./01234567 ------------------------------------------------- Packet 5 TIME: 10:25:28.608722 (0.000082) LINK: 00:50:BA:DE:36:33 -> 00:00:B4:3C:56:40 type=IP IP: 10.0.0.1 -> 10.0.0.2 hlen=20 TOS=00 dgramlen=84 id=9551 MF/DF=0/0 frag=0 TTL=255 proto=ICMP cksum=1255 ICMP: echo-reply cksum=1E9F DATA: ....:_.:6.... ..................... !"#$%&'()*+,-./01234567 ------------------------------------------------- Che' -----Original Message----- From: Tarus Balog [mailto:ta...@so...] Sent: Thursday, March 06, 2003 5:04 PM To: bu...@li... Subject: RE: [opennms-bugs] I need some ICMP advice Che Cordes said: > I am not a programmer and don't understand the java calls to send / > receive icmp packets but this article may help with the contents of an > ICMP ping. There appears to be a timestamp in both the ICMP echo-request > and echo-reply (on second page of article). I have no idea whether or > not these are available from your java methods. > > http://www.onlamp.com/pub/a/bsd/2001/04/04/FreeBSD_Basics.html Thanks for the link, but I didn't get to see the timestamps you mentioned. Note packets 4 and 5: Frame 4 (98 on wire, 98 captured) Internet Control Message Protocol Type: 8 (Echo (ping) request) Code: 0 Checksum: 0x169f (correct) Identifier: 0xdd00 Sequence number: 00:00 Data (56 bytes) 0 3a5f a23a 36c3 0600 0809 0a0b 0c0d 0e0f :_.:6........... 10 1011 1213 1415 1617 1819 1a1b 1c1d 1e1f ................ 20 2021 2223 2425 2627 2829 2a2b 2c2d 2e2f !"#$%&'()*+,-./ 30 3031 3233 3435 3637 01234567 Frame 5 (98 on wire, 98 captured) Internet Control Message Protocol Type: 0 (Echo (ping) reply) Code: 0 Checksum: 0x1e9f (correct) Identifier: 0xdd00 Sequence number: 00:00 Data (56 bytes) 0 3a5f a23a 36c3 0600 0809 0a0b 0c0d 0e0f :_.:6........... 10 1011 1213 1415 1617 1819 1a1b 1c1d 1e1f ................ 20 2021 2223 2425 2627 2829 2a2b 2c2d 2e2f !"#$%&'()*+,-./ 30 3031 3233 3435 3637 01234567 There is no time stamp in the header information, and the "Data" is identical for both. Currently, we have offsets in each data portion for send, receive and RTT. When we send an ECHO_REQUEST, we place the current system time into part of the data field. When we get an ECHO_REPLY, we put the current system time into the data field as well as the difference (RTT). Ping programs simply send an ECHO_REQUEST and wait for an ECHO_REPLY. Due to the threaded nature of Java and our solution, we send the ECHO_REQUEST, and another process gets the reply. -T -- Tarus Balog Consultant Sortova Consulting Group, http://www.sortova.com +1-919-696-7625 ta...@so... _______________________________________________ bugs mailing list (bu...@li...) To subscribe, unsubscribe, or change your list options, go to: http://lists.opennms.org/mailman/listinfo/bugs |