local_ipstack.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // Tencent is pleased to support the open source community by making Mars available.
  2. // Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved.
  3. // Licensed under the MIT License (the "License"); you may not use this file except in
  4. // compliance with the License. You may obtain a copy of the License at
  5. // http://opensource.org/licenses/MIT
  6. // Unless required by applicable law or agreed to in writing, software distributed under the License is
  7. // distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
  8. // either express or implied. See the License for the specific language governing permissions and
  9. // limitations under the License.
  10. //
  11. // IPv6_only.hpp
  12. // comm
  13. //
  14. // Created by yerungui on 16/1/14.
  15. //
  16. #ifndef __ip_type__
  17. #define __ip_type__
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. enum TLocalIPStack {
  22. ELocalIPStack_None = 0,
  23. ELocalIPStack_IPv4 = 1,
  24. ELocalIPStack_IPv6 = 2,
  25. ELocalIPStack_Dual = 3,
  26. };
  27. const char* const TLocalIPStackStr[] = {
  28. "ELocalIPStack_None",
  29. "ELocalIPStack_IPv4",
  30. "ELocalIPStack_IPv6",
  31. "ELocalIPStack_Dual",
  32. };
  33. TLocalIPStack local_ipstack_detect();
  34. #ifdef __cplusplus
  35. }
  36. #endif
  37. #include <string>
  38. TLocalIPStack local_ipstack_detect_log(std::string& _log);
  39. #endif /* __ip_type__ */