Browse Source

Add a netconf-service version field to netconf.

pull/1/head
Adam Ierymenko 12 years ago
parent
commit
83fc684b20
  1. 4
      netconf-service/netconf.cpp
  2. 1
      node/NetworkConfig.hpp

4
netconf-service/netconf.cpp

@ -69,6 +69,8 @@
#include <mysql++/mysql++.h>
#include "../version.h"
#include "../node/Constants.hpp"
#include "../node/Dictionary.hpp"
#include "../node/Identity.hpp"
@ -446,6 +448,8 @@ int main(int argc,char **argv)
// Assemble response dictionary to send to peer
Dictionary netconf;
sprintf(buf,"%d.%d.%d",ZEROTIER_ONE_VERSION_MAJOR,ZEROTIER_ONE_VERSION_MINOR,ZEROTIER_ONE_VERSION_REVISION);
netconf[ZT_NETWORKCONFIG_DICT_KEY_NETCONF_SERVICE_VERSION] = buf;
sprintf(buf,"%.16llx",(unsigned long long)nwid);
netconf[ZT_NETWORKCONFIG_DICT_KEY_NETWORK_ID] = buf;
netconf[ZT_NETWORKCONFIG_DICT_KEY_ISSUED_TO] = peerIdentity.address().toString();

1
node/NetworkConfig.hpp

@ -48,6 +48,7 @@ namespace ZeroTier {
// These dictionary keys are short so they don't take up much room in
// netconf response packets.
#define ZT_NETWORKCONFIG_DICT_KEY_NETCONF_SERVICE_VERSION "ncver"
#define ZT_NETWORKCONFIG_DICT_KEY_ALLOWED_ETHERNET_TYPES "et"
#define ZT_NETWORKCONFIG_DICT_KEY_NETWORK_ID "nwid"
#define ZT_NETWORKCONFIG_DICT_KEY_TIMESTAMP "ts"

Loading…
Cancel
Save