diff options
author | est31 <MTest31@outlook.com> | 2015-04-12 04:49:13 +0200 |
---|---|---|
committer | est31 <MTest31@outlook.com> | 2015-05-11 18:40:27 +0200 |
commit | 82e35edff52d88dcd64a9bfc9d2c4c93f1341b78 (patch) | |
tree | bf55839e296c6d1cb9b7f81b8f5cf69e0492b4c0 /src/network/networkpacket.h | |
parent | 181f7baa453c58d4070de7196fd74663110946a8 (diff) | |
download | minetest-82e35edff52d88dcd64a9bfc9d2c4c93f1341b78.tar.gz minetest-82e35edff52d88dcd64a9bfc9d2c4c93f1341b78.tar.bz2 minetest-82e35edff52d88dcd64a9bfc9d2c4c93f1341b78.zip |
Make early protocol auth mechanism generic, and add SRP
Adds everything needed for SRP (and everything works too),
but still deactivated, as protocol v25 init packets aren't final yet.
Can be activated by changing the LATEST_PROTOCOL_VERSION header to 25
inside networkprotocol.h.
Diffstat (limited to 'src/network/networkpacket.h')
-rw-r--r-- | src/network/networkpacket.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/network/networkpacket.h b/src/network/networkpacket.h index 0d2015e7f..0408b9cac 100644 --- a/src/network/networkpacket.h +++ b/src/network/networkpacket.h @@ -41,8 +41,10 @@ public: u16 getPeerId() { return m_peer_id; } u16 getCommand() { return m_command; } - // Data extractors + // Returns a c-string without copying. + // A better name for this would be getRawString() char* getString(u32 from_offset); + // major difference to putCString(): doesn't write len into the buffer void putRawString(const char* src, u32 len); NetworkPacket& operator>>(std::string& dst); |