VirtualBox

Changeset 61202 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 26, 2016 1:57:33 AM (9 years ago)
Author:
vboxsync
Message:

NAT: Missed part of r107489 - provide more convenience macros.

File:
1 edited

Legend:

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

    r61198 r61202  
    2727#define CTL_BROADCAST   255
    2828
     29
     30#define CTL_CHECK_NETWORK(x) (((x) & RT_H2N_U32(pData->netmask)) == pData->special_addr.s_addr)
     31
    2932#define CTL_CHECK(x, ctl) (   ((RT_N2H_U32((x)) & ~pData->netmask) == (ctl)) \
    30                            && (((x) & RT_H2N_U32(pData->netmask)) == pData->special_addr.s_addr))
     33                           && CTL_CHECK_NETWORK(x))
     34
     35#define CTL_CHECK_MINE(x) (   CTL_CHECK(x, CTL_ALIAS)      \
     36                           || CTL_CHECK(x, CTL_DNS)        \
     37                           || CTL_CHECK(x, CTL_TFTP))
     38
     39#define CTL_CHECK_BROADCAST(x) CTL_CHECK((x), ~pData->netmask)
     40
    3141
    3242#endif /* _SLIRP_CTL_H_ */
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