mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-01-10 02:30:12 +01:00
27 lines
621 B
C++
27 lines
621 B
C++
#pragma once
|
|
|
|
#include <vector>
|
|
|
|
#ifdef _WIN32
|
|
#include <winsock2.h>
|
|
#else
|
|
#include <netinet/in.h>
|
|
#endif
|
|
|
|
#include "Emu/Cell/lv2/sys_net/nt_p2p_port.h"
|
|
|
|
s32 send_packet_from_p2p_port(const std::vector<u8>& data, const sockaddr_in& addr);
|
|
std::vector<signaling_message> get_sign_msgs();
|
|
std::vector<std::vector<u8>> get_rpcn_msgs();
|
|
|
|
constexpr s32 VPORT_0_HEADER_SIZE = sizeof(u16) + sizeof(u8);
|
|
|
|
// VPort 0 is invalid for sys_net so we use it for:
|
|
// Subset 0: Messages from RPCN server, IP retrieval / UDP hole punching
|
|
// Subset 1: Signaling
|
|
enum VPORT_0_SUBSET : u8
|
|
{
|
|
SUBSET_RPCN = 0,
|
|
SUBSET_SIGNALING = 1,
|
|
};
|