/[lwip]/lwip/src/api/api_msg.c
ViewVC logotype

Diff of /lwip/src/api/api_msg.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.15.2.3 by kieranm, Wed Sep 10 17:14:27 2003 UTC revision 1.15.2.4 by likewise, Fri Nov 14 09:42:51 2003 UTC
# Line 103  recv_udp(void *arg, struct udp_pcb *pcb, Line 103  recv_udp(void *arg, struct udp_pcb *pcb,
103  }  }
104  #endif /* LWIP_UDP */  #endif /* LWIP_UDP */
105  #if LWIP_TCP  #if LWIP_TCP
106  /*-----------------------------------------------------------------------------------*/  
107  static err_t  static err_t
108  recv_tcp(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err)  recv_tcp(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err)
109  {  {
# Line 134  recv_tcp(void *arg, struct tcp_pcb *pcb, Line 134  recv_tcp(void *arg, struct tcp_pcb *pcb,
134    return ERR_OK;    return ERR_OK;
135  }  }
136    
137  /*-----------------------------------------------------------------------------------*/  
138  static err_t  static err_t
139  poll_tcp(void *arg, struct tcp_pcb *pcb)  poll_tcp(void *arg, struct tcp_pcb *pcb)
140  {  {
# Line 148  poll_tcp(void *arg, struct tcp_pcb *pcb) Line 148  poll_tcp(void *arg, struct tcp_pcb *pcb)
148    }    }
149    return ERR_OK;    return ERR_OK;
150  }  }
151  /*-----------------------------------------------------------------------------------*/  
152  static err_t  static err_t
153  sent_tcp(void *arg, struct tcp_pcb *pcb, u16_t len)  sent_tcp(void *arg, struct tcp_pcb *pcb, u16_t len)
154  {  {
# Line 165  sent_tcp(void *arg, struct tcp_pcb *pcb, Line 165  sent_tcp(void *arg, struct tcp_pcb *pcb,
165        
166    return ERR_OK;    return ERR_OK;
167  }  }
168  /*-----------------------------------------------------------------------------------*/  
169  static void  static void
170  err_tcp(void *arg, err_t err)  err_tcp(void *arg, err_t err)
171  {  {
# Line 196  err_tcp(void *arg, err_t err) Line 196  err_tcp(void *arg, err_t err)
196      sys_sem_signal(conn->sem);      sys_sem_signal(conn->sem);
197    }    }
198  }  }
199  /*-----------------------------------------------------------------------------------*/  
200  static void  static void
201  setup_tcp(struct netconn *conn)  setup_tcp(struct netconn *conn)
202  {  {
# Line 209  setup_tcp(struct netconn *conn) Line 209  setup_tcp(struct netconn *conn)
209    tcp_poll(pcb, poll_tcp, 4);    tcp_poll(pcb, poll_tcp, 4);
210    tcp_err(pcb, err_tcp);    tcp_err(pcb, err_tcp);
211  }  }
212  /*-----------------------------------------------------------------------------------*/  
213  static err_t  static err_t
214  accept_function(void *arg, struct tcp_pcb *newpcb, err_t err)  accept_function(void *arg, struct tcp_pcb *newpcb, err_t err)
215  {  {
# Line 265  accept_function(void *arg, struct tcp_pc Line 265  accept_function(void *arg, struct tcp_pc
265    return ERR_OK;    return ERR_OK;
266  }  }
267  #endif /* LWIP_TCP */  #endif /* LWIP_TCP */
268  /*-----------------------------------------------------------------------------------*/  
269  static void  static void
270  do_newconn(struct api_msg_msg *msg)  do_newconn(struct api_msg_msg *msg)
271  {  {
# Line 331  do_newconn(struct api_msg_msg *msg) Line 331  do_newconn(struct api_msg_msg *msg)
331    sys_mbox_post(msg->conn->mbox, NULL);    sys_mbox_post(msg->conn->mbox, NULL);
332  }  }
333    
334  /*-----------------------------------------------------------------------------------*/  
335  static void  static void
336  do_delconn(struct api_msg_msg *msg)  do_delconn(struct api_msg_msg *msg)
337  {  {
# Line 384  do_delconn(struct api_msg_msg *msg) Line 384  do_delconn(struct api_msg_msg *msg)
384      sys_mbox_post(msg->conn->mbox, NULL);      sys_mbox_post(msg->conn->mbox, NULL);
385    }    }
386  }  }
387  /*-----------------------------------------------------------------------------------*/  
388  static void  static void
389  do_bind(struct api_msg_msg *msg)  do_bind(struct api_msg_msg *msg)
390  {  {
# Line 447  do_bind(struct api_msg_msg *msg) Line 447  do_bind(struct api_msg_msg *msg)
447    sys_mbox_post(msg->conn->mbox, NULL);    sys_mbox_post(msg->conn->mbox, NULL);
448  }  }
449  #if LWIP_TCP  #if LWIP_TCP
450  /*-----------------------------------------------------------------------------------*/  
451  static err_t  static err_t
452  do_connected(void *arg, struct tcp_pcb *pcb, err_t err)  do_connected(void *arg, struct tcp_pcb *pcb, err_t err)
453  {  {
# Line 467  do_connected(void *arg, struct tcp_pcb * Line 467  do_connected(void *arg, struct tcp_pcb *
467    return ERR_OK;    return ERR_OK;
468  }  }
469  #endif    #endif  
470  /*-----------------------------------------------------------------------------------*/  
471  static void  static void
472  do_connect(struct api_msg_msg *msg)  do_connect(struct api_msg_msg *msg)
473  {  {
# Line 579  do_disconnect(struct api_msg_msg *msg) Line 579  do_disconnect(struct api_msg_msg *msg)
579    sys_mbox_post(msg->conn->mbox, NULL);    sys_mbox_post(msg->conn->mbox, NULL);
580  }  }
581    
582  /*-----------------------------------------------------------------------------------*/  
583  static void  static void
584  do_listen(struct api_msg_msg *msg)  do_listen(struct api_msg_msg *msg)
585  {  {
# Line 622  do_listen(struct api_msg_msg *msg) Line 622  do_listen(struct api_msg_msg *msg)
622    }    }
623    sys_mbox_post(msg->conn->mbox, NULL);    sys_mbox_post(msg->conn->mbox, NULL);
624  }  }
625  /*-----------------------------------------------------------------------------------*/  
626  static void  static void
627  do_accept(struct api_msg_msg *msg)  do_accept(struct api_msg_msg *msg)
628  {  {
# Line 647  do_accept(struct api_msg_msg *msg) Line 647  do_accept(struct api_msg_msg *msg)
647      }      }
648    }    }
649  }  }
650  /*-----------------------------------------------------------------------------------*/  
651  static void  static void
652  do_send(struct api_msg_msg *msg)  do_send(struct api_msg_msg *msg)
653  {  {
# Line 673  do_send(struct api_msg_msg *msg) Line 673  do_send(struct api_msg_msg *msg)
673    }    }
674    sys_mbox_post(msg->conn->mbox, NULL);    sys_mbox_post(msg->conn->mbox, NULL);
675  }  }
676  /*-----------------------------------------------------------------------------------*/  
677  static void  static void
678  do_recv(struct api_msg_msg *msg)  do_recv(struct api_msg_msg *msg)
679  {  {
# Line 686  do_recv(struct api_msg_msg *msg) Line 686  do_recv(struct api_msg_msg *msg)
686  #endif    #endif  
687    sys_mbox_post(msg->conn->mbox, NULL);    sys_mbox_post(msg->conn->mbox, NULL);
688  }  }
689  /*-----------------------------------------------------------------------------------*/  
690  static void  static void
691  do_write(struct api_msg_msg *msg)  do_write(struct api_msg_msg *msg)
692  {  {
# Line 734  do_write(struct api_msg_msg *msg) Line 734  do_write(struct api_msg_msg *msg)
734    }    }
735    sys_mbox_post(msg->conn->mbox, NULL);    sys_mbox_post(msg->conn->mbox, NULL);
736  }  }
737  /*-----------------------------------------------------------------------------------*/  
738  static void  static void
739  do_close(struct api_msg_msg *msg)  do_close(struct api_msg_msg *msg)
740  {  {
# Line 769  do_close(struct api_msg_msg *msg) Line 769  do_close(struct api_msg_msg *msg)
769    }    }
770    sys_mbox_post(msg->conn->mbox, NULL);    sys_mbox_post(msg->conn->mbox, NULL);
771  }  }
772  /*-----------------------------------------------------------------------------------*/  
773  typedef void (* api_msg_decode)(struct api_msg_msg *msg);  typedef void (* api_msg_decode)(struct api_msg_msg *msg);
774  static api_msg_decode decode[API_MSG_MAX] = {  static api_msg_decode decode[API_MSG_MAX] = {
775    do_newconn,    do_newconn,
# Line 789  api_msg_input(struct api_msg *msg) Line 789  api_msg_input(struct api_msg *msg)
789  {    {  
790    decode[msg->type](&(msg->msg));    decode[msg->type](&(msg->msg));
791  }  }
792  /*-----------------------------------------------------------------------------------*/  
793  void  void
794  api_msg_post(struct api_msg *msg)  api_msg_post(struct api_msg *msg)
795  {  {
796    tcpip_apimsg(msg);    tcpip_apimsg(msg);
797  }  }
798  /*-----------------------------------------------------------------------------------*/  
799    
800    

Legend:
Removed from v.1.15.2.3  
changed lines
  Added in v.1.15.2.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26