blob: dffdf1299bc892861b4f913592c9bd19e4449d89 [file] [log] [blame]
henrike@webrtc.orgf0488722014-05-13 18:00:261/*
2 * Copyright 2008 The WebRTC Project Authors. All rights reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
Steve Anton10542f22019-01-11 17:11:0011#ifndef RTC_BASE_NET_HELPERS_H_
12#define RTC_BASE_NET_HELPERS_H_
henrike@webrtc.orgf0488722014-05-13 18:00:2613
Henrik Kjellanderec78f1c2017-06-29 05:52:5014#if defined(WEBRTC_POSIX)
Jeremy Leconte83d1f9a2024-09-10 07:47:4915#include <sys/socket.h> // IWYU pragma: export
Henrik Kjellanderec78f1c2017-06-29 05:52:5016#elif WEBRTC_WIN
17#include <winsock2.h> // NOLINT
Mirko Bonadeie5f4c6b2021-01-15 09:41:0118
19#include "rtc_base/win32.h"
Henrik Kjellanderec78f1c2017-06-29 05:52:5020#endif
henrike@webrtc.orgf0488722014-05-13 18:00:2621
Ali Tofigh2ab914c2022-04-13 10:55:1522#include "absl/strings/string_view.h"
Mirko Bonadei62ba3792023-01-20 17:32:0723#include "rtc_base/system/rtc_export.h"
Ali Tofigh2ab914c2022-04-13 10:55:1524
Henrik Kjellanderec78f1c2017-06-29 05:52:5025namespace rtc {
26
Henrik Kjellanderec78f1c2017-06-29 05:52:5027// rtc namespaced wrappers for inet_ntop and inet_pton so we can avoid
28// the windows-native versions of these.
Yves Gerey665174f2018-06-19 13:03:0529const char* inet_ntop(int af, const void* src, char* dst, socklen_t size);
Ali Tofigh2ab914c2022-04-13 10:55:1530int inet_pton(int af, absl::string_view src, void* dst);
Henrik Kjellanderec78f1c2017-06-29 05:52:5031
Henrik Kjellanderec78f1c2017-06-29 05:52:5032} // namespace rtc
henrike@webrtc.orgf0488722014-05-13 18:00:2633
Steve Anton10542f22019-01-11 17:11:0034#endif // RTC_BASE_NET_HELPERS_H_