VirtualBox

Changeset 50068 in vbox


Ignore:
Timestamp:
Jan 14, 2014 2:58:46 AM (11 years ago)
Author:
vboxsync
Message:

Add ifdefed out code to use debug helper for raw ICMP sockets.
Add to the makefile commented out option to enable it.

Location:
trunk/src/VBox/NetworkServices/NAT
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/NetworkServices/NAT/Makefile.kmk

    r50067 r50068  
    8888#  ifn1of ($(KBUILD_TARGET), darwin win)
    8989#   # helper for debugging unprivileged
     90#   VBoxNetLwipNAT_DEFS += VBOX_RAWSOCK_DEBUG_HELPER
    9091#   VBoxNetLwipNAT_SOURCES += getrawsock.c
    9192#  endif
  • trunk/src/VBox/NetworkServices/NAT/VBoxNetLwipNAT.cpp

    r50002 r50068  
    100100#include "portfwd.h"
    101101}
     102
     103
     104#if defined(VBOX_RAWSOCK_DEBUG_HELPER)          \
     105    && (defined(VBOX_WITH_HARDENING)            \
     106        || defined(RT_OS_WINDOWS)               \
     107        || defined(RT_OS_DARWIN))
     108# error Have you forgotten to turn off VBOX_RAWSOCK_DEBUG_HELPER?
     109#endif
     110
     111#ifdef VBOX_RAWSOCK_DEBUG_HELPER
     112extern "C" int getrawsock(int type);
     113#endif
    102114
    103115#include "../NetLib/VBoxPortForwardString.h"
     
    983995    {
    984996        perror("IPPROTO_ICMP");
     997#ifdef VBOX_RAWSOCK_DEBUG_HELPER
     998        icmpsock4 = getrawsock(AF_INET);
     999#endif
    9851000    }
    9861001
     
    10091024    {
    10101025        perror("IPPROTO_ICMPV6");
     1026#ifdef VBOX_RAWSOCK_DEBUG_HELPER
     1027        icmpsock6 = getrawsock(AF_INET6);
     1028#endif
    10111029    }
    10121030
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