VirtualBox

Changeset 21661 in vbox


Ignore:
Timestamp:
Jul 17, 2009 3:27:41 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
50198
Message:

NAT: backed 50155

File:
1 edited

Legend:

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

    r21630 r21661  
    193193/* Parameters used for cleanup of expired links */
    194194/* NOTE: ALIAS_CLEANUP_INTERVAL_SECS must be less then LINK_TABLE_OUT_SIZE */
    195 #ifndef VBOX
    196 # define ALIAS_CLEANUP_INTERVAL_SECS  64
    197 # define ALIAS_CLEANUP_MAX_SPOKES     (LINK_TABLE_OUT_SIZE/5)
     195#define ALIAS_CLEANUP_INTERVAL_SECS  64
     196#define ALIAS_CLEANUP_MAX_SPOKES     (LINK_TABLE_OUT_SIZE/5)
    198197
    199198/* Timeouts (in seconds) for different link types */
    200 # define ICMP_EXPIRE_TIME             60
    201 # define UDP_EXPIRE_TIME              60
    202 # define PROTO_EXPIRE_TIME            60
    203 # define FRAGMENT_ID_EXPIRE_TIME      10
    204 # define FRAGMENT_PTR_EXPIRE_TIME     30
     199#define ICMP_EXPIRE_TIME             60
     200#define UDP_EXPIRE_TIME              60
     201#define PROTO_EXPIRE_TIME            60
     202#define FRAGMENT_ID_EXPIRE_TIME      10
     203#define FRAGMENT_PTR_EXPIRE_TIME     30
    205204
    206205/* TCP link expire time for different cases */
    207206/* When the link has been used and closed - minimal grace time to
    208207   allow ACKs and potential re-connect in FTP (XXX - is this allowed?)  */
    209 # ifndef TCP_EXPIRE_DEAD
    210 # define TCP_EXPIRE_DEAD           10
    211 # endif
     208#ifndef TCP_EXPIRE_DEAD
     209#define TCP_EXPIRE_DEAD           10
     210#endif
    212211
    213212/* When the link has been used and closed on one side - the other side
    214213   is allowed to still send data */
    215 # ifndef TCP_EXPIRE_SINGLEDEAD
    216 # define TCP_EXPIRE_SINGLEDEAD     90
    217 # endif
     214#ifndef TCP_EXPIRE_SINGLEDEAD
     215#define TCP_EXPIRE_SINGLEDEAD     90
     216#endif
    218217
    219218/* When the link isn't yet up */
    220 # ifndef TCP_EXPIRE_INITIAL
    221 # define TCP_EXPIRE_INITIAL       300
    222 # endif
     219#ifndef TCP_EXPIRE_INITIAL
     220#define TCP_EXPIRE_INITIAL       300
     221#endif
    223222
    224223/* When the link is up */
    225 # ifndef TCP_EXPIRE_CONNECTED
    226 # define TCP_EXPIRE_CONNECTED   86400
    227 # endif
    228 #else /* VBOX */
    229 # define ALIAS_CLEANUP_INTERVAL_SECS  (64 * 1000)
    230 # define ALIAS_CLEANUP_MAX_SPOKES     (LINK_TABLE_OUT_SIZE/5)
    231 
    232 /* Timeouts (in seconds) for different link types */
    233 # define ICMP_EXPIRE_TIME             (60 * 1000)
    234 # define UDP_EXPIRE_TIME              (60 * 1000)
    235 # define PROTO_EXPIRE_TIME            (60 * 1000)
    236 # define FRAGMENT_ID_EXPIRE_TIME      (10 * 1000)
    237 # define FRAGMENT_PTR_EXPIRE_TIME     (30 * 1000)
    238 
    239 /* TCP link expire time for different cases */
    240 /* When the link has been used and closed - minimal grace time to
    241    allow ACKs and potential re-connect in FTP (XXX - is this allowed?)  */
    242 # ifndef TCP_EXPIRE_DEAD
    243 # define TCP_EXPIRE_DEAD           (10 * 1000)
    244 # endif
    245 
    246 /* When the link has been used and closed on one side - the other side
    247    is allowed to still send data */
    248 # ifndef TCP_EXPIRE_SINGLEDEAD
    249 # define TCP_EXPIRE_SINGLEDEAD     (90 * 1000)
    250 # endif
    251 
    252 /* When the link isn't yet up */
    253 # ifndef TCP_EXPIRE_INITIAL
    254 # define TCP_EXPIRE_INITIAL       (300 * 1000)
    255 # endif
    256 
    257 /* When the link is up */
    258 # ifndef TCP_EXPIRE_CONNECTED
    259 # define TCP_EXPIRE_CONNECTED   (86400 * 1000)
    260 # endif
    261 #endif
     224#ifndef TCP_EXPIRE_CONNECTED
     225#define TCP_EXPIRE_CONNECTED   86400
     226#endif
     227
    262228
    263229/* Dummy port number codes used for FindLinkIn/Out() and AddLink().
     
    23052271    int i, n;
    23062272#ifndef VBOX
    2307 # ifndef _KERNEL
     2273#ifndef _KERNEL
    23082274    struct timeval tv;
    23092275    struct timezone tz;
    2310 # endif
     2276#endif
    23112277
    23122278    LIBALIAS_LOCK_ASSERT(la);
     
    23162282     * waste timeline by making system calls.
    23172283     */
    2318 # ifdef  _KERNEL
     2284#ifdef  _KERNEL
    23192285    la->timeStamp = time_uptime;
    2320 # else
     2286#else
    23212287    gettimeofday(&tv, &tz);
    23222288    la->timeStamp = tv.tv_sec;
    2323 # endif
     2289#endif
    23242290#else /* !VBOX */
    23252291    LIBALIAS_LOCK_ASSERT(la);
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