libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
TransmitFile.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 <ostream>
26#include <string>
27
28namespace introvirt {
29namespace windows {
30namespace ws2_32 {
31
37class TransmitFile final : public WindowsFunctionCall {
38 public:
39 SOCKET hSocket() const;
41
42 uint64_t hFile() const;
43 void hFile(uint64_t hFile);
44
45 int32_t nNumberOfBytesToWrite() const;
47
48 int32_t nNumberOfBytesPerSend() const;
50
53 std::shared_ptr<OVERLAPPED> Overlapped();
54
57 std::shared_ptr<TRANSMIT_FILE_BUFFERS> TransmitBuffers();
58
59 uint32_t dwReserved() const;
60 void dwReserved(uint32_t dwReserved);
61
62 const std::string& function_name() const override;
63 const std::string& library_name() const override;
64 void write(std::ostream& os = std::cout) const override;
65 Json::Value json() const override;
66
67 bool result() const;
68 void result(bool result);
69
71 ~TransmitFile() override;
72
73 /* Injection helper */
74 static bool inject(SOCKET hSocket, uint64_t hFile, int32_t nNumberOfBytesToWrite,
77
78 static constexpr int ArgumentCount = 7;
79 inline static const std::string LibraryName = "ws2_32";
80 inline static const std::string FunctionName = "TransmitFile";
81
82 private:
83 /* Injection constructor */
87
88 private:
89 SOCKET hSocket_;
90 uint64_t hFile_;
91 int32_t nNumberOfBytesToWrite_;
92 int32_t nNumberOfBytesPerSend_;
93 guest_ptr<void> pOverlapped_;
94 guest_ptr<void> pTransmitBuffers_;
95 uint32_t dwReserved_;
96};
97
98} // namespace ws2_32
99} // namespace windows
100} // 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!TransmitFile.
Definition TransmitFile.hh:37
const std::string & library_name() const override
Get the name of the library this call is for.
void pOverlapped(const guest_ptr< void > &pOverlapped)
std::shared_ptr< TRANSMIT_FILE_BUFFERS > TransmitBuffers()
void nNumberOfBytesPerSend(int32_t nNumberOfBytesPerSend)
static bool inject(SOCKET hSocket, uint64_t hFile, int32_t nNumberOfBytesToWrite, int32_t nNumberOfBytesPerSend, const guest_ptr< void > &pOverlapped, const guest_ptr< void > &pTransmitBuffers, uint32_t dwReserved)
static constexpr int ArgumentCount
Definition TransmitFile.hh:78
Json::Value json() const override
Get the function as Json.
guest_ptr< void > pOverlapped() const
void write(std::ostream &os=std::cout) const override
Write out a textual representation of the function for display.
void nNumberOfBytesToWrite(int32_t nNumberOfBytesToWrite)
static const std::string LibraryName
Definition TransmitFile.hh:79
void dwReserved(uint32_t dwReserved)
static const std::string FunctionName
Definition TransmitFile.hh:80
guest_ptr< void > pTransmitBuffers() const
const std::string & function_name() const override
Get the function name.
void pTransmitBuffers(const guest_ptr< void > &pTransmitBuffers)
std::shared_ptr< OVERLAPPED > Overlapped()
Type-safe guest virtual address pointer and guest_ptr template.
Core IntroVirt classes.
Definition Cr0.hh:20