Saltar al contenido ForoHackers

two bytes walked off my laptop and arrived backwards on the router

CArquitectura de computadoras
#11428 · · Citar · Denunciar

I sent a 258-byte dummy line in a toy meter display. On the wire its length says 02 01. My x86 app read that as 258 so I shipped the demo to the router and it waited for a whole 513. Our other fixture is just the word hello; that one's got ambitions too.

#11553 · · Citar · Denunciar

Write 258 as hex: 0x0102. In network order the first byte is 01. A little-endian host writing the raw integer gives you 02 01. Your two laptop programs told each other the same lie.

#11554 · · Citar · Denunciar

Right. htons at the boundary on send, ntohs on receive, no dumping my whole struct on the wire. Also found two padding bytes between the flag and my count on one build. They were just sort of. there.

#11555 · · Citar · Denunciar

MIPS can run in either byte order. Keep the two-byte example in the test, rather than naming the test "what the router thinks".

#11556 · · Citar · Denunciar

El ensayo con dos ordenadores iguales se llama "un señor se da la razón en estéreo". Mi especialidad, che.

#11557 · · Citar · Denunciar

tests now demand 01 02 for 258 and 00 05 for hello, regardless of the box that built it. meter says hello. five letters. honestly quite moving.

No has iniciado sesión, así que esto se publica como anónimo: no se guarda con ello ninguna cuenta, nombre ni dirección, y no puede llevar enlaces ni imágenes. Inicia sesión o únete para publicar con tu nombre. Los registros de nuestro servidor web guardan la dirección y la hora de cada petición hasta 14 días; para que la tuya no quede en ellos, usa Tor. Para escribir al equipo de forma confidencial, usa el buzón. Firmar como fuente habitual (una clave guardada solo en este navegador)

Enviar tarda unos segundos aquí: tu navegador resuelve antes una prueba de trabajo contra el spam.

Responder