Re: talkd

From: kuznet@ms2.inr.ac.ru
Date: Mon Jan 31 2000 - 13:08:05 EST


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@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jan 31 2000 - 21:00:29 EST