jbentham / picowi

Standalone WiFi driver for the Pi Pico-W
MIT License
91 stars 11 forks source link

sendto is incorrect #4

Open mischievous opened 9 months ago

mischievous commented 9 months ago

ssize_t sendmsg(int socket, const struct msghdr *message, int flags);

DESCRIPTION sendto() is used to transmit a message to another socket and may be used at any time.

 The address of the target is given by dest_addr with dest_len specifying its size.  The length of the message is given by length.  If the message is too long to pass atomically through the underlying protocol, the error EMSGSIZE is returned, and the message is not transmitted.

Except excerpt from picowl_net.c::sendto where yo can see it's using the ip address in the NET_SOCKET return (udp_tx(usp->rem_mac, usp->rem_ip, usp->rem_port, usp->loc_port, data, size));