UDP إلى الأمام
تتضمن هذه الوحدة وظائف لميزة إعادة توجيه UDP.
ملخص
تتوفر الوظائف في هذه الوحدة عند تمكين ميزة udp-forward ( OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE
).
النوع | |
---|---|
otUdpForwarder )(otMessage *aMessage, uint16_t aPeerPort, otIp6Address *aPeerAddr, uint16_t aSockPort, void *aContext) | typedefvoid(* يقوم مؤشر الوظيفة هذا بتسليم حزمة UDP إلى المضيف ويجب على المضيف إرسال الحزمة من خلال مكدس الشبكة الخاص به. |
المهام | |
---|---|
otUdpForwardReceive ( otInstance *aInstance, otMessage *aMessage, uint16_t aPeerPort, const otIp6Address *aPeerAddr, uint16_t aSockPort) | void التعامل مع حزمة UDP المتلقاة من المضيف. |
otUdpForwardSetForwarder ( otInstance *aInstance, otUdpForwarder aForwarder, void *aContext) | void تعيين إعادة توجيه UDP لتسليم حزم UDP إلى المضيف. |
النوع
otUdpForwarder
void(* otUdpForwarder)(otMessage *aMessage, uint16_t aPeerPort, otIp6Address *aPeerAddr, uint16_t aSockPort, void *aContext)
يقوم مؤشر الوظيفة هذا بتسليم حزمة UDP إلى المضيف ويجب على المضيف إرسال الحزمة من خلال مكدس الشبكة الخاص به.
تفاصيل | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
المعلمات |
|
المهام
otUdpForwardReceive
void otUdpForwardReceive( otInstance *aInstance, otMessage *aMessage, uint16_t aPeerPort, const otIp6Address *aPeerAddr, uint16_t aSockPort )
التعامل مع حزمة UDP المتلقاة من المضيف.
بغض النظر عن نجاح المكالمة أو فشلها ، يتم تحرير الرسالة.
تفاصيل | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
المعلمات |
|
otUdpForwardSetForwarder
void otUdpForwardSetForwarder( otInstance *aInstance, otUdpForwarder aForwarder, void *aContext )
تعيين إعادة توجيه UDP لتسليم حزم UDP إلى المضيف.
تفاصيل | |||||||
---|---|---|---|---|---|---|---|
المعلمات |
|