diff options
| -rw-r--r-- | src/core/hle/service/sockets/bsd.cpp | 48 | ||||
| -rw-r--r-- | src/core/hle/service/sockets/bsd.h | 4 |
2 files changed, 48 insertions, 4 deletions
diff --git a/src/core/hle/service/sockets/bsd.cpp b/src/core/hle/service/sockets/bsd.cpp index 884ad173b..f67fab2f9 100644 --- a/src/core/hle/service/sockets/bsd.cpp +++ b/src/core/hle/service/sockets/bsd.cpp | |||
| @@ -42,6 +42,26 @@ void BSD::Socket(Kernel::HLERequestContext& ctx) { | |||
| 42 | rb.Push<u32>(0); // bsd errno | 42 | rb.Push<u32>(0); // bsd errno |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | void BSD::Select(Kernel::HLERequestContext& ctx) { | ||
| 46 | LOG_WARNING(Service, "(STUBBED) called"); | ||
| 47 | |||
| 48 | IPC::ResponseBuilder rb{ctx, 4}; | ||
| 49 | |||
| 50 | rb.Push(RESULT_SUCCESS); | ||
| 51 | rb.Push<u32>(0); // ret | ||
| 52 | rb.Push<u32>(0); // bsd errno | ||
| 53 | } | ||
| 54 | |||
| 55 | void BSD::Bind(Kernel::HLERequestContext& ctx) { | ||
| 56 | LOG_WARNING(Service, "(STUBBED) called"); | ||
| 57 | |||
| 58 | IPC::ResponseBuilder rb{ctx, 4}; | ||
| 59 | |||
| 60 | rb.Push(RESULT_SUCCESS); | ||
| 61 | rb.Push<u32>(0); // ret | ||
| 62 | rb.Push<u32>(0); // bsd errno | ||
| 63 | } | ||
| 64 | |||
| 45 | void BSD::Connect(Kernel::HLERequestContext& ctx) { | 65 | void BSD::Connect(Kernel::HLERequestContext& ctx) { |
| 46 | LOG_WARNING(Service, "(STUBBED) called"); | 66 | LOG_WARNING(Service, "(STUBBED) called"); |
| 47 | 67 | ||
| @@ -52,6 +72,26 @@ void BSD::Connect(Kernel::HLERequestContext& ctx) { | |||
| 52 | rb.Push<u32>(0); // bsd errno | 72 | rb.Push<u32>(0); // bsd errno |
| 53 | } | 73 | } |
| 54 | 74 | ||
| 75 | void BSD::Listen(Kernel::HLERequestContext& ctx) { | ||
| 76 | LOG_WARNING(Service, "(STUBBED) called"); | ||
| 77 | |||
| 78 | IPC::ResponseBuilder rb{ctx, 4}; | ||
| 79 | |||
| 80 | rb.Push(RESULT_SUCCESS); | ||
| 81 | rb.Push<u32>(0); // ret | ||
| 82 | rb.Push<u32>(0); // bsd errno | ||
| 83 | } | ||
| 84 | |||
| 85 | void BSD::SetSockOpt(Kernel::HLERequestContext& ctx) { | ||
| 86 | LOG_WARNING(Service, "(STUBBED) called"); | ||
| 87 | |||
| 88 | IPC::ResponseBuilder rb{ctx, 4}; | ||
| 89 | |||
| 90 | rb.Push(RESULT_SUCCESS); | ||
| 91 | rb.Push<u32>(0); // ret | ||
| 92 | rb.Push<u32>(0); // bsd errno | ||
| 93 | } | ||
| 94 | |||
| 55 | void BSD::SendTo(Kernel::HLERequestContext& ctx) { | 95 | void BSD::SendTo(Kernel::HLERequestContext& ctx) { |
| 56 | LOG_WARNING(Service, "(STUBBED) called"); | 96 | LOG_WARNING(Service, "(STUBBED) called"); |
| 57 | 97 | ||
| @@ -80,7 +120,7 @@ BSD::BSD(const char* name) : ServiceFramework(name) { | |||
| 80 | {2, &BSD::Socket, "Socket"}, | 120 | {2, &BSD::Socket, "Socket"}, |
| 81 | {3, nullptr, "SocketExempt"}, | 121 | {3, nullptr, "SocketExempt"}, |
| 82 | {4, nullptr, "Open"}, | 122 | {4, nullptr, "Open"}, |
| 83 | {5, nullptr, "Select"}, | 123 | {5, &BSD::Select, "Select"}, |
| 84 | {6, nullptr, "Poll"}, | 124 | {6, nullptr, "Poll"}, |
| 85 | {7, nullptr, "Sysctl"}, | 125 | {7, nullptr, "Sysctl"}, |
| 86 | {8, nullptr, "Recv"}, | 126 | {8, nullptr, "Recv"}, |
| @@ -88,15 +128,15 @@ BSD::BSD(const char* name) : ServiceFramework(name) { | |||
| 88 | {10, nullptr, "Send"}, | 128 | {10, nullptr, "Send"}, |
| 89 | {11, &BSD::SendTo, "SendTo"}, | 129 | {11, &BSD::SendTo, "SendTo"}, |
| 90 | {12, nullptr, "Accept"}, | 130 | {12, nullptr, "Accept"}, |
| 91 | {13, nullptr, "Bind"}, | 131 | {13, &BSD::Bind, "Bind"}, |
| 92 | {14, &BSD::Connect, "Connect"}, | 132 | {14, &BSD::Connect, "Connect"}, |
| 93 | {15, nullptr, "GetPeerName"}, | 133 | {15, nullptr, "GetPeerName"}, |
| 94 | {16, nullptr, "GetSockName"}, | 134 | {16, nullptr, "GetSockName"}, |
| 95 | {17, nullptr, "GetSockOpt"}, | 135 | {17, nullptr, "GetSockOpt"}, |
| 96 | {18, nullptr, "Listen"}, | 136 | {18, &BSD::Listen, "Listen"}, |
| 97 | {19, nullptr, "Ioctl"}, | 137 | {19, nullptr, "Ioctl"}, |
| 98 | {20, nullptr, "Fcntl"}, | 138 | {20, nullptr, "Fcntl"}, |
| 99 | {21, nullptr, "SetSockOpt"}, | 139 | {21, &BSD::SetSockOpt, "SetSockOpt"}, |
| 100 | {22, nullptr, "Shutdown"}, | 140 | {22, nullptr, "Shutdown"}, |
| 101 | {23, nullptr, "ShutdownAllSockets"}, | 141 | {23, nullptr, "ShutdownAllSockets"}, |
| 102 | {24, nullptr, "Write"}, | 142 | {24, nullptr, "Write"}, |
diff --git a/src/core/hle/service/sockets/bsd.h b/src/core/hle/service/sockets/bsd.h index 0fe0e65c6..3098e3baf 100644 --- a/src/core/hle/service/sockets/bsd.h +++ b/src/core/hle/service/sockets/bsd.h | |||
| @@ -18,7 +18,11 @@ private: | |||
| 18 | void RegisterClient(Kernel::HLERequestContext& ctx); | 18 | void RegisterClient(Kernel::HLERequestContext& ctx); |
| 19 | void StartMonitoring(Kernel::HLERequestContext& ctx); | 19 | void StartMonitoring(Kernel::HLERequestContext& ctx); |
| 20 | void Socket(Kernel::HLERequestContext& ctx); | 20 | void Socket(Kernel::HLERequestContext& ctx); |
| 21 | void Select(Kernel::HLERequestContext& ctx); | ||
| 22 | void Bind(Kernel::HLERequestContext& ctx); | ||
| 21 | void Connect(Kernel::HLERequestContext& ctx); | 23 | void Connect(Kernel::HLERequestContext& ctx); |
| 24 | void Listen(Kernel::HLERequestContext& ctx); | ||
| 25 | void SetSockOpt(Kernel::HLERequestContext& ctx); | ||
| 22 | void SendTo(Kernel::HLERequestContext& ctx); | 26 | void SendTo(Kernel::HLERequestContext& ctx); |
| 23 | void Close(Kernel::HLERequestContext& ctx); | 27 | void Close(Kernel::HLERequestContext& ctx); |
| 24 | 28 | ||