Hello all,
I have problem with obtaining sockaddr from recvfrom() - function doesn't
return any socket address.
I do it in such way :
Socket is opened for UDP datagram :
fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
and bind to some port:
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = htonl(INADDR_ANY);
addr.sin_port = htons(RMCP_UDP_PORT);
rc = bind (fd, (struct sockaddr *)&addr, sizeof(struct sockaddr_in));
and next I'm waiting for a packet:
ret = recvfrom(fd, &rmcp_packet_raw, IPMI_BUF_SIZE, 0,
&remote_addr, &remote_addr_len);
Received packet is correct according to length and contents but as I mention
in subject without a socket addres. It's confusing for me because the same
code works as Linux application.
I'm using FreeBsd stack from version 2_0 of eCos
Any suggestion is appreciated.
Best regards,
jerzy