Rise
The Vieneo Province
Loading...
Searching...
No Matches
SteamNetworkingIPAddr Struct Reference

#include <steamnetworkingtypes.h>

Classes

struct  IPv4MappedAddress
 RFC4038, section 4.2. More...
union  [union].__unnamed0__

Public Types

enum  { k_cchMaxString = 48 }

Public Member Functions

void Clear ()
bool IsIPv6AllZeros () const
void SetIPv6 (const uint8 *ipv6, uint16 nPort)
void SetIPv4 (uint32 nIP, uint16 nPort)
bool IsIPv4 () const
uint32 GetIPv4 () const
void SetIPv6LocalHost (uint16 nPort=0)
bool IsLocalHost () const
void ToString (char *buf, size_t cbBuf, bool bWithPort) const
bool ParseString (const char *pszStr)
bool operator== (const SteamNetworkingIPAddr &x) const
 See if two addresses are identical.
ESteamNetworkingFakeIPType GetFakeIPType () const
bool IsFakeIP () const
 Return true if we are a FakeIP.

Public Attributes

union  
uint16 m_port

Detailed Description

Store an IP and port. IPv6 is always used; IPv4 is represented using "IPv4-mapped" addresses: IPv4 aa.bb.cc.dd => IPv6 ::ffff:aabb:ccdd (RFC 4291 section 2.5.5.2.)

Definition at line 198 of file steamnetworkingtypes.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
k_cchMaxString 

Definition at line 211 of file steamnetworkingtypes.h.

Member Function Documentation

◆ Clear()

void SteamNetworkingIPAddr::Clear ( )
inline

Definition at line 1899 of file steamnetworkingtypes.h.

◆ GetFakeIPType()

ESteamNetworkingFakeIPType SteamNetworkingIPAddr::GetFakeIPType ( ) const
inline

Classify address as FakeIP. This function never returns k_ESteamNetworkingFakeIPType_Invalid.

Definition at line 493 of file isteamnetworkingutils.h.

Here is the caller graph for this function:

◆ GetIPv4()

uint32 SteamNetworkingIPAddr::GetIPv4 ( ) const
inline

Definition at line 1904 of file steamnetworkingtypes.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsFakeIP()

bool SteamNetworkingIPAddr::IsFakeIP ( ) const
inline

Return true if we are a FakeIP.

Definition at line 249 of file steamnetworkingtypes.h.

Here is the call graph for this function:

◆ IsIPv4()

bool SteamNetworkingIPAddr::IsIPv4 ( ) const
inline

Definition at line 1903 of file steamnetworkingtypes.h.

Here is the caller graph for this function:

◆ IsIPv6AllZeros()

bool SteamNetworkingIPAddr::IsIPv6AllZeros ( ) const
inline

Definition at line 1900 of file steamnetworkingtypes.h.

◆ IsLocalHost()

bool SteamNetworkingIPAddr::IsLocalHost ( ) const
inline

Definition at line 1906 of file steamnetworkingtypes.h.

Here is the call graph for this function:

◆ operator==()

bool SteamNetworkingIPAddr::operator== ( const SteamNetworkingIPAddr & x) const
inline

See if two addresses are identical.

Definition at line 1907 of file steamnetworkingtypes.h.

◆ ParseString()

bool SteamNetworkingIPAddr::ParseString ( const char * pszStr)
inline

Parse an IP address and optional port. If a port is not present, it is set to 0. (This means that you cannot tell if a zero port was explicitly specified.)

Definition at line 492 of file isteamnetworkingutils.h.

◆ SetIPv4()

void SteamNetworkingIPAddr::SetIPv4 ( uint32 nIP,
uint16 nPort )
inline

Definition at line 1902 of file steamnetworkingtypes.h.

◆ SetIPv6()

void SteamNetworkingIPAddr::SetIPv6 ( const uint8 * ipv6,
uint16 nPort )
inline

Definition at line 1901 of file steamnetworkingtypes.h.

◆ SetIPv6LocalHost()

void SteamNetworkingIPAddr::SetIPv6LocalHost ( uint16 nPort = 0)
inline

Definition at line 1905 of file steamnetworkingtypes.h.

◆ ToString()

void SteamNetworkingIPAddr::ToString ( char * buf,
size_t cbBuf,
bool bWithPort ) const
inline

Print to a string, with or without the port. Mapped IPv4 addresses are printed as dotted decimal (12.34.56.78), otherwise this will print the canonical form according to RFC5952. If you include the port, IPv6 will be surrounded by brackets, e.g. [::1:2]:80. Your buffer should be at least k_cchMaxString bytes to avoid truncation

See also SteamNetworkingIdentityRender

Definition at line 491 of file isteamnetworkingutils.h.

Here is the caller graph for this function:

Member Data Documentation

◆ @103077074361012061024133165302221037041213163216

◆ m_port

uint16 SteamNetworkingIPAddr::m_port

Definition at line 239 of file steamnetworkingtypes.h.


The documentation for this struct was generated from the following files: