3
0
I am trying to add ToS (QoS) support to a SIP client (taken from open-source Linphone) as so:
retval = setsockopt(session->rtp.socket, proto, value_type, (SOCKET_OPTION_VALUE)&tos, sizeof(tos));
But in Windows 7, all my attempts to add ToS failed; it continues to set zeros (as seen in Wireshark). Someone said it’s a “feature” (read bug) in Windows.
I read in this page how to create a QoS policy, so I created one manually by using the GUI:
I tried the following steps:
- Go to
HKLM\System\CurrentControlSet\Services\Tcpip\QoS
- Create the
QoS
key if it doesn’t exist - Add a
REG-SZ
parameter namedDo not use NLA
and give it the value1
- Reboot
It works as desired, but now my question is how can I automate the creation of such a policy (e.g., so that it can be done during a program installation)?
[EDIT]
My code is pure C and to use C# source code will be problematic a bit since I use the minGW
environment and tools with ./configure && make && make install
.
Is the question about setting the registry via a .reg file or the reg add command?
– harrymc – 2013-12-01T17:13:31.310@harrymc not at all, its not registry but group policy. IDK if its stored into registry. By adding
Do not use NLA
to QoS in registry I only activate created policy. otherwise it doesnt work – Maxim Shoustin – 2013-12-01T18:06:52.633