Subject: Re: Transport hexdump output

Re: Transport hexdump output

From: Simon Josefsson <simon_at_josefsson.org>
Date: Mon, 01 Feb 2010 12:08:24 +0100

Sofian Brabez <sofian.brabez_at_wallix.com> writes:

> Hi folks,
>
> Does it normal it appears a ':' character in transport hexdump ? During a
> debugging session i get this:
>
> => libssh2_transport_write send() (84 bytes)
> 0000: E3 07 A2 9E 61 6D 21 C5:1A F5 3E 51 EA 32 20 83 : ....am!...>Q.2 .
> 0010: 69 97 47 1C 46 EF 88 FC:78 1E A6 DC 97 D1 E3 22 : i.G.F...x......"
> 0020: 92 66 C9 85 BF C1 F8 6A:C6 A4 03 B8 82 9E BF D9 : .f.....j........
> 0030: 26 3E DD 8A 44 4B D7 6A:3E EC BF 90 B9 7A 78 E0 : &>..DK.j>....zx.
> 0040: A9 0E 6C E8 65 88 75 BB:4C 69 89 E7 1A 0A 1C DF : ..l.e.u.Li......
> 0050: 18 F0 F3 15 : : ....
>
> I think the ':' character added is not necessary. Does make any sense
> for you guys to keep it ? Please accept the ridiculous patch in attachment
> to fix the hexdump. After patch it output looks like this:
>
> => libssh2_transport_write send() (84 bytes)
> 0000: 78 CE C0 22 88 B7 EE 84 28 DB FD 11 7C 72 76 4A : x.."....(...|rvJ
> 0010: 2B 33 10 38 4A 29 A6 5C 91 89 34 C0 26 F5 91 34 : +3.8J).\..4.&..4
> 0020: 1B BC 4A 3E E3 6D FD 29 81 3A 5A EA 2F 77 10 EF : ..J>.m.).:Z./w..
> 0030: E9 00 6E B0 C7 38 C5 82 93 2D EA 89 44 9B FA 6A : ..n..8...-..D..j
> 0040: F7 FB 9A 08 24 A6 D4 54 1B 4B 71 2B 2C 2F 27 18 : ....$..T.Kq+,/'.
> 0050: 08 9C 68 3F : ..h?

Would you accept having two spaces instead? I find it annoying to not
be able to visually find the 8-octet delimiter quickly. A colon or
something really helps. With two spaces then it would look like:

> => libssh2_transport_write send() (84 bytes)
> 0000: 78 CE C0 22 88 B7 EE 84 28 DB FD 11 7C 72 76 4A : x.."....(...|rvJ
> 0010: 2B 33 10 38 4A 29 A6 5C 91 89 34 C0 26 F5 91 34 : +3.8J).\..4.&..4
> 0020: 1B BC 4A 3E E3 6D FD 29 81 3A 5A EA 2F 77 10 EF : ..J>.m.).:Z./w..
> 0030: E9 00 6E B0 C7 38 C5 82 93 2D EA 89 44 9B FA 6A : ..n..8...-..D..j
> 0040: F7 FB 9A 08 24 A6 D4 54 1B 4B 71 2B 2C 2F 27 18 : ....$..T.Kq+,/'.
> 0050: 08 9C 68 3F : ..h?

I think this is the most readable and still helpful for those of us
still reading the hex output.

Btw, sometimes I've even used spaces to separate the 4-byte delimiter
since my brain can use some help even for that... then it becomes:

> => libssh2_transport_write send() (84 bytes)
> 0000: 78 CE C0 22 88 B7 EE 84 28 DB FD 11 7C 72 76 4A : x.."....(...|rvJ
> 0010: 2B 33 10 38 4A 29 A6 5C 91 89 34 C0 26 F5 91 34 : +3.8J).\..4.&..4
> 0020: 1B BC 4A 3E E3 6D FD 29 81 3A 5A EA 2F 77 10 EF : ..J>.m.).:Z./w..
> 0030: E9 00 6E B0 C7 38 C5 82 93 2D EA 89 44 9B FA 6A : ..n..8...-..D..j
> 0040: F7 FB 9A 08 24 A6 D4 54 1B 4B 71 2B 2C 2F 27 18 : ....$..T.Kq+,/'.
> 0050: 08 9C 68 3F : ..h?

I don't care strongly about this though.

/Simon
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-02-01