webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Classes | Namespaces | Macros | Typedefs | Functions | Variables
winping.cc File Reference
#include "webrtc/base/winping.h"
#include <Iphlpapi.h>
#include <algorithm>
#include "webrtc/base/byteorder.h"
#include "webrtc/base/checks.h"
#include "webrtc/base/ipaddress.h"
#include "webrtc/base/logging.h"
#include "webrtc/base/nethelpers.h"
#include "webrtc/base/socketaddress.h"

Classes

struct  rtc::icmp_echo_reply
 
struct  rtc::icmpv6_echo_reply_lh
 

Namespaces

 rtc
 

Macros

#define IP_STATUS_BASE   11000
 
#define IP_SUCCESS   0
 
#define IP_BUF_TOO_SMALL   (IP_STATUS_BASE + 1)
 
#define IP_DEST_NET_UNREACHABLE   (IP_STATUS_BASE + 2)
 
#define IP_DEST_HOST_UNREACHABLE   (IP_STATUS_BASE + 3)
 
#define IP_DEST_PROT_UNREACHABLE   (IP_STATUS_BASE + 4)
 
#define IP_DEST_PORT_UNREACHABLE   (IP_STATUS_BASE + 5)
 
#define IP_NO_RESOURCES   (IP_STATUS_BASE + 6)
 
#define IP_BAD_OPTION   (IP_STATUS_BASE + 7)
 
#define IP_HW_ERROR   (IP_STATUS_BASE + 8)
 
#define IP_PACKET_TOO_BIG   (IP_STATUS_BASE + 9)
 
#define IP_REQ_TIMED_OUT   (IP_STATUS_BASE + 10)
 
#define IP_BAD_REQ   (IP_STATUS_BASE + 11)
 
#define IP_BAD_ROUTE   (IP_STATUS_BASE + 12)
 
#define IP_TTL_EXPIRED_TRANSIT   (IP_STATUS_BASE + 13)
 
#define IP_TTL_EXPIRED_REASSEM   (IP_STATUS_BASE + 14)
 
#define IP_PARAM_PROBLEM   (IP_STATUS_BASE + 15)
 
#define IP_SOURCE_QUENCH   (IP_STATUS_BASE + 16)
 
#define IP_OPTION_TOO_BIG   (IP_STATUS_BASE + 17)
 
#define IP_BAD_DESTINATION   (IP_STATUS_BASE + 18)
 
#define IP_ADDR_DELETED   (IP_STATUS_BASE + 19)
 
#define IP_SPEC_MTU_CHANGE   (IP_STATUS_BASE + 20)
 
#define IP_MTU_CHANGE   (IP_STATUS_BASE + 21)
 
#define IP_UNLOAD   (IP_STATUS_BASE + 22)
 
#define IP_ADDR_ADDED   (IP_STATUS_BASE + 23)
 
#define IP_MEDIA_CONNECT   (IP_STATUS_BASE + 24)
 
#define IP_MEDIA_DISCONNECT   (IP_STATUS_BASE + 25)
 
#define IP_BIND_ADAPTER   (IP_STATUS_BASE + 26)
 
#define IP_UNBIND_ADAPTER   (IP_STATUS_BASE + 27)
 
#define IP_DEVICE_DOES_NOT_EXIST   (IP_STATUS_BASE + 28)
 
#define IP_DUPLICATE_ADDRESS   (IP_STATUS_BASE + 29)
 
#define IP_INTERFACE_METRIC_CHANGE   (IP_STATUS_BASE + 30)
 
#define IP_RECONFIG_SECFLTR   (IP_STATUS_BASE + 31)
 
#define IP_NEGOTIATING_IPSEC   (IP_STATUS_BASE + 32)
 
#define IP_INTERFACE_WOL_CAPABILITY_CHANGE   (IP_STATUS_BASE + 33)
 
#define IP_DUPLICATE_IPADD   (IP_STATUS_BASE + 34)
 
#define IP_GENERAL_FAILURE   (IP_STATUS_BASE + 50)
 
