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

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

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

revision 1.27.2.5 by jani, Wed Nov 5 09:21:14 2003 UTC revision 1.27.2.6 by likewise, Fri Nov 14 09:42:51 2003 UTC
# Line 35  Line 35 
35   *   *
36   */   */
37    
38  /*-----------------------------------------------------------------------------------*/  
39  /* tcp_output.c  /* tcp_output.c
40   *   *
41   * The output functions of TCP.   * The output functions of TCP.
42   *   *
43   */   */
44  /*-----------------------------------------------------------------------------------*/  
45    
46    
47  #include "lwip/def.h"  #include "lwip/def.h"
# Line 64  Line 64 
64  static void tcp_output_segment(struct tcp_seg *seg, struct tcp_pcb *pcb);  static void tcp_output_segment(struct tcp_seg *seg, struct tcp_pcb *pcb);
65    
66    
67  /*-----------------------------------------------------------------------------------*/  
68  err_t  err_t
69  tcp_send_ctrl(struct tcp_pcb *pcb, u8_t flags)  tcp_send_ctrl(struct tcp_pcb *pcb, u8_t flags)
70  {  {
71    return tcp_enqueue(pcb, NULL, 0, flags, 1, NULL, 0);    return tcp_enqueue(pcb, NULL, 0, flags, 1, NULL, 0);
72    
73  }  }
74  /*-----------------------------------------------------------------------------------*/  
75  err_t  err_t
76  tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t copy)  tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t copy)
77  {  {
# Line 90  tcp_write(struct tcp_pcb *pcb, const voi Line 90  tcp_write(struct tcp_pcb *pcb, const voi
90      return ERR_CONN;      return ERR_CONN;
91    }    }
92  }  }
93  /*-----------------------------------------------------------------------------------*/  
94  err_t  err_t
95  tcp_enqueue(struct tcp_pcb *pcb, void *arg, u16_t len,  tcp_enqueue(struct tcp_pcb *pcb, void *arg, u16_t len,
96        u8_t flags, u8_t copy,        u8_t flags, u8_t copy,
# Line 338  tcp_enqueue(struct tcp_pcb *pcb, void *a Line 338  tcp_enqueue(struct tcp_pcb *pcb, void *a
338    LWIP_DEBUGF(TCP_QLEN_DEBUG | DBG_STATE, ("tcp_enqueue: %d (with mem err)\n", pcb->snd_queuelen));    LWIP_DEBUGF(TCP_QLEN_DEBUG | DBG_STATE, ("tcp_enqueue: %d (with mem err)\n", pcb->snd_queuelen));
339    return ERR_MEM;    return ERR_MEM;
340  }  }
341  /*-----------------------------------------------------------------------------------*/  
342  /* find out what we can send and send it */  /* find out what we can send and send it */
343  err_t  err_t
344  tcp_output(struct tcp_pcb *pcb)  tcp_output(struct tcp_pcb *pcb)
# Line 468  tcp_output(struct tcp_pcb *pcb) Line 468  tcp_output(struct tcp_pcb *pcb)
468    }    }
469    return ERR_OK;    return ERR_OK;
470  }  }
471  /*-----------------------------------------------------------------------------------*/  
472  static void  static void
473  tcp_output_segment(struct tcp_seg *seg, struct tcp_pcb *pcb)  tcp_output_segment(struct tcp_seg *seg, struct tcp_pcb *pcb)
474  {  {
# Line 526  tcp_output_segment(struct tcp_seg *seg, Line 526  tcp_output_segment(struct tcp_seg *seg,
526    ip_output(seg->p, &(pcb->local_ip), &(pcb->remote_ip), pcb->ttl, pcb->tos,    ip_output(seg->p, &(pcb->local_ip), &(pcb->remote_ip), pcb->ttl, pcb->tos,
527        IP_PROTO_TCP);        IP_PROTO_TCP);
528  }  }
529  /*-----------------------------------------------------------------------------------*/  
530  void  void
531  tcp_rst(u32_t seqno, u32_t ackno,  tcp_rst(u32_t seqno, u32_t ackno,
532    struct ip_addr *local_ip, struct ip_addr *remote_ip,    struct ip_addr *local_ip, struct ip_addr *remote_ip,
# Line 560  tcp_rst(u32_t seqno, u32_t ackno, Line 560  tcp_rst(u32_t seqno, u32_t ackno,
560    pbuf_free(p);    pbuf_free(p);
561    LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_rst: seqno %lu ackno %lu.\n", seqno, ackno));    LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_rst: seqno %lu ackno %lu.\n", seqno, ackno));
562  }  }
563  /*-----------------------------------------------------------------------------------*/  
564  void  void
565  tcp_rexmit(struct tcp_pcb *pcb)  tcp_rexmit(struct tcp_pcb *pcb)
566  {  {
# Line 590  tcp_rexmit(struct tcp_pcb *pcb) Line 590  tcp_rexmit(struct tcp_pcb *pcb)
590    tcp_output(pcb);    tcp_output(pcb);
591    
592  }  }
593  /*-----------------------------------------------------------------------------------*/  
594  void  void
595  tcp_keepalive(struct tcp_pcb *pcb)  tcp_keepalive(struct tcp_pcb *pcb)
596  {  {

Legend:
Removed from v.1.27.2.5  
changed lines
  Added in v.1.27.2.6

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