This function is defined in
creates a structure in the UDP layer to receive, and pass upwards,
UDP packets that match the parameters passed. The foreign host,
can be set to 0 as a wild card, which enables the reception of broadcast
The callback handler function is called with a pointer to
a received datagram and a copy of the
which is passed to
udp_open(). This can be
any data the programmer requires, such as a pointer to another function,
or a control structure to aid in demultiplexing the received UDP
udp_open(ip_addr fhost, unsigned short fport, unsigned short lport, int (*
handler)(PACKET, void *), void *data)
Is the foreign host from which you will accept data. It must be set to 0 if listening for any host.
Is the foreign port number. It must be set to 0 if listening for datagrams from any foreign port.
Is the local port on which to receive data.
Is the UDP receive callback function.
Is the data that is passed (along with the received UDP datagram) to the callback handler.