libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
ConnectEx.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 ConnectEx final : public WindowsFunctionCall {
38 public:
39 SOCKET s() const;
40 void s(SOCKET s);
41
44 std::shared_ptr<SOCKADDR> name();
45
46 int32_t namelen() const;
47 void namelen(int32_t namelen);
48
50 void pSendBuffer(const guest_ptr<uint8_t[]>& pSendBuffer);
51
52 uint32_t dwSendDataLength() const;
54
57
60 std::shared_ptr<OVERLAPPED> Overlapped();
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 ~ConnectEx() override;
72
73 /* Injection helper */
74 static bool inject(SOCKET s, const guest_ptr<void>& pname, int32_t namelen,
75 const guest_ptr<uint8_t[]>& pSendBuffer, uint32_t dwSendDataLength,
77
78 static constexpr int ArgumentCount = 7;
79 inline static const std::string LibraryName = "ws2_32";
80 inline static const std::string FunctionName = "ConnectEx";
81
82 private:
83 /* Injection constructor */
84 ConnectEx(Event& event, SOCKET s, const guest_ptr<void>& pname, int32_t namelen,
85 const guest_ptr<uint8_t[]>& pSendBuffer, uint32_t dwSendDataLength,
87
88 private:
89 SOCKET s_;
90 guest_ptr<void> pname_;
91 int32_t namelen_;
92 guest_ptr<void> pSendBuffer_;
93 uint32_t dwSendDataLength_;
94 mutable guest_ptr<uint32_t> pdwBytesSent_;
95 guest_ptr<void> pOverlapped_;
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!ConnectEx.
Definition ConnectEx.hh:37
void dwSendDataLength(uint32_t dwSendDataLength)
void pOverlapped(const guest_ptr< void > &pOverlapped)
void pdwBytesSent(const guest_ptr< uint32_t > &pdwBytesSent)
guest_ptr< void > pOverlapped() const
guest_ptr< uint32_t > pdwBytesSent() const
const std::string & function_name() const override
Get the function name.
static const std::string LibraryName
Definition ConnectEx.hh:79
guest_ptr< void > pname() const
void pSendBuffer(const guest_ptr< uint8_t[]> &pSendBuffer)
static const std::string FunctionName
Definition ConnectEx.hh:80
const std::string & library_name() const override
Get the name of the library this call is for.
void write(std::ostream &os=std::cout) const override
Write out a textual representation of the function for display.
void pname(const guest_ptr< void > &pname)
std::shared_ptr< OVERLAPPED > Overlapped()
std::shared_ptr< SOCKADDR > name()
guest_ptr< uint8_t[]> pSendBuffer() const
Json::Value json() const override
Get the function as Json.
static constexpr int ArgumentCount
Definition ConnectEx.hh:78
static bool inject(SOCKET s, const guest_ptr< void > &pname, int32_t namelen, const guest_ptr< uint8_t[]> &pSendBuffer, uint32_t dwSendDataLength, const guest_ptr< uint32_t > &pdwBytesSent, const guest_ptr< void > &pOverlapped)
Type-safe guest virtual address pointer and guest_ptr template.
Core IntroVirt classes.
Definition Cr0.hh:20