INET: Type of sequence sumber

13 views
Skip to first unread message

baukran

unread,
Aug 13, 2017, 6:04:50 PM8/13/17
to OMNeT++ Users
I stumbled upon the sequence number having a type of unsigned int. According to this unsigned int is at least 2 byte, whereas the sequence number field is of size 4 bytes. I run my simulation with a packet of size >2^16 and it worked. Maybe this is due to my 64 bit system where an unsigned int is 4 byte. I can't test right now if the simulation still works on a 32 bit system - so I'd like to ask if it still does or if if this has to be corrected. Thanks!

Attila Török

unread,
Aug 13, 2017, 7:34:44 PM8/13/17
to OMNeT++ Users
Just read one more sentence on the page you linked:
"However, on 32/64 bit systems it is almost exclusively guaranteed to have width of at least 32 bits (see below)."
In practice, an int, signed or unsigned, will be 32 bits wide on (almost) any system OMNeT++ runs on. So this should be among the last things you need to worry/think about.

Attila

2017-08-14 0:04 GMT+02:00 baukran <jensmue...@gmail.com>:
I stumbled upon the sequence number having a type of unsigned int. According to this unsigned int is at least 2 byte, whereas the sequence number field is of size 4 bytes. I run my simulation with a packet of size >2^16 and it worked. Maybe this is due to my 64 bit system where an unsigned int is 4 byte. I can't test right now if the simulation still works on a 32 bit system - so I'd like to ask if it still does or if if this has to be corrected. Thanks!

--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/omnetpp.
For more options, visit https://groups.google.com/d/optout.

baukran

unread,
Aug 14, 2017, 4:31:24 AM8/14/17
to OMNeT++ Users
Thank you!


Am Montag, 14. August 2017 01:34:44 UTC+2 schrieb Attila Török:
Just read one more sentence on the page you linked:
"However, on 32/64 bit systems it is almost exclusively guaranteed to have width of at least 32 bits (see below)."
In practice, an int, signed or unsigned, will be 32 bits wide on (almost) any system OMNeT++ runs on. So this should be among the last things you need to worry/think about.

Attila
2017-08-14 0:04 GMT+02:00 baukran <jensmue...@gmail.com>:
I stumbled upon the sequence number having a type of unsigned int. According to this unsigned int is at least 2 byte, whereas the sequence number field is of size 4 bytes. I run my simulation with a packet of size >2^16 and it worked. Maybe this is due to my 64 bit system where an unsigned int is 4 byte. I can't test right now if the simulation still works on a 32 bit system - so I'd like to ask if it still does or if if this has to be corrected. Thanks!

--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages