VirtualBox

Changeset 19759 in vbox for trunk/src/VBox/Devices/Network


Ignore:
Timestamp:
May 16, 2009 6:55:09 AM (16 years ago)
Author:
vboxsync
Message:

NAT: replace header storing with calculation of start of IP header in place

Location:
trunk/src/VBox/Devices/Network/slirp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp/ip_input.c

    r17191 r19759  
    293293     */
    294294    ipstat.ips_fragments++;
    295     m->m_hdr.header = ip;
    296295
    297296    /* Previous ip_reass() started here. */
     
    328327    }
    329328
    330 #define GETIP(m)    ((struct ip*)((m)->m_hdr.header))
     329#define GETIP(m)    ((struct ip*)(MBUF_IP_HEADER(m)))
    331330
    332331
  • trunk/src/VBox/Devices/Network/slirp/mbuf.h

    r19525 r19759  
    7474    caddr_t mh_data;           /* Location of data */
    7575    int     mh_len;            /* Amount of data in this mbuf */
    76     void    *header;           /*XXX: in real BSD sources this field lays in pkthdr structure*/
    7776};
    7877
     
    147146#define MBUF_HEAD(m) ((caddr_t)(((m)->m_flags & M_EXT) ? (m)->m_ext : (m)->m_dat))
    148147
     148#define MBUF_IP_HEADER(m) (caddr_t)(MBUF_HEAD(m) + if_maxlinkhdr)
     149
    149150#endif
Note: See TracChangeset for help on using the changeset viewer.

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