mirror of
https://github.com/eclipse/paho.mqtt-sn.embedded-c.git
synced 2025-12-15 16:36: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();
|
UDPPort6();
|
||||||
virtual ~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);
|
void close(void);
|
||||||
int unicast(const uint8_t* buf, uint32_t length, SensorNetAddress* sendToAddr);
|
int unicast(const uint8_t* buf, uint32_t length, SensorNetAddress* sendToAddr);
|
||||||
int broadcast(const uint8_t* buf, uint32_t length);
|
int broadcast(const uint8_t* buf, uint32_t length);
|
||||||
@@ -84,7 +84,7 @@ private:
|
|||||||
SensorNetAddress _clientAddr;
|
SensorNetAddress _clientAddr;
|
||||||
uint16_t _uniPortNo;
|
uint16_t _uniPortNo;
|
||||||
bool _disconReq;
|
bool _disconReq;
|
||||||
unsigned int _ttl;
|
unsigned int _hops;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*===========================================
|
/*===========================================
|
||||||
|
|||||||
Reference in New Issue
Block a user