#pragma once
#include <string>
#include <cstdint>
enum {
ERROR_NET_NO_SPACE = 0x80410001,
ERROR_NET_INTERNAL = 0x80410002,
ERROR_NET_INVALID_ARG = 0x80410003,
ERROR_NET_NO_ENTRY = 0x80410004,
ERROR_NET_CORE_NOT_TERMINATED = 0x80410101,
ERROR_NET_CORE_INTERFACE_BUSY = 0x80410102,
ERROR_NET_CORE_INVALID_ARG = 0x80410103,
ERROR_NET_CORE_THREAD_NOT_FOUND = 0x80410104,
ERROR_NET_CORE_THREAD_BUSY = 0x80410105,
ERROR_NET_CORE_80211_NO_BSS = 0x80410106,
ERROR_NET_CORE_80211_NO_AVAIL_BSS = 0x80410107,
ERROR_NET_POECLIENT_INIT = 0x80410301,
ERROR_NET_POECLIENT_NO_PADO = 0x80410302,
ERROR_NET_POECLIENT_NO_PADS = 0x80410303,
ERROR_NET_POECLIENT_GET_PADT = 0x80410304,
ERROR_NET_POECLIENT_SERVICE_NAME = 0x80410305,
ERROR_NET_POECLIENT_AC_SYSTEM = 0x80410306,
ERROR_NET_POECLIENT_GENERIC = 0x80410307,
ERROR_NET_POECLIENT_AUTH = 0x80410308,
ERROR_NET_POECLIENT_NETWORK = 0x80410309,
ERROR_NET_POECLIENT_TERMINATE = 0x8041030a,
ERROR_NET_POECLIENT_NOT_STARTED = 0x8041030b,
ERROR_NET_DHCP_INVALID_PACKET = 0x80410501,
ERROR_NET_DHCP_NO_SERVER = 0x80410502,
ERROR_NET_DHCP_SENT_DECLINE = 0x80410503,
ERROR_NET_DHCP_LEASE_TIME = 0x80410504,
ERROR_NET_DHCP_GET_NAK = 0x80410505,
ERROR_NET_WLAN_ALREADY_JOINED = 0x80410d01,
ERROR_NET_WLAN_TRY_JOIN = 0x80410d02,
ERROR_NET_WLAN_SCANNING = 0x80410d03,
ERROR_NET_WLAN_INVALID_PARAMETER = 0x80410d04,
ERROR_NET_WLAN_NOT_SUPPORTED = 0x80410d05,
ERROR_NET_WLAN_NOT_JOIN_BSS = 0x80410d06,
ERROR_NET_WLAN_ASSOC_TIMEOUT = 0x80410d07,
ERROR_NET_WLAN_ASSOC_REFUSED = 0x80410d08,
ERROR_NET_WLAN_ASSOC_FAIL = 0x80410d09,
ERROR_NET_WLAN_DISASSOC_FAIL = 0x80410d0a,
ERROR_NET_WLAN_JOIN_FAIL = 0x80410d0b,
ERROR_NET_WLAN_POWER_OFF = 0x80410d0c,
ERROR_NET_WLAN_INTERNAL_FAIL = 0x80410d0d,
ERROR_NET_WLAN_DEVICE_NOT_READY = 0x80410d0e,
ERROR_NET_WLAN_ALREADY_ATTACHED = 0x80410d0f,
ERROR_NET_WLAN_NOT_SET_WEP = 0x80410d10,
ERROR_NET_WLAN_TIMEOUT = 0x80410d11,
ERROR_NET_WLAN_NO_SPACE = 0x80410d12,
ERROR_NET_WLAN_INVALID_ARG = 0x80410D13,
ERROR_NET_WLAN_NOT_IN_GAMEMODE = 0x80410d14,
ERROR_NET_WLAN_LEAVE_FAIL = 0x80410d15,
ERROR_NET_WLAN_SUSPENDED = 0x80410d16,
};
#define PSP_NET_INET_SOCK_STREAM 1
#define PSP_NET_INET_SOCK_DGRAM 2
#define PSP_NET_INET_SOCK_RAW 3
#define PSP_NET_INET_SOCK_RDM 4
#define PSP_NET_INET_SOCK_SEQPACKET 5
#define PSP_NET_INET_SOCK_CONN_DGRAM 6
#define PSP_NET_INET_SOCK_DCCP PSP_NET_INET_SOCK_CONN_DGRAM
#define PSP_NET_INET_SOCK_PACKET 10
#define PSP_NET_INET_SOCK_TYPE_MASK 0x000F
#define PSP_NET_INET_SOCK_CLOEXEC 0x10000000
#define PSP_NET_INET_SOCK_NONBLOCK 0x20000000
#define PSP_NET_INET_SOCK_NOSIGPIPE 0x40000000
#define PSP_NET_INET_SOCK_FLAGS_MASK 0xf0000000
#define PSP_NET_INET_SO_DEBUG 0x0001
#define PSP_NET_INET_SO_ACCEPTCONN 0x0002
#define PSP_NET_INET_SO_REUSEADDR 0x0004
#define PSP_NET_INET_SO_KEEPALIVE 0x0008
#define PSP_NET_INET_SO_DONTROUTE 0x0010
#define PSP_NET_INET_SO_BROADCAST 0x0020
#define PSP_NET_INET_SO_USELOOPBACK 0x0040
#define PSP_NET_INET_SO_LINGER 0x0080
#define PSP_NET_INET_SO_OOBINLINE 0x0100
#define PSP_NET_INET_SO_REUSEPORT 0x0200
#define PSP_NET_INET_SO_TIMESTAMP 0x0400
#define PSP_NET_INET_SO_ONESBCAST 0x0800
#define PSP_NET_INET_SO_SNDBUF 0x1001
#define PSP_NET_INET_SO_RCVBUF 0x1002
#define PSP_NET_INET_SO_SNDLOWAT 0x1003
#define PSP_NET_INET_SO_RCVLOWAT 0x1004
#define PSP_NET_INET_SO_SNDTIMEO 0x1005
#define PSP_NET_INET_SO_RCVTIMEO 0x1006
#define PSP_NET_INET_SO_ERROR 0x1007
#define PSP_NET_INET_SO_TYPE 0x1008
#define PSP_NET_INET_SO_NBIO 0x1009
#define PSP_NET_INET_SO_BIO 0x100a
#define PSP_NET_INET_SO_NOSIGPIPE 0x1022
#define PSP_NET_INET_TCP_NODELAY 0x01
#define PSP_NET_INET_TCP_MAXSEG 0x02
#define PSP_NET_INET_IP_OPTIONS 1
#define PSP_NET_INET_IP_HDRINCL 2
#define PSP_NET_INET_IP_TOS 3
#define PSP_NET_INET_IP_TTL 4
#define PSP_NET_INET_IP_RECVOPTS 5
#define PSP_NET_INET_IP_RECVRETOPTS 6
#define PSP_NET_INET_IP_RECVDSTADDR 7
#define PSP_NET_INET_IP_RETOPTS 8
#define PSP_NET_INET_IP_MULTICAST_IF 9
#define PSP_NET_INET_IP_MULTICAST_TTL 10
#define PSP_NET_INET_IP_MULTICAST_LOOP 11
#define PSP_NET_INET_IP_ADD_MEMBERSHIP 12
#define PSP_NET_INET_IP_DROP_MEMBERSHIP 13
#define PSP_NET_INET_IP_PORTRANGE 19
#define PSP_NET_INET_IP_RECVIF 20
#define PSP_NET_INET_IP_ERRORMTU 21
#define PSP_NET_INET_IP_IPSEC_POLICY 22
#define PSP_NET_INET_SOL_SOCKET 0xffff
#define PSP_NET_INET_SCM_RIGHTS 0x01
#define PSP_NET_INET_SCM_CREDS 0x04
#define PSP_NET_INET_SCM_TIMESTAMP 0x08
#define PSP_NET_INET_IPPROTO_IP 0
#define PSP_NET_INET_IPPROTO_HOPOPTS 0
#define PSP_NET_INET_IPPROTO_UNSPEC 0
#define PSP_NET_INET_IPPROTO_ICMP 1
#define PSP_NET_INET_IPPROTO_IGMP 2
#define PSP_NET_INET_IPPROTO_GGP 3
#define PSP_NET_INET_IPPROTO_IPV4 4
#define PSP_NET_INET_IPPROTO_IPIP 4
#define PSP_NET_INET_IPPROTO_TCP 6
#define PSP_NET_INET_IPPROTO_EGP 8
#define PSP_NET_INET_IPPROTO_PUP 12
#define PSP_NET_INET_IPPROTO_UDP 17
#define PSP_NET_INET_IPPROTO_IDP 22
#define PSP_NET_INET_IPPROTO_TP 29
#define PSP_NET_INET_IPPROTO_IPV6 41
#define PSP_NET_INET_IPPROTO_ROUTING 43
#define PSP_NET_INET_IPPROTO_FRAGMENT 44
#define PSP_NET_INET_IPPROTO_RSVP 46
#define PSP_NET_INET_IPPROTO_GRE 47
#define PSP_NET_INET_IPPROTO_ESP 50
#define PSP_NET_INET_IPPROTO_AH 51
#define PSP_NET_INET_IPPROTO_MOBILE 55
#define PSP_NET_INET_IPPROTO_IPV6_ICMP 58
#define PSP_NET_INET_IPPROTO_ICMPV6 58
#define PSP_NET_INET_IPPROTO_NONE 59
#define PSP_NET_INET_IPPROTO_DSTOPTS 60
#define PSP_NET_INET_IPPROTO_EON 80
#define PSP_NET_INET_IPPROTO_ENCAP 98
#define PSP_NET_INET_IPPROTO_PIM 103
#define PSP_NET_INET_IPPROTO_IPCOMP 108
#define PSP_NET_INET_IPPROTO_RAW 255
#define PSP_NET_INET_IPPROTO_MAX 256
#define PSP_NET_INET_IPPROTO_DONE 257
#define PSP_NET_INET_AF_UNSPEC 0
#define PSP_NET_INET_AF_LOCAL 1
#define PSP_NET_INET_AF_UNIX PSP_NET_INET_AF_LOCAL
#define PSP_NET_INET_AF_INET 2
#define PSP_NET_INET_AF_IMPLINK 3
#define PSP_NET_INET_AF_PUP 4
#define PSP_NET_INET_AF_CHAOS 5
#define PSP_NET_INET_AF_NS 6
#define PSP_NET_INET_AF_ISO 7
#define PSP_NET_INET_AF_OSI PSP_NET_INET_AF_ISO
#define PSP_NET_INET_AF_ECMA 8
#define PSP_NET_INET_AF_DATAKIT 9
#define PSP_NET_INET_AF_CCITT 10
#define PSP_NET_INET_AF_SNA 11
#define PSP_NET_INET_AF_DECnet 12
#define PSP_NET_INET_AF_DLI 13
#define PSP_NET_INET_AF_LAT 14
#define PSP_NET_INET_AF_HYLINK 15
#define PSP_NET_INET_AF_APPLETALK 16
#define PSP_NET_INET_AF_ROUTE 17
#define PSP_NET_INET_AF_LINK 18
#define PSP_NET_INET_AF_COIP 20
#define PSP_NET_INET_AF_CNT 21
#define PSP_NET_INET_AF_IPX 23
#define PSP_NET_INET_AF_INET6 24
#define PSP_NET_INET_AF_ISDN 26
#define PSP_NET_INET_AF_E164 PSP_NET_INET_AF_ISDN
#define PSP_NET_INET_AF_NATM 27
#define PSP_NET_INET_AF_ARP 28
#define PSP_NET_INET_AF_MAX 31
#define ERROR_INET_EINTR 4
#define ERROR_INET_EBADF 9
#define ERROR_INET_EAGAIN 11
#define ERROR_INET_EWOULDBLOCK ERROR_INET_EAGAIN
#define ERROR_INET_EACCES 13
#define ERROR_INET_EFAULT 14
#define ERROR_INET_EINVAL 22
#define ERROR_INET_ENOSPC 28
#define ERROR_INET_EPIPE 32
#define ERROR_INET_ENOMSG 35
#define ERROR_INET_ENOLINK 67
#define ERROR_INET_EPROTO 71
#define ERROR_INET_EBADMSG 77
#define ERROR_INET_EOPNOTSUPP 95
#define ERROR_INET_EPFNOSUPPORT 96
#define ERROR_INET_ECONNRESET 104
#define ERROR_INET_ENOBUFS 105
#define ERROR_INET_EAFNOSUPPORT 106
#define ERROR_INET_EPROTOTYPE 107
#define ERROR_INET_ENOTSOCK 108
#define ERROR_INET_ENOPROTOOPT 109
#define ERROR_INET_ESHUTDOWN 110
#define ERROR_INET_ECONNREFUSED 111
#define ERROR_INET_EADDRINUSE 112
#define ERROR_INET_ECONNABORTED 113
#define ERROR_INET_ENETUNREACH 114
#define ERROR_INET_ENETDOWN 115
#define ERROR_INET_ETIMEDOUT 116
#define ERROR_INET_EHOSTDOWN 117
#define ERROR_INET_EHOSTUNREACH 118
#define ERROR_INET_EINPROGRESS 119
#define ERROR_INET_EALREADY 120
#define ERROR_INET_EDESTADDRREQ 121
#define ERROR_INET_EMSGSIZE 122
#define ERROR_INET_EPROTONOSUPPORT 123
#define ERROR_INET_ESOCKTNOSUPPORT 124
#define ERROR_INET_EADDRNOTAVAIL 125
#define ERROR_INET_ENETRESET 126
#define ERROR_INET_EISCONN 127
#define ERROR_INET_ENOTCONN 128
#define ERROR_INET_ETOOMANYREFS 129
#define ERROR_INET_ENOTSUP 134
#define PSP_NET_INET_SOMAXCONN 128
#define PSP_NET_INET_MSG_OOB 0x1
#define PSP_NET_INET_MSG_PEEK 0x2
#define PSP_NET_INET_MSG_DONTROUTE 0x4
#define PSP_NET_INET_MSG_EOR 0x8
#define PSP_NET_INET_MSG_TRUNC 0x10
#define PSP_NET_INET_MSG_CTRUNC 0x20
#define PSP_NET_INET_MSG_WAITALL 0x40
#define PSP_NET_INET_MSG_DONTWAIT 0x80
#define PSP_NET_INET_MSG_BCAST 0x100
#define PSP_NET_INET_MSG_MCAST 0x200
#define INET_POLLIN 0x001
#define INET_POLLPRI 0x002
#define INET_POLLOUT 0x004
#define INET_POLLRDNORM 0x040
#define INET_POLLWRNORM 0x100
#define INET_POLLRDBAND 0x080
#define INET_POLLWRBAND 0x200
#define INET_POLLERR 0x008
#define INET_POLLHUP 0x010
#define INET_POLLNVAL 0x020
#define PSP_NET_INET_SHUT_RD 0
#define PSP_NET_INET_SHUT_WR 1
#define PSP_NET_INET_SHUT_RDWR 2
#ifndef SHUT_RD
#define SHUT_RD SD_RECEIVE
#endif
#ifndef SHUT_WR
#define SHUT_WR SD_SEND
#endif
#ifndef SHUT_RDWR
#define SHUT_RDWR SD_BOTH
#endif
enum {
SCE_NET_ERROR_EPERM = 0x80410101,
SCE_NET_ERROR_ENOENT = 0x80410102,
SCE_NET_ERROR_ESRCH = 0x80410103,
SCE_NET_ERROR_EINTR = 0x80410104,
SCE_NET_ERROR_EIO = 0x80410105,
SCE_NET_ERROR_ENXIO = 0x80410106,
SCE_NET_ERROR_E2BIG = 0x80410107,
SCE_NET_ERROR_ENOEXEC = 0x80410108,
SCE_NET_ERROR_EBADF = 0x80410109,
SCE_NET_ERROR_ECHILD = 0x8041010A,
SCE_NET_ERROR_EDEADLK = 0x8041010B,
SCE_NET_ERROR_ENOMEM = 0x8041010C,
SCE_NET_ERROR_EACCES = 0x8041010D,
SCE_NET_ERROR_EFAULT = 0x8041010E,
SCE_NET_ERROR_ENOTBLK = 0x8041010F,
SCE_NET_ERROR_EBUSY = 0x80410110,
SCE_NET_ERROR_EEXIST = 0x80410111,
SCE_NET_ERROR_EXDEV = 0x80410112,
SCE_NET_ERROR_ENODEV = 0x80410113,
SCE_NET_ERROR_ENOTDIR = 0x80410114,
SCE_NET_ERROR_EISDIR = 0x80410115,
SCE_NET_ERROR_EINVAL = 0x80410116,
SCE_NET_ERROR_ENFILE = 0x80410117,
SCE_NET_ERROR_EMFILE = 0x80410118,
SCE_NET_ERROR_ENOTTY = 0x80410119,
SCE_NET_ERROR_ETXTBSY = 0x8041011A,
SCE_NET_ERROR_EFBIG = 0x8041011B,
SCE_NET_ERROR_ENOSPC = 0x8041011C,
SCE_NET_ERROR_ESPIPE = 0x8041011D,
SCE_NET_ERROR_EROFS = 0x8041011E,
SCE_NET_ERROR_EMLINK = 0x8041011F,
SCE_NET_ERROR_EPIPE = 0x80410120,
SCE_NET_ERROR_EDOM = 0x80410121,
SCE_NET_ERROR_ERANGE = 0x80410122,
SCE_NET_ERROR_EAGAIN = 0x80410123,
SCE_NET_ERROR_EWOULDBLOCK = 0x80410123,
SCE_NET_ERROR_EINPROGRESS = 0x80410124,
SCE_NET_ERROR_EALREADY = 0x80410125,
SCE_NET_ERROR_ENOTSOCK = 0x80410126,
SCE_NET_ERROR_EDESTADDRREQ = 0x80410127,
SCE_NET_ERROR_EMSGSIZE = 0x80410128,
SCE_NET_ERROR_EPROTOTYPE = 0x80410129,
SCE_NET_ERROR_ENOPROTOOPT = 0x8041012A,
SCE_NET_ERROR_EPROTONOSUPPORT = 0x8041012B,
SCE_NET_ERROR_ESOCKTNOSUPPORT = 0x8041012C,
SCE_NET_ERROR_EOPNOTSUPP = 0x8041012D,
SCE_NET_ERROR_EPFNOSUPPORT = 0x8041012E,
SCE_NET_ERROR_EAFNOSUPPORT = 0x8041012F,
SCE_NET_ERROR_EADDRINUSE = 0x80410130,
SCE_NET_ERROR_EADDRNOTAVAIL = 0x80410131,
SCE_NET_ERROR_ENETDOWN = 0x80410132,
SCE_NET_ERROR_ENETUNREACH = 0x80410133,
SCE_NET_ERROR_ENETRESET = 0x80410134,
SCE_NET_ERROR_ECONNABORTED = 0x80410135,
SCE_NET_ERROR_ECONNRESET = 0x80410136,
SCE_NET_ERROR_ENOBUFS = 0x80410137,
SCE_NET_ERROR_EISCONN = 0x80410138,
SCE_NET_ERROR_ENOTCONN = 0x80410139,
SCE_NET_ERROR_ESHUTDOWN = 0x8041013A,
SCE_NET_ERROR_ETOOMANYREFS = 0x8041013B,
SCE_NET_ERROR_ETIMEDOUT = 0x8041013C,
SCE_NET_ERROR_ECONNREFUSED = 0x8041013D,
SCE_NET_ERROR_ELOOP = 0x8041013E,
SCE_NET_ERROR_ENAMETOOLONG = 0x8041013F,
SCE_NET_ERROR_EHOSTDOWN = 0x80410140,
SCE_NET_ERROR_EHOSTUNREACH = 0x80410141,
SCE_NET_ERROR_ENOTEMPTY = 0x80410142,
SCE_NET_ERROR_EPROCLIM = 0x80410143,
SCE_NET_ERROR_EUSERS = 0x80410144,
SCE_NET_ERROR_EDQUOT = 0x80410145,
SCE_NET_ERROR_ESTALE = 0x80410146,
SCE_NET_ERROR_EREMOTE = 0x80410147,
SCE_NET_ERROR_EBADRPC = 0x80410148,
SCE_NET_ERROR_ERPCMISMATCH = 0x80410149,
SCE_NET_ERROR_EPROGUNAVAIL = 0x8041014A,
SCE_NET_ERROR_EPROGMISMATCH = 0x8041014B,
SCE_NET_ERROR_EPROCUNAVAIL = 0x8041014C,
SCE_NET_ERROR_ENOLCK = 0x8041014D,
SCE_NET_ERROR_ENOSYS = 0x8041014E,
SCE_NET_ERROR_EFTYPE = 0x8041014F,
SCE_NET_ERROR_EAUTH = 0x80410150,
SCE_NET_ERROR_ENEEDAUTH = 0x80410151,
SCE_NET_ERROR_EIDRM = 0x80410152,
SCE_NET_ERROR_ENOMS = 0x80410153,
SCE_NET_ERROR_EOVERFLOW = 0x80410154,
SCE_NET_ERROR_EILSEQ = 0x80410155,
SCE_NET_ERROR_ENOTSUP = 0x80410156,
SCE_NET_ERROR_ECANCELED = 0x80410157,
SCE_NET_ERROR_EBADMSG = 0x80410158,
SCE_NET_ERROR_ENODATA = 0x80410159,
SCE_NET_ERROR_ENOSR = 0x8041015A,
SCE_NET_ERROR_ENOSTR = 0x8041015B,
SCE_NET_ERROR_ETIME = 0x8041015C,
SCE_NET_ERROR_EADHOC = 0x804101A0,
SCE_NET_ERROR_EDISABLEDIF = 0x804101A1,
SCE_NET_ERROR_ERESUME = 0x804101A2,
SCE_NET_ERROR_ENOTINIT = 0x804101C8,
SCE_NET_ERROR_ENOLIBMEM = 0x804101C9,
SCE_NET_ERROR_ERESERVED202 = 0x804101CA,
SCE_NET_ERROR_ECALLBACK = 0x804101CB,
SCE_NET_ERROR_EINTERNAL = 0x804101CC,
SCE_NET_ERROR_ERETURN = 0x804101CD,
SCE_NET_ERROR_RESOLVER_EINTERNAL = 0x804101DC,
SCE_NET_ERROR_RESOLVER_EBUSY = 0x804101DD,
SCE_NET_ERROR_RESOLVER_ENOSPACE = 0x804101DE,
SCE_NET_ERROR_RESOLVER_EPACKET = 0x804101DF,
SCE_NET_ERROR_RESOLVER_ERESERVED22 = 0x804101E0,
SCE_NET_ERROR_RESOLVER_ENODNS = 0x804101E1,
SCE_NET_ERROR_RESOLVER_ETIMEDOUT = 0x804101E2,
SCE_NET_ERROR_RESOLVER_ENOSUPPORT = 0x804101E3,
SCE_NET_ERROR_RESOLVER_EFORMAT = 0x804101E4,
SCE_NET_ERROR_RESOLVER_ESERVERFAILURE = 0x804101E5,
SCE_NET_ERROR_RESOLVER_ENOHOST = 0x804101E6,
SCE_NET_ERROR_RESOLVER_ENOTIMPLEMENTED = 0x804101E7,
SCE_NET_ERROR_RESOLVER_ESERVERREFUSED = 0x804101E8,
SCE_NET_ERROR_RESOLVER_ENORECORD = 0x804101E9,
SCE_NET_ERROR_RESOLVER_EALIGNMENT = 0x804101EA,
ERROR_NET_INET_ALREADY_INITIALIZED = 0x80410201,
ERROR_NET_INET_SOCKET_BUSY = 0x80410202,
ERROR_NET_INET_CONFIG_INVALID_ARG = 0x80410203,
ERROR_NET_INET_GET_IFADDR = 0x80410204,
ERROR_NET_INET_SET_IFADDR = 0x80410205,
ERROR_NET_INET_DEL_IFADDR = 0x80410206,
ERROR_NET_INET_NO_DEFAULT_ROUTE = 0x80410207,
ERROR_NET_INET_GET_ROUTE = 0x80410208,
ERROR_NET_INET_SET_ROUTE = 0x80410209,
ERROR_NET_INET_FLUSH_ROUTE = 0x8041020a,
ERROR_NET_INET_INVALID_ARG = 0x8041020b,
};
int convertMsgFlagPSP2Host(int flag);
int convertMsgFlagHost2PSP(int flag);
int convertMSGFlagsPSP2Host(int flags);
int convertMSGFlagsHost2PSP(int flags);
int convertSocketDomainPSP2Host(int domain);
int convertSocketDomainHost2PSP(int domain);
std::string inetSocketDomain2str(int domain);
int convertSocketTypePSP2Host(int type);
int convertSocketTypeHost2PSP(int type);
std::string inetSocketType2str(int type);
int convertSocketProtoPSP2Host(int protocol);
int convertSocketProtoHost2PSP(int protocol);
std::string inetSocketProto2str(int protocol);
int convertCMsgTypePSP2Host(int type, int level);
int convertCMsgTypeHost2PSP(int type, int level);
int convertSockoptLevelPSP2Host(int level);
int convertSockoptLevelHost2PSP(int level);
std::string inetSockoptLevel2str(int level);
int convertSockoptNamePSP2Host(int optname, int level);
int convertSockoptNameHost2PSP(int optname, int level);
std::string inetSockoptName2str(int optname, int level);
int convertInetErrnoHost2PSP(int error);
int convertInetErrno2PSPError(int error);
const char *convertInetErrno2str(int error);
std::string convertNetError2str(uint32_t errorCode);