Request.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3  *
4  * Squid software is distributed under GPLv2+ license and includes
5  * contributions from numerous individuals and organizations.
6  * Please see the COPYING and CONTRIBUTORS files for details.
7  */
8 
9 /* DEBUG: section 49 SNMP Interface */
10 
11 #ifndef SQUID_SRC_SNMP_REQUEST_H
12 #define SQUID_SRC_SNMP_REQUEST_H
13 
14 #include "ip/Address.h"
15 #include "ipc/forward.h"
16 #include "ipc/Request.h"
17 #include "snmp/Pdu.h"
18 #include "snmp/Session.h"
19 
20 namespace Snmp
21 {
22 
24 class Request: public Ipc::Request
25 {
26 public:
27  Request(int aRequestorId, Ipc::RequestId aRequestId, const Pdu& aPdu,
28  const Session& aSession, int aFd, const Ip::Address& anAddress);
29 
30  explicit Request(const Ipc::TypedMsgHdr& msg);
31  /* Ipc::Request API */
32  void pack(Ipc::TypedMsgHdr& msg) const override;
33  Pointer clone() const override;
34 
35 public:
36  Pdu pdu;
38  int fd;
40 };
41 
42 } // namespace Snmp
43 
44 #endif /* SQUID_SRC_SNMP_REQUEST_H */
45 
snmp_session wrapper add pack/unpack feature
Definition: Session.h:22
Request()=default
recipient's constructor
Definition: forward.h:14
Pointer clone() const override
returns a copy of this
Definition: Request.cc:53
SNMP request.
Definition: Request.h:24
void pack(Ipc::TypedMsgHdr &msg) const override
prepare for sendmsg()
Definition: Request.cc:38
int fd
client connection descriptor
Definition: Request.h:38
Ip::Address address
client address
Definition: Request.h:39
Definition: Pdu.h:23
Session session
SNMP session.
Definition: Request.h:37
Pdu pdu
SNMP protocol data unit.
Definition: Request.h:36
struct msghdr with a known type, fixed-size I/O and control buffers
Definition: TypedMsgHdr.h:34
IPC request.
Definition: Request.h:27

 

Introduction

Documentation

Support

Miscellaneous