简体   繁体   English

Erlang:如何设置或检查UDP数据包中的TTL?

[英]Erlang: how to set or check TTL in UDP packets?

In Erlang, how can I: 在Erlang,我怎么能:

  • Set the TTL for sent UDP packets? 设置发送UDP数据包的TTL?

  • Retrieve the value of the TTL for received UDP packets? 检索收到的UDP数据包的TTL值?

I need to do this to implement GTSM 我需要这样做才能实现GTSM

gen_udp does not currently provide a way to do this. gen_udp目前没有提供这样做的方法。 you would need to modify the inet layer below it to allow for this new functionality. 您需要修改它下面的inet层以允许这个新功能。 It would not be difficult to do so, if you look at the other options they allow setting, like multicast_ttl and you can probably implement a gen_udp:send,recv and open that allow for this suppoert. 这样做并不困难,如果你看看他们允许设置的其他选项,比如multicast_ttl,你可以实现gen_udp:send,recv和open,允许这个suppoert。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM