How to Callback Function Work in Run Time in C

Viewed 210

I was looking for the some code, TFTP IAP function, in the initilize settings there is this line:

  udp_recv(upcb, IAP_wrq_recv_callback, args);

And IAP_wrq_recv_callback function like this.

static void IAP_wrq_recv_callback(void *_args, struct udp_pcb *upcb, struct pbuf *pkt_buf, 
                        const ip_addr_t *addr, u16_t port);

And when I receive Udp ethernet this function work although call just one time in initlizing function. How to work, callback function, how it understand receiving data ?

0 Answers
Related