-
Notifications
You must be signed in to change notification settings - Fork 82
__ser and __deser force datatype to be 8bytes. Cannot send custom packets over network wire #77
Comments
Yes, it certain makes no sense to use 8 bytes for short bit vectors. Just so I understand your use case, do you need to make Ivy's messages compatible with an existing protocol format or implementation? Or is the issue only the waste of bytes on the wire? Also, are you generating a randomized tester, using 'target=test'? If you want to be compatible with an existing format, it might be best to send a raw byte stream rather than using Ivy's built-in serializer, which isn't guaranteed to give you any particular format. |
I am currently using the randomized tester, by using "target=test". Further, I intend to learn to use Ivy for testing different protocols. I felt there isn't sufficient documentation available to do this, so I've been trying to figure out the functionality from reading the code-scripts. For now, I'm focusing on just sending messages using UDP, and feel that using Ivy's built-in (de)serializer, is leading to waste of bytes on the wire. I felt I had to use Ivy's built-in serializer for handling this functionality. If there's another way, to just send raw byte-streams, I would like to learn and use that procedure. I guess, if I were to use Ivy for a protocol, I might have to implement my own serializer/deserializer objects that are bit-precise, compared to the native ivy_serializer. |
Further, I noticed that using the randomized tester has some limits.
|
It's interesting that there is a threshold between 31 and 32 bits. I'll look into that. Anyway, you're right that the use of Ivy for testing external software (i.e., not testing Ivy programs) is not documented. There is the example of the QUIC specification in doc/examples/quic, but that is too complicated to get started with. I have simpler examples of testers for IP, UDP and TCP that will probably be more helpful. I will check those in to the repository. Meanwhile, I'm happy to help with Ivy so you don't have to dig into the Python code :-). Feel free to contact me directly by email and tell me a bit about your application. |
Check out the |
Thank you for sharing this. I have a question, regarding the implementation of Why is it that, in the implementation of
From |
Further, in the The received decoded It surprises me that 'ip_sock.recv()' which is a proxy for a protocol-lnterface event( 'tcp.protocol.recv()' ) is used to trigger an application-lnterface event. I guess I do not understand how to connect the flow of data internal to the TCP-Protocol-Spec through the application-interface ( From my understanding of the |
I apologize -- it looks like I checked in the wrong files for the TCP tester. I don't that that version even works. I'll try to fix that ASAP. |
While using Ivy for networking, based on udp_impl.ivy, I found that using the following definition of a packet:
Enables, transmitting random messages of 8bytes, with only 2bytes(16bits) that is randomly initialized, while the 6 bytes are initialized to 0x00.
The destination thus receives, 8bytes in total, rather than the expected 2bytes.
While trying to debug this issue, I found that the following script for compilation:
/ivy/ivy_to_cpp.py provides the following description for __ser:
Which suggests that the
packet
is interpreted to be along long
. Is there a way, to ensure that the __ser and __deser, can be modified so that randomized data-packets of length 16bits can be generated, and no extra-padding bytes are sent on the wire?The text was updated successfully, but these errors were encountered: