Response.cc
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2022 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
30void
32{
34 msg.putPod(requestId);
35 pdu.pack(msg);
36}
37
40{
41 return new Response(*this);
42}
43
Response()=default
recipient's constructor
struct msghdr with a known type, fixed-size I/O and control buffers
Definition: TypedMsgHdr.h:35
void getPod(Pod &pod) const
load POD
Definition: TypedMsgHdr.h:118
void checkType(int aType) const
Definition: TypedMsgHdr.cc:94
void putPod(const Pod &pod)
store POD
Definition: TypedMsgHdr.h:128
void setType(int aType)
sets message type; use MessageType enum
Definition: TypedMsgHdr.cc:100
virtual void pack(Ipc::TypedMsgHdr &msg) const
prepare for sendmsg()
Definition: Response.cc:31
virtual Ipc::Response::Pointer clone() const
returns a copy of this
Definition: Response.cc:39
Definition: IpcIoFile.h:24
@ mtSnmpResponse
Definition: Messages.h:40

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors