VirtualBox

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


Ignore:
Timestamp:
Nov 26, 2008 9:36:18 AM (16 years ago)
Author:
vboxsync
Message:

ICMP support disabled (doesn't work)

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

Legend:

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

    r14470 r14623  
    6666};
    6767
     68#ifdef VBOX_WITH_SLIRP_ICMP
     69static int
     70icmp_attach(PNATState pData, struct socket *so) {
     71    AssertRelease(so != NULL);
     72    if (pData->icmp_socket == 0)
     73        pData->icmp_socket = socket(PF_INET, SOCK_RAW, IPPROTO_ICMP);
     74    AssertRelease(pData->icmp_socket != -1);
     75    so->s = pData->icmp_socket;
     76    return (so->s);
     77}
     78#endif /* VBOX_WITH_SLIRP_ICMP */
     79
    6880/*
    6981 * Process a received ICMP message.
     
    118130      struct sockaddr_in addr;
    119131      if ((so = socreate()) == NULL) goto freeit;
     132#ifndef VBOX_WITH_SLIRP_ICMP
    120133      if(udp_attach(pData, so) == -1) {
     134#else
     135      if(icmp_attach(pData, so) == -1) {
     136#endif
    121137        DEBUG_MISC((dfd,"icmp_input udp_attach errno = %d-%s\n",
    122138                    errno,strerror(errno)));
  • trunk/src/VBox/Devices/Network/slirp/slirp_state.h

    r14522 r14623  
    129129    struct socket udb;
    130130    struct socket *udp_last_so;
     131#ifdef VBOX_WITH_SLIRP_ICMP
     132    int icmp_socket;
     133#endif
    131134#if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS)
    132135# define VBOX_SOCKET_EVENT (pData->phEvents[VBOX_SOCKET_EVENT_INDEX])
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