Add a new function to set TTL/Hops of SensorNetwork(UDP and UDP6) #175

Add Parameters to the gateway.conf to set those values.
MulticastTTL=1 for UDP
GatewayUDP6Hops=1 for UDP6

Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
tomoaki
2020-02-11 19:08:50 +09:00
parent b8129d6781
commit 9d6b9d46ef

View File

@@ -66,7 +66,7 @@ public:
UDPPort6();
virtual ~UDPPort6();
int open(const char* ipAddress, uint16_t uniPortNo, const char* broadcastAddr, const char* interfaceName, unsigned int ttl);
int open(const char* ipAddress, uint16_t uniPortNo, const char* broadcastAddr, const char* interfaceName, unsigned int hops);
void close(void);
int unicast(const uint8_t* buf, uint32_t length, SensorNetAddress* sendToAddr);
int broadcast(const uint8_t* buf, uint32_t length);
@@ -84,7 +84,7 @@ private:
SensorNetAddress _clientAddr;
uint16_t _uniPortNo;
bool _disconReq;
unsigned int _ttl;
unsigned int _hops;
};
/*===========================================