mirror of
https://github.com/eclipse/paho.mqtt-sn.embedded-c.git
synced 2025-12-13 07:26:52 +01:00
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:
@@ -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;
|
||||
};
|
||||
|
||||
/*===========================================
|
||||
|
||||
Reference in New Issue
Block a user