Commit ab7f77f9 authored by Yoshitaka Aharen's avatar Yoshitaka Aharen
Browse files

[2157] opcode is unsigned

parent cb5a5f6e
...@@ -42,7 +42,7 @@ private: ...@@ -42,7 +42,7 @@ private:
// request attributes // request attributes
int req_ip_version_; // IP version int req_ip_version_; // IP version
int req_transport_protocol_; // Transport layer protocol int req_transport_protocol_; // Transport layer protocol
int req_opcode_; // OpCode uint8_t req_opcode_; // OpCode
enum BitAttributes { enum BitAttributes {
REQ_IS_EDNS_0, // EDNS ver.0 REQ_IS_EDNS_0, // EDNS ver.0
REQ_IS_EDNS_BADVER, // EDNS version other than 0 REQ_IS_EDNS_BADVER, // EDNS version other than 0
...@@ -67,13 +67,13 @@ public: ...@@ -67,13 +67,13 @@ public:
/// \brief Get request opcode. /// \brief Get request opcode.
/// \return opcode of a request /// \return opcode of a request
/// \throw None /// \throw None
int getRequestOpCode() const { uint8_t getRequestOpCode() const {
return (req_opcode_); return (req_opcode_);
}; };
/// \brief Set request opcode. /// \brief Set request opcode.
/// \throw None /// \throw None
void setRequestOpCode(const int opcode) { void setRequestOpCode(const uint8_t opcode) {
req_opcode_ = opcode; req_opcode_ = opcode;
}; };
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment