VirtualBox

Changeset 40018 in vbox for trunk


Ignore:
Timestamp:
Feb 7, 2012 1:05:58 PM (13 years ago)
Author:
vboxsync
Message:

NAT: TCPCB validation macrodefinitions. (DEBUG_vvl)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp/debug.h

    r39360 r40018  
    5151# define TCP_STATE_SWITCH_TO(tp, new_tcp_state) (tp)->t_state = (new_tcp_state)
    5252#endif
     53
     54/* TCP CB state validity macro definitions
     55 * we need to be sure that TCP is in right state.
     56 * TCP_ACCEPTABLE_STATEX(tp, (X-states here))
     57 */
     58#ifdef DEBUG_vvl
     59# define TCP_ACCEPTABLE_STATE1(tp, tcp_state1) Assert(((tp)->t_state == (tcp_state)))
     60# define TCP_ACCEPTABLE_STATE2(tp, tcp_state1, tcp_state2)                          \
     61do {                                                                                \
     62    Assert((   ((tp)->t_state == (tcp_state1))                                      \
     63            || ((tp)->t_state == (tcp_state2))));                                   \
     64} while(0)
     65#else
     66# define TCP_ACCEPTABLE_STATE1(tp, tcp_state1) do { } while(0)
     67# define TCP_ACCEPTABLE_STATE2(tp, tcp_state1, tcp_state2) do { } while(0)
    5368#endif
     69#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