libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
WSARecv.hh
Go to the documentation of this file.
1/*
2 * Copyright 2021 Assured Information Security, Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16/* This file is automatically generated. Do not edit. */
17#pragma once
18
19#include <cstdint>
25#include <memory>
26#include <ostream>
27#include <string>
28
29namespace introvirt {
30namespace windows {
31namespace ws2_32 {
32
38class WSARecv final : public WindowsFunctionCall {
39 public:
40 SOCKET s() const;
41 void s(SOCKET s);
42
45 std::vector<std::shared_ptr<WSABUF>> Buffers();
46
47 uint32_t dwBufferCount() const;
49
52
55
58 std::shared_ptr<WSAOVERLAPPED> Overlapped();
59
62
63 const std::string& function_name() const override;
64 const std::string& library_name() const override;
65 void write(std::ostream& os = std::cout) const override;
66 Json::Value json() const override;
67
68 int32_t result() const;
69 void result(int32_t result);
70
71 WSARecv(Event& event);
72 ~WSARecv() override;
73
74 /* Injection helper */
75 static int32_t inject(SOCKET s, const guest_ptr<void>& pBuffers, uint32_t dwBufferCount,
79
80 static constexpr int ArgumentCount = 7;
81 inline static const std::string LibraryName = "ws2_32";
82 inline static const std::string FunctionName = "WSARecv";
83
84 private:
85 /* Injection constructor */
86 WSARecv(Event& event, SOCKET s, const guest_ptr<void>& pBuffers, uint32_t dwBufferCount,
89
90 private:
91 SOCKET s_;
92 guest_ptr<void> pBuffers_;
93 uint32_t dwBufferCount_;
94 mutable guest_ptr<uint32_t> pNumberOfBytesRecvd_;
95 mutable guest_ptr<uint32_t> pFlags_;
96 guest_ptr<void> pOverlapped_;
97 mutable guest_ptr<void> pCompletionRoutine_;
98};
99
100} // namespace ws2_32
101} // namespace windows
102} // namespace introvirt
Interface class for hypervisor events.
Definition Event.hh:43
Definition guest_ptr.hh:88
Helper class to transparently convert between guest size and a value.
Definition guest_size_t_ptr.hh:498
Definition WindowsFunctionCall.hh:31
Handler for ws2_32!WSARecv.
Definition WSARecv.hh:38
std::vector< std::shared_ptr< WSABUF > > Buffers()
guest_ptr< void > pBuffers() const
std::shared_ptr< WSAOVERLAPPED > Overlapped()
void pCompletionRoutine(const guest_ptr< void > &pCompletionRoutine)
guest_ptr< void > pCompletionRoutine() const
static int32_t inject(SOCKET s, const guest_ptr< void > &pBuffers, uint32_t dwBufferCount, const guest_ptr< uint32_t > &pNumberOfBytesRecvd, const guest_ptr< uint32_t > &pFlags, const guest_ptr< void > &pOverlapped, const guest_ptr< void > &pCompletionRoutine)
void pFlags(const guest_ptr< uint32_t > &pFlags)
guest_ptr< uint32_t > pFlags() const
void pOverlapped(const guest_ptr< void > &pOverlapped)
const std::string & function_name() const override
Get the function name.
void write(std::ostream &os=std::cout) const override
Write out a textual representation of the function for display.
Json::Value json() const override
Get the function as Json.
void pNumberOfBytesRecvd(const guest_ptr< uint32_t > &pNumberOfBytesRecvd)
guest_ptr< uint32_t > pNumberOfBytesRecvd() const
const std::string & library_name() const override
Get the name of the library this call is for.
static constexpr int ArgumentCount
Definition WSARecv.hh:80
void dwBufferCount(uint32_t dwBufferCount)
static const std::string LibraryName
Definition WSARecv.hh:81
guest_ptr< void > pOverlapped() const
void pBuffers(const guest_ptr< void > &pBuffers)
static const std::string FunctionName
Definition WSARecv.hh:82
Type-safe guest virtual address pointer and guest_ptr template.
Core IntroVirt classes.
Definition Cr0.hh:20