----------------------------------------------------------------------------- Purpose: Does this object have an IP value set -----------------------------------------------------------------------------
| 129 | // Purpose: Does this object have an IP value set |
| 130 | //----------------------------------------------------------------------------- |
| 131 | bool CIPAddress::HasIP() const |
| 132 | { |
| 133 | switch ( m_usType ) |
| 134 | { |
| 135 | default: |
| 136 | Assert( false ); |
| 137 | // FALLTHROUGH |
| 138 | case k_EIPTypeInvalid: |
| 139 | return false; |
| 140 | case k_EIPTypeV4: |
| 141 | if ( m_unIPv4 == 0 ) |
| 142 | return false; |
| 143 | break; |
| 144 | case k_EIPTypeV6: |
| 145 | if ( m_ipv6Qword[0] == 0 && m_ipv6Qword[1] == 0 ) |
| 146 | return false; |
| 147 | break; |
| 148 | } |
| 149 | |
| 150 | return true; |
| 151 | } |
| 152 | |
| 153 | //----------------------------------------------------------------------------- |
| 154 | // Purpose: Compare this IP address with another for equality |
no outgoing calls
no test coverage detected