简体   繁体   English

带有ACK的自定义IP协议

[英]Custom IP protocol with ACK

I would like to explorer the possibilites of creating a custom IP procotol. 我想探索创建自定义IP协议的可能性。 Perhaps with scapy in Python. 也许在Python中有scapy

I've got a tunnel where I receive all packet s, so would like to see if I can dismiss destination IP, ports etc. and keep an absolut minimum - but with ACK . 我有一个tunnel ,可以接收所有packet ,所以想看看我是否可以关闭目标IP,端口等,并保持绝对最小(但使用ACK

Anyway this is possible with scapy or similar? 无论如何, scapy或类似的东西都可能吗?

I've tried some simple stuff like: 我尝试了一些简单的方法,例如:

p = IP(dst="192.168.0.2")/"My payload"

But it seems not doable in that manner. 但这似乎不可行。

What are you trying to achieve? 您想达到什么目的? Forgoing transport layer port numbers limits communication to a single process on each node. 放弃的传输层端口号将通信限制为每个节点上的单个进程。

You'll need to register a protocol (number) with the IP stack to make it pass everything with that protocol to your handler. 您需要在IP堆栈中注册一个协议(编号),以使其将带有该协议的所有内容传递给您的处理程序。 Most often, it's much easier to use UDP transport and build your own stuff on top. 通常,使用UDP传输并在顶部构建自己的东西要容易得多。 You can also simply number your UDP datagrams and ACK them on the application level. 您还可以简单地对UDP数据报编号,并在应用程序级别对其进行确认。

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

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