libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
sendto.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>
24#include <ostream>
25#include <string>
26
27namespace introvirt {
28namespace windows {
29namespace ws2_32 {
30
36class sendto final : public WindowsFunctionCall {
37 public:
38 SOCKET s() const;
39 void s(SOCKET s);
40
42 void pbuf(const guest_ptr<uint8_t[]>& pbuf);
43
44 int32_t len() const;
45 void len(int32_t len);
46
47 int32_t flags() const;
48 void flags(int32_t flags);
49
51 void pto(const guest_ptr<void>& pto);
52 std::shared_ptr<SOCKADDR> to();
53
54 int32_t tolen() const;
55 void tolen(int32_t tolen);
56
57 const std::string& function_name() const override;
58 const std::string& library_name() const override;
59 void write(std::ostream& os = std::cout) const override;
60 Json::Value json() const override;
61
62 int32_t result() const;
63 void result(int32_t result);
64
65 sendto(Event& event);
66 ~sendto() override;
67
68 /* Injection helper */
69 static int32_t inject(SOCKET s, const guest_ptr<uint8_t[]>& pbuf, int32_t len, int32_t flags,
70 const guest_ptr<void>& pto, int32_t tolen);
71
72 static constexpr int ArgumentCount = 6;
73 inline static const std::string LibraryName = "ws2_32";
74 inline static const std::string FunctionName = "sendto";
75
76 private:
77 /* Injection constructor */
78 sendto(Event& event, SOCKET s, const guest_ptr<uint8_t[]>& pbuf, int32_t len, int32_t flags,
79 const guest_ptr<void>& pto, int32_t tolen);
80
81 private:
82 SOCKET s_;
83 guest_ptr<void> pbuf_;
84 int32_t len_;
85 int32_t flags_;
86 guest_ptr<void> pto_;
87 int32_t tolen_;
88};
89
90} // namespace ws2_32
91} // namespace windows
92} // 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!sendto.
Definition sendto.hh:36
const std::string & library_name() const override
Get the name of the library this call is for.
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.
static constexpr int ArgumentCount
Definition sendto.hh:72
void pbuf(const guest_ptr< uint8_t[]> &pbuf)
static const std::string FunctionName
Definition sendto.hh:74
static int32_t inject(SOCKET s, const guest_ptr< uint8_t[]> &pbuf, int32_t len, int32_t flags, const guest_ptr< void > &pto, int32_t tolen)
Json::Value json() const override
Get the function as Json.
void pto(const guest_ptr< void > &pto)
guest_ptr< uint8_t[]> pbuf() const
static const std::string LibraryName
Definition sendto.hh:73
std::shared_ptr< SOCKADDR > to()
guest_ptr< void > pto() const
Type-safe guest virtual address pointer and guest_ptr template.
Core IntroVirt classes.
Definition Cr0.hh:20