bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#46342: 28.0.50; socks-send-command munges IP address bytes to UTF-8


From: Eli Zaretskii
Subject: bug#46342: 28.0.50; socks-send-command munges IP address bytes to UTF-8
Date: Thu, 11 Feb 2021 17:28:06 +0200

> From: "J.P." <jp@neverwas.me>
> Cc: 46342@debbugs.gnu.org
> Date: Thu, 11 Feb 2021 06:58:00 -0800
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Then I don't understand why we need to worry about encoding.  IP
> > addresses are pure ASCII strings, so they need no encoding whatsoever.
> 
> Clearly, I'm failing you here. Between my dearth of communications
> skills and lack of Emacs know how, I've obviously managed to deceive you
> into thinking that SOCKS IP address fields ought to contain ASCII text
> characters such as the following:
> 
>   1  9  2  .  1  6  8  .  1  .  1
>   31 39 32 2e 31 36 38 2e 31 2e 31
> 
> However, this is not the case [a]. In version 4, all addresses are
> four-byte sequences, one byte for each component of an IPv4 address, and
> the ordering is left-to-right. For example:
> 
>   192 168 1  1
>   c0  a8  01 01

Then they are what we call "raw bytes", and encoding them with
raw-text-unix should suffice.

How does the code which calls socks.el create these raw bytes?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]