Pdu.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_PDU_H
12 #define SQUID_SRC_SNMP_PDU_H
13 
14 #include "base/Range.h"
15 #include "ipc/forward.h"
16 #include "snmp.h"
17 
18 namespace Snmp
19 {
20 
23 class Pdu: public snmp_pdu
24 {
25 public:
26  Pdu();
27  Pdu(const Pdu& pdu);
28  Pdu& operator = (const Pdu& pdu);
29  ~Pdu();
30 
31  void aggregate(const Pdu& pdu);
32  void fixAggregate();
33  void pack(Ipc::TypedMsgHdr& msg) const;
34  void unpack(const Ipc::TypedMsgHdr& msg);
35  int varCount() const;
36  void clear();
37  void setVars(variable_list* vars);
38  void clearVars();
40  void setSystemOid(const Range<const oid*>& systemOid);
41  void clearSystemOid();
42 
43 private:
44  void init();
45  void assign(const Pdu& pdu);
46  unsigned int aggrCount = 0;
47 };
48 
49 } // namespace Snmp
50 
51 #endif /* SQUID_SRC_SNMP_PDU_H */
52 
Pdu()
Definition: Pdu.cc:21
void clearSystemOid()
Definition: Pdu.cc:140
int varCount() const
size of variables list
Definition: Pdu.cc:220
void unpack(const Ipc::TypedMsgHdr &msg)
restore struct from the message
Definition: Pdu.cc:191
Definition: forward.h:14
void setSystemOid(const Range< const oid * > &systemOid)
Definition: Pdu.cc:156
Definition: Range.h:18
void fixAggregate()
Definition: Pdu.cc:229
void clear()
clear all internal members
Definition: Pdu.cc:91
void clearVars()
clear variables list
Definition: Pdu.cc:118
unsigned int aggrCount
The number of other Pdus merged into.
Definition: Pdu.h:46
void setVars(variable_list *vars)
perform assignment of variables list
Definition: Pdu.cc:130
void init()
initialize members
Definition: Pdu.cc:46
Range< const oid * > getSystemOid() const
Definition: Pdu.cc:150
~Pdu()
Definition: Pdu.cc:32
Definition: Pdu.h:23
void aggregate(const Pdu &pdu)
Definition: Pdu.cc:55
Pdu & operator=(const Pdu &pdu)
Definition: Pdu.cc:38
void pack(Ipc::TypedMsgHdr &msg) const
prepare for sendmsg()
Definition: Pdu.cc:167
struct msghdr with a known type, fixed-size I/O and control buffers
Definition: TypedMsgHdr.h:34
void assign(const Pdu &pdu)
perform full assignment
Definition: Pdu.cc:99

 

Introduction

Documentation

Support

Miscellaneous