libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
bind.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 bind final : public WindowsFunctionCall {
37 public:
38 SOCKET s() const;
39 void s(SOCKET s);
40
43 std::shared_ptr<SOCKADDR> addr();
44
45 int32_t namelen() const;
46 void namelen(int32_t namelen);
47
48 const std::string& function_name() const override;
49 const std::string& library_name() const override;
50 void write(std::ostream& os = std::cout) const override;
51 Json::Value json() const override;
52
53 int32_t result() const;
54 void result(int32_t result);
55
56 bind(Event& event);
57 ~bind() override;
58
59 /* Injection helper */
60 static int32_t inject(SOCKET s, const guest_ptr<void>& paddr, int32_t namelen);
61
62 static constexpr int ArgumentCount = 3;
63 inline static const std::string LibraryName = "ws2_32";
64 inline static const std::string FunctionName = "bind";
65
66 private:
67 /* Injection constructor */
68 bind(Event& event, SOCKET s, const guest_ptr<void>& paddr, int32_t namelen);
69
70 private:
71 SOCKET s_;
72 guest_ptr<void> paddr_;
73 int32_t namelen_;
74};
75
76} // namespace ws2_32
77} // namespace windows
78} // 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!bind.
Definition bind.hh:36
void namelen(int32_t namelen)
static const std::string LibraryName
Definition bind.hh:63
const std::string & function_name() const override
Get the function name.
static constexpr int ArgumentCount
Definition bind.hh:62
static int32_t inject(SOCKET s, const guest_ptr< void > &paddr, int32_t namelen)
void result(int32_t result)
static const std::string FunctionName
Definition bind.hh:64
Json::Value json() const override
Get the function as Json.
std::shared_ptr< SOCKADDR > addr()
void write(std::ostream &os=std::cout) const override
Write out a textual representation of the function for display.
void paddr(const guest_ptr< void > &paddr)
const std::string & library_name() const override
Get the name of the library this call is for.
guest_ptr< void > paddr() const
Type-safe guest virtual address pointer and guest_ptr template.
Core IntroVirt classes.
Definition Cr0.hh:20