/[lwip]/lwip/src/core/tcp.c
ViewVC logotype

Diff of /lwip/src/core/tcp.c

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

revision 1.31.2.6 by jani, Wed Nov 5 08:32:25 2003 UTC revision 1.31.2.7 by jani, Wed Nov 5 09:07:46 2003 UTC
# Line 985  tcp_arg(struct tcp_pcb *pcb, void *arg) Line 985  tcp_arg(struct tcp_pcb *pcb, void *arg)
985  {    {  
986    pcb->callback_arg = arg;    pcb->callback_arg = arg;
987  }  }
988    #if LWIP_CALLBACK_API
989  /*-----------------------------------------------------------------------------------*/  /*-----------------------------------------------------------------------------------*/
990  /*  /*
991   * tcp_recv():   * tcp_recv():
# Line 994  tcp_arg(struct tcp_pcb *pcb, void *arg) Line 995  tcp_arg(struct tcp_pcb *pcb, void *arg)
995   *   *
996   */   */
997  /*-----------------------------------------------------------------------------------*/  /*-----------------------------------------------------------------------------------*/
 #if LWIP_CALLBACK_API  
998  void  void
999  tcp_recv(struct tcp_pcb *pcb,  tcp_recv(struct tcp_pcb *pcb,
1000     err_t (* recv)(void *arg, struct tcp_pcb *tpcb, struct pbuf *p, err_t err))     err_t (* recv)(void *arg, struct tcp_pcb *tpcb, struct pbuf *p, err_t err))
1001  {  {
1002    pcb->recv = recv;    pcb->recv = recv;
1003  }  }
 #endif /* LWIP_CALLBACK_API */  
1004  /*-----------------------------------------------------------------------------------*/  /*-----------------------------------------------------------------------------------*/
1005  /*  /*
1006   * tcp_sent():   * tcp_sent():
# Line 1011  tcp_recv(struct tcp_pcb *pcb, Line 1010  tcp_recv(struct tcp_pcb *pcb,
1010   *   *
1011   */   */
1012  /*-----------------------------------------------------------------------------------*/  /*-----------------------------------------------------------------------------------*/
 #if LWIP_CALLBACK_API  
1013  void  void
1014  tcp_sent(struct tcp_pcb *pcb,  tcp_sent(struct tcp_pcb *pcb,
1015     err_t (* sent)(void *arg, struct tcp_pcb *tpcb, u16_t len))     err_t (* sent)(void *arg, struct tcp_pcb *tpcb, u16_t len))
1016  {  {
1017    pcb->sent = sent;    pcb->sent = sent;
1018  }  }
 #endif /* LWIP_CALLBACK_API */  
1019  /*-----------------------------------------------------------------------------------*/  /*-----------------------------------------------------------------------------------*/
1020  /*  /*
1021   * tcp_err():   * tcp_err():
# Line 1028  tcp_sent(struct tcp_pcb *pcb, Line 1025  tcp_sent(struct tcp_pcb *pcb,
1025   *   *
1026   */   */
1027  /*-----------------------------------------------------------------------------------*/  /*-----------------------------------------------------------------------------------*/
 #if LWIP_CALLBACK_API  
1028  void  void
1029  tcp_err(struct tcp_pcb *pcb,  tcp_err(struct tcp_pcb *pcb,
1030     void (* errf)(void *arg, err_t err))     void (* errf)(void *arg, err_t err))
1031  {  {
1032    pcb->errf = errf;    pcb->errf = errf;
1033  }  }
1034    /*-----------------------------------------------------------------------------------*/
1035    /*
1036     * tcp_accept():
1037     *
1038     * Used for specifying the function that should be called when a
1039     * LISTENing connection has been connected to another host.
1040     *
1041     */
1042    /*-----------------------------------------------------------------------------------*/
1043    void
1044    tcp_accept(struct tcp_pcb *pcb,
1045         err_t (* accept)(void *arg, struct tcp_pcb *newpcb, err_t err))
1046    {
1047      ((struct tcp_pcb_listen *)pcb)->accept = accept;
1048    }
1049  #endif /* LWIP_CALLBACK_API */  #endif /* LWIP_CALLBACK_API */
1050    
1051  /*-----------------------------------------------------------------------------------*/  /*-----------------------------------------------------------------------------------*/
1052  /*  /*
1053   * tcp_poll():   * tcp_poll():
# Line 1057  tcp_poll(struct tcp_pcb *pcb, Line 1069  tcp_poll(struct tcp_pcb *pcb,
1069  }  }
1070  /*-----------------------------------------------------------------------------------*/  /*-----------------------------------------------------------------------------------*/
1071  /*  /*
  * tcp_accept():  
  *  
  * Used for specifying the function that should be called when a  
  * LISTENing connection has been connected to another host.  
  *  
  */  
 /*-----------------------------------------------------------------------------------*/  
 #if LWIP_CALLBACK_API  
 void  
 tcp_accept(struct tcp_pcb *pcb,  
      err_t (* accept)(void *arg, struct tcp_pcb *newpcb, err_t err))  
 {  
   ((struct tcp_pcb_listen *)pcb)->accept = accept;  
 }  
 #endif /* LWIP_CALLBACK_API */  
 /*-----------------------------------------------------------------------------------*/  
 /*  
1072   * tcp_pcb_purge():   * tcp_pcb_purge():
1073   *   *
1074   * Purges a TCP PCB. Removes any buffered data and frees the buffer memory.   * Purges a TCP PCB. Removes any buffered data and frees the buffer memory.

Legend:
Removed from v.1.31.2.6  
changed lines
  Added in v.1.31.2.7

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