| 793 | namespace { |
| 794 | |
| 795 | bool expected_kind(const NetworkAddress& value, |
| 796 | ConfigStoreImpl::NetworkAddressKind kind) |
| 797 | { |
| 798 | switch (kind) { |
| 799 | case ConfigStoreImpl::Kind_ANY: |
| 800 | return value.get_type() == AF_INET |
| 801 | #ifdef ACE_HAS_IPV6 |
| 802 | || value.get_type() == AF_INET6 |
| 803 | #endif |
| 804 | ; |
| 805 | case ConfigStoreImpl::Kind_IPV4: |
| 806 | return value.get_type() == AF_INET; |
| 807 | #ifdef ACE_HAS_IPV6 |
| 808 | case ConfigStoreImpl::Kind_IPV6: |
| 809 | return value.get_type() == AF_INET6; |
| 810 | #endif |
| 811 | } |
| 812 | |
| 813 | return false; |
| 814 | } |
| 815 | |
| 816 | } |
| 817 | |