Response.cc
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 #include "squid.h"
12 #include "base/TextException.h"
13 #include "ipc/Messages.h"
14 #include "ipc/RequestId.h"
15 #include "ipc/TypedMsgHdr.h"
16 #include "snmp/Response.h"
17 
19  Ipc::Response(aRequestId), pdu()
20 {
21 }
22 
24 {
26  msg.getPod(requestId);
27  pdu.unpack(msg);
28 }
29 
30 void
32 {
34  msg.putPod(requestId);
35  pdu.pack(msg);
36 }
37 
40 {
41  return new Response(*this);
42 }
43 
void setType(int aType)
sets message type; use MessageType enum
Definition: TypedMsgHdr.cc:100
void checkType(int aType) const
Definition: TypedMsgHdr.cc:94
Ipc::Response::Pointer clone() const override
returns a copy of this
Definition: Response.cc:39
void putPod(const Pod &pod)
store POD
Definition: TypedMsgHdr.h:126
void pack(Ipc::TypedMsgHdr &msg) const override
prepare for sendmsg()
Definition: Response.cc:31
@ mtSnmpResponse
Definition: Messages.h:40
struct msghdr with a known type, fixed-size I/O and control buffers
Definition: TypedMsgHdr.h:34
Response()=default
recipient's constructor
void getPod(Pod &pod) const
load POD
Definition: TypedMsgHdr.h:118
Definition: IpcIoFile.h:23

 

Introduction

Documentation

Support

Miscellaneous