talkd
kuznet en ms2.inr.ac.ru
kuznet en ms2.inr.ac.ru
Lun Ene 31 20:17:01 CST 2000
Hello!
> recvfrom(5, "\323x\1\0\0\1\0\0\0\0\0\0\3ola\4"..., 512, 0, {sa_family=0, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, [16]) = 29
> | 00000 d3 78 01 00 00 01 00 00 00 00 00 00 03 6f 6c 61 .x...... .....ola |
> | 00010 04 68 6f 6d 65 02 62 72 00 00 01 00 01 .home.br ..... |
>
>
> # Oh, why do I have the packet, the lenght is right (errno is not set)
> and the sockaddr is completely wrong ?
Because you did pretty common mistake, namely, forgot to initialize
address buffer length. And it was initialized by the first recvfrom.
Alexey Kuznetsov
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo en vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
Más información sobre la lista de distribución Ayuda