Hi,
it's not easy, but if that can help, it's not easy in a real network
either.
Even if setting SO_PRIORITY on a socket is possible on linux, usually
the TOS is set up by accessor elements not under user's control, in
order to prevent easy network hacking. ISPs (and local networks)
preferred way to setup TOS is by using 802.1q or by marking the
packets in the proper network element, as is a border network element
like a router.
Inside the router, packets are not flowing through L4 protocols, only
IP layer is decoded (i.e., you'd use Raw sockets, exposing the IP
layer and, only if necessary, peeling the L4 ports info from the
packet. So, basically, marking is done *without* application's aid.
Now, consider that ns-3 is a simulator. Its functionalities are built
according to user's needs, so when someone find something that is not
yet possible, the feature will be (might be) added. Some features of
real networks are not in ns-3 simply because they're not useful for a
simulation, and they'd slow down the code execution or they'd make the
code more complex to maintain. Our rule is: don't add if it's not
used.
To be able to mark TOS packets might, as a matter of fact, be useful.
Plus it can fit nicely in an ongoing code change (meant to add a
different feature, but we can grab 2 birds with one stone). Hence,
soon it will be possible. Probably in the next release.
If you want to contribute to the code change, this is the reference:
https://www.nsnam.org/bugzilla/show_bug.cgi?id=1111
Cheers,
T.
On Feb 12, 11:17 am, tran the son <
theson.viet...@gmail.com> wrote:
> Thank you for your reply. It seem to me that ns-3 is hard to build up a
> hetorogeneous network configuration