libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
setsockopt.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>
23#include <ostream>
24#include <string>
25
26namespace introvirt {
27namespace windows {
28namespace ws2_32 {
29
35class setsockopt final : public WindowsFunctionCall {
36 public:
37 SOCKET s() const;
38 void s(SOCKET s);
39
40 int32_t level() const;
41 void level(int32_t level);
42
43 int32_t optname() const;
44 void optname(int32_t optname);
45
47 void poptval(const guest_ptr<uint8_t[]>& poptval);
48
49 int32_t optlen() const;
50 void optlen(int32_t optlen);
51
52 const std::string& function_name() const override;
53 const std::string& library_name() const override;
54 void write(std::ostream& os = std::cout) const override;
55 Json::Value json() const override;
56
57 int32_t result() const;
58 void result(int32_t result);
59
61 ~setsockopt() override;
62
63 /* Injection helper */
64 static int32_t inject(SOCKET s, int32_t level, int32_t optname,
65 const guest_ptr<uint8_t[]>& poptval, int32_t optlen);
66
67 static constexpr int ArgumentCount = 5;
68 inline static const std::string LibraryName = "ws2_32";
69 inline static const std::string FunctionName = "setsockopt";
70
71 private:
72 /* Injection constructor */
73 setsockopt(Event& event, SOCKET s, int32_t level, int32_t optname,
74 const guest_ptr<uint8_t[]>& poptval, int32_t optlen);
75
76 private:
77 SOCKET s_;
78 int32_t level_;
79 int32_t optname_;
80 guest_ptr<void> poptval_;
81 int32_t optlen_;
82};
83
84} // namespace ws2_32
85} // namespace windows
86} // 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!setsockopt.
Definition setsockopt.hh:35
guest_ptr< uint8_t[]> poptval() const
static const std::string LibraryName
Definition setsockopt.hh:68
Json::Value json() const override
Get the function as Json.
static const std::string FunctionName
Definition setsockopt.hh:69
static constexpr int ArgumentCount
Definition setsockopt.hh:67
const std::string & library_name() const override
Get the name of the library this call is for.
void poptval(const guest_ptr< uint8_t[]> &poptval)
static int32_t inject(SOCKET s, int32_t level, int32_t optname, const guest_ptr< uint8_t[]> &poptval, int32_t optlen)
void write(std::ostream &os=std::cout) const override
Write out a textual representation of the function for display.
const std::string & function_name() const override
Get the function name.
Type-safe guest virtual address pointer and guest_ptr template.
Core IntroVirt classes.
Definition Cr0.hh:20