1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef NET_SOCKET_SOCKET_NET_LOG_PARAMS_H_
6 #define NET_SOCKET_SOCKET_NET_LOG_PARAMS_H_
8 #include "net/base/sys_addrinfo.h"
9 #include "net/log/net_log.h"
16 // Creates a NetLog callback for socket error events.
17 NetLog::ParametersCallback
CreateNetLogSocketErrorCallback(int net_error
,
20 // Creates a NetLog callback for a HostPortPair.
21 // |host_and_port| must remain valid for the lifetime of the returned callback.
22 NetLog::ParametersCallback
CreateNetLogHostPortPairCallback(
23 const HostPortPair
* host_and_port
);
25 // Creates a NetLog callback for an IPEndPoint.
26 // |address| must remain valid for the lifetime of the returned callback.
27 NetLog::ParametersCallback
CreateNetLogIPEndPointCallback(
28 const IPEndPoint
* address
);
30 // Creates a NetLog callback for the source sockaddr on connect events.
31 // |net_address| must remain valid for the lifetime of the returned callback.
32 NetLog::ParametersCallback
CreateNetLogSourceAddressCallback(
33 const struct sockaddr
* net_address
,
34 socklen_t address_len
);
38 #endif // NET_SOCKET_SOCKET_NET_LOG_PARAMS_H_