VirtualBox

Ignore:
Timestamp:
Nov 6, 2015 1:43:02 AM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
103951
Message:

lwip: Use different callback for proxy accept that is triggered by
receiving a SYN. Pass the SYN pbuf as a separate argument, so that we
can do it for normal listening pcbs too (they do use callback arg
unlike proxy). Adapt pxtcp to the change.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/NetworkServices/NAT/pxtcp.c

    r58548 r58592  
    268268
    269269/* tcp pcb callbacks */
    270 static err_t pxtcp_pcb_heard(void *, struct tcp_pcb *, err_t); /* global */
     270static err_t pxtcp_pcb_heard(void *, struct tcp_pcb *, struct pbuf *); /* global */
    271271static err_t pxtcp_pcb_accept(void *, struct tcp_pcb *, err_t);
    272272static err_t pxtcp_pcb_connected(void *, struct tcp_pcb *, err_t);
     
    10031003 */
    10041004static err_t
    1005 pxtcp_pcb_heard(void *arg, struct tcp_pcb *newpcb, err_t error)
    1006 {
    1007     struct pbuf *p = (struct pbuf *)arg;
    1008 
    1009     LWIP_UNUSED_ARG(error);     /* always ERR_OK */
    1010 
    1011     return pxtcp_pcb_accept_outbound(newpcb, p,
     1005pxtcp_pcb_heard(void *arg, struct tcp_pcb *newpcb, struct pbuf *syn)
     1006{
     1007    LWIP_UNUSED_ARG(arg);
     1008
     1009    return pxtcp_pcb_accept_outbound(newpcb, syn,
    10121010               PCB_ISIPV6(newpcb), &newpcb->local_ip, newpcb->local_port);
    10131011}
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette