Code Monkey home page Code Monkey logo

Comments (6)

yasuhito avatar yasuhito commented on August 9, 2024

こういう報告は本当にありがたいです。
Trema の send_packet で -s と -d に同じものを指定したらエラーになるようにしようと思いますが、その修正でオッケーそうですか?

from routing_switch.

yamatchan avatar yamatchan commented on August 9, 2024

Tremaのsend_packetで制限をしてしまうと,他のコードで自分自身にパケットを送信するテストを行いたい時に困ると思いますので,routing_switchで対処したほうが良いかと思います.
最短経路長が0の場合のみ特別な処理を行うように修正したコードをpull requestしましたのでご参考にしていただけますと幸いです.

#6

from routing_switch.

yasuhito avatar yasuhito commented on August 9, 2024

ありがとうございます!
ただ自分自身にパケットを送るテストって、たとえばどういう時に使いそうですか?

On Thu, Dec 3, 2015 at 12:07 AM Yamatchan [email protected] wrote:

Tremaのsend_packetで制限をしてしまうと,他のコードで自分自身にパケットを送信するテストを行いたい時に困ると思いますので,routing_switchで対処したほうが良いかと思います.
最短経路長が0の場合のみ特別な処理を行うように修正したコードをpull requestしましたのでご参考にしていただけますと幸いです.

#6 #6


Reply to this email directly or view it on GitHub
#4 (comment).

from routing_switch.

yamatchan avatar yamatchan commented on August 9, 2024

TCP/IPが正常に実装されているかをテストするために自分自身にpingを送信することがあると思います.
ですが,宛先IPが自分自身であれば,パケットはネットワークには送信されずにループバックするようになっているはずです.
おそらく,Tremaのsend_packetは宛先IPが自分自身の場合でもパケットをループバックせずに,一度ネットワーク上に送信しているため,Tremaのsend_packetを制限しても大丈夫かと思います.

from routing_switch.

yasuhito avatar yasuhito commented on August 9, 2024

ですね! ふつうはループバックになりますが、Trema の send_packet はいったん送ってしまいます。

ループバックっぽくするために、send_packet の望ましい挙動としては、--source と --dest が同じだったら何もパケットは送らず、show_stats で見れるカウンタを一つインクリメントするのがいいのかな? と思いました。どう思いますか?

from routing_switch.

yamatchan avatar yamatchan commented on August 9, 2024

正しいと思います.
--sourceと--destが同一の場合はパケットを送信せずに,カウンタをインクリメントするとループバックのように見えると思うので,上記処理で大丈夫だと思います.

from routing_switch.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.