#define MAX_IP_STATUS   IP_GENERAL_FAILURE
 
#define IP_PENDING   (IP_STATUS_BASE + 255)
 
#define IP_FLAG_DF   0x2
 
#define IP_OPT_EOL   0
 
#define IP_OPT_NOP   1
 
#define IP_OPT_SECURITY   0x82
 
#define IP_OPT_LSRR   0x83
 
#define IP_OPT_SSRR   0x89
 
#define IP_OPT_RR   0x7
 
#define IP_OPT_TS   0x44
 
#define IP_OPT_SID   0x88
 
#define IP_OPT_ROUTER_ALERT   0x94
 
#define MAX_OPT_SIZE   40
 

Typedefs

typedef struct rtc::icmp_echo_reply rtc::ICMP_ECHO_REPLY
 
typedef struct rtc::icmp_echo_replyrtc::PICMP_ECHO_REPLY
 
typedef struct rtc::icmpv6_echo_reply_lh rtc::ICMPV6_ECHO_REPLY
 
typedef struct rtc::icmpv6_echo_reply_lhrtc::PICMPV6_ECHO_REPLY
 

Functions

uint32_t rtc::ReplySize (uint32_t data_size, int family)
 

Variables

const char *const rtc::ICMP_DLL_NAME = "Iphlpapi.dll"
 
const char *const rtc::ICMP_CREATE_FUNC = "IcmpCreateFile"
 
const char *const rtc::ICMP_CLOSE_FUNC = "IcmpCloseHandle"
 
const char *const rtc::ICMP_SEND_FUNC = "IcmpSendEcho"
 
const char *const rtc::ICMP6_CREATE_FUNC = "Icmp6CreateFile"
 
const char *const rtc::ICMP6_SEND_FUNC = "Icmp6SendEcho2"
 

Macro Definition Documentation

◆ IP_ADDR_ADDED

#define IP_ADDR_ADDED   (IP_STATUS_BASE + 23)

◆ IP_ADDR_DELETED

#define IP_ADDR_DELETED   (IP_STATUS_BASE + 19)

◆ IP_BAD_DESTINATION

#define IP_BAD_DESTINATION   (IP_STATUS_BASE + 18)

◆ IP_BAD_OPTION

#define IP_BAD_OPTION   (IP_STATUS_BASE + 7)

◆ IP_BAD_REQ

#define IP_BAD_REQ   (IP_STATUS_BASE + 11)

◆ IP_BAD_ROUTE

#define IP_BAD_ROUTE   (IP_STATUS_BASE + 12)

◆ IP_BIND_ADAPTER

#define IP_BIND_ADAPTER   (IP_STATUS_BASE + 26)

◆ IP_BUF_TOO_SMALL

#define IP_BUF_TOO_SMALL   (IP_STATUS_BASE + 1)

◆ IP_DEST_HOST_UNREACHABLE

#define IP_DEST_HOST_UNREACHABLE   (IP_STATUS_BASE + 3)

◆ IP_DEST_NET_UNREACHABLE

#define IP_DEST_NET_UNREACHABLE   (IP_STATUS_BASE + 2)

◆ IP_DEST_PORT_UNREACHABLE

#define IP_DEST_PORT_UNREACHABLE   (IP_STATUS_BASE + 5)

◆ IP_DEST_PROT_UNREACHABLE

#define IP_DEST_PROT_UNREACHABLE   (IP_STATUS_BASE + 4)

◆ IP_DEVICE_DOES_NOT_EXIST

#define IP_DEVICE_DOES_NOT_EXIST   (IP_STATUS_BASE + 28)

◆ IP_DUPLICATE_ADDRESS

#define IP_DUPLICATE_ADDRESS   (IP_STATUS_BASE + 29)

◆ IP_DUPLICATE_IPADD

#define IP_DUPLICATE_IPADD   (IP_STATUS_BASE + 34)

◆ IP_FLAG_DF

#define IP_FLAG_DF   0x2

◆ IP_GENERAL_FAILURE

#define IP_GENERAL_FAILURE   (IP_STATUS_BASE + 50)

◆ IP_HW_ERROR

#define IP_HW_ERROR   (IP_STATUS_BASE + 8)

◆ IP_INTERFACE_METRIC_CHANGE

#define IP_INTERFACE_METRIC_CHANGE   (IP_STATUS_BASE + 30)

◆ IP_INTERFACE_WOL_CAPABILITY_CHANGE

#define IP_INTERFACE_WOL_CAPABILITY_CHANGE   (IP_STATUS_BASE + 33)

◆ IP_MEDIA_CONNECT

#define IP_MEDIA_CONNECT   (IP_STATUS_BASE + 24)

◆ IP_MEDIA_DISCONNECT

#define IP_MEDIA_DISCONNECT   (IP_STATUS_BASE + 25)

◆ IP_MTU_CHANGE

#define IP_MTU_CHANGE   (IP_STATUS_BASE + 21)

◆ IP_NEGOTIATING_IPSEC

#define IP_NEGOTIATING_IPSEC   (IP_STATUS_BASE + 32)

◆ IP_NO_RESOURCES

#define IP_NO_RESOURCES   (IP_STATUS_BASE + 6)

◆ IP_OPT_EOL

#define IP_OPT_EOL   0

◆ IP_OPT_LSRR

#define IP_OPT_LSRR   0x83

◆ IP_OPT_NOP

#define IP_OPT_NOP   1

◆ IP_OPT_ROUTER_ALERT

#define IP_OPT_ROUTER_ALERT   0x94

◆ IP_OPT_RR

#define IP_OPT_RR   0x7

◆ IP_OPT_SECURITY

#define IP_OPT_SECURITY   0x82

◆ IP_OPT_SID

#define IP_OPT_SID   0x88

◆ IP_OPT_SSRR

#define IP_OPT_SSRR   0x89

◆ IP_OPT_TS

#define IP_OPT_TS   0x44

◆ IP_OPTION_TOO_BIG

#define IP_OPTION_TOO_BIG   (IP_STATUS_BASE + 17)

◆ IP_PACKET_TOO_BIG

#define IP_PACKET_TOO_BIG   (IP_STATUS_BASE + 9)

◆ IP_PARAM_PROBLEM

#define IP_PARAM_PROBLEM   (IP_STATUS_BASE + 15)

◆ IP_PENDING

#define IP_PENDING   (IP_STATUS_BASE + 255)

◆ IP_RECONFIG_SECFLTR

#define IP_RECONFIG_SECFLTR   (IP_STATUS_BASE + 31)

◆ IP_REQ_TIMED_OUT

#define IP_REQ_TIMED_OUT   (IP_STATUS_BASE + 10)

◆ IP_SOURCE_QUENCH

#define IP_SOURCE_QUENCH   (IP_STATUS_BASE + 16)

◆ IP_SPEC_MTU_CHANGE

#define IP_SPEC_MTU_CHANGE   (IP_STATUS_BASE + 20)

◆ IP_STATUS_BASE

#define IP_STATUS_BASE   11000

◆ IP_SUCCESS

#define IP_SUCCESS   0

◆ IP_TTL_EXPIRED_REASSEM

#define IP_TTL_EXPIRED_REASSEM   (IP_STATUS_BASE + 14)

◆ IP_TTL_EXPIRED_TRANSIT

#define IP_TTL_EXPIRED_TRANSIT   (IP_STATUS_BASE + 13)

◆ IP_UNBIND_ADAPTER

#define IP_UNBIND_ADAPTER   (IP_STATUS_BASE + 27)

◆ IP_UNLOAD

#define IP_UNLOAD   (IP_STATUS_BASE + 22)

◆ MAX_IP_STATUS

#define MAX_IP_STATUS   IP_GENERAL_FAILURE

◆ MAX_OPT_SIZE

#define MAX_OPT_SIZE   40