Dangerous SNMP
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
udp.hpp
1 #pragma once
2 
3 #include "dangerous/snmp/exception.hpp"
4 
5 #include "basicsockettransport.hpp"
6 
7 
8 namespace dangerous { namespace snmp { namespace transport {
9 
13 class Udp : public BasicSocketTransport {
14 public:
15  const unsigned int MINIMUM_MESSAGE_SIZE = 484; //< See http://tools.ietf.org/html/rfc3417, section 3.2.
16  const unsigned int RECOMMENDED_MESSAGE_SIZE = 1472; //< See http://tools.ietf.org/html/rfc3417, section 3.2.
17 
18 public:
28  Udp( std::weak_ptr<Context::PrivateData> context, const std::string& connectionString ) throw( Exception );
29 
30 public:
31  virtual int socketOptions() const;
32  virtual int protocolNumber() const;
33 };
34 
35 } } }
36 
Udp(std::weak_ptr< Context::PrivateData > context, const std::string &connectionString)
This instantiates a new UDP transport instance.
virtual int protocolNumber() const
When creating a socket, this is called to set the protocol that should be passed to the call...
This is the base class of both the UDP and TCP transports.
Definition: basicsockettransport.hpp:16
This is the (typical) UDP transport.
Definition: udp.hpp:13
virtual int socketOptions() const
When creating a socket, this is called to set the options that should be passed to the call...
This defines the base exception class for Dangerous SNMP.
Definition: exception.hpp:10