|
@@ -68,17 +68,12 @@ protected:
|
|
*/
|
|
*/
|
|
virtual bool handleChannelFromOuter(Tins::PDU &pdu) {
|
|
virtual bool handleChannelFromOuter(Tins::PDU &pdu) {
|
|
Tins::TCP &tcp = pdu.rfind_pdu<Tins::TCP>();
|
|
Tins::TCP &tcp = pdu.rfind_pdu<Tins::TCP>();
|
|
- if constexpr (PASSIVE) {
|
|
|
|
- uint16_t data = tcp.urg_ptr();
|
|
|
|
- protocol.receive((uint8_t *)(&data));
|
|
|
|
- tcp.urg_ptr(0);
|
|
|
|
- innerSender.send(pdu);
|
|
|
|
- } else {
|
|
|
|
- uint16_t data = tcp.urg_ptr();
|
|
|
|
- protocol.receive((uint8_t *)(&data));
|
|
|
|
- tcp.urg_ptr(0);
|
|
|
|
- innerSender.send(pdu);
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
+ uint16_t data = tcp.urg_ptr();
|
|
|
|
+ protocol.receive((uint8_t *)(&data));
|
|
|
|
+ tcp.urg_ptr(0);
|
|
|
|
+ innerSender.send(pdu);
|
|
|
|
+
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -93,17 +88,12 @@ protected:
|
|
*/
|
|
*/
|
|
virtual bool handleChannelFromInner(Tins::PDU &pdu) {
|
|
virtual bool handleChannelFromInner(Tins::PDU &pdu) {
|
|
Tins::TCP &tcp = pdu.rfind_pdu<Tins::TCP>();
|
|
Tins::TCP &tcp = pdu.rfind_pdu<Tins::TCP>();
|
|
- if constexpr (PASSIVE) {
|
|
|
|
- uint16_t data = 0;
|
|
|
|
- protocol.send((uint8_t *)(&data));
|
|
|
|
- tcp.urg_ptr(data);
|
|
|
|
- outerSender.send(pdu);
|
|
|
|
- } else {
|
|
|
|
- uint16_t data = 0;
|
|
|
|
- protocol.send((uint8_t *)(&data));
|
|
|
|
- tcp.urg_ptr(data);
|
|
|
|
- outerSender.send(pdu);
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
+ uint16_t data = 0;
|
|
|
|
+ protocol.send((uint8_t *)(&data));
|
|
|
|
+ tcp.urg_ptr(data);
|
|
|
|
+ outerSender.send(pdu);
|
|
|
|
+
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|