Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

GQOS & QOS for multicast UDP sockets

82 views
Skip to first unread message

Gert Leunen

unread,
Jan 6, 2010, 7:25:43 AM1/6/10
to
For my application I need to join the same multicast address on different
network interfaces. But, there seems to be a problem setting QOS on all
interfaces.

I want to send prioritized udp data over different network interfaces to the
same multicast endpoint (224.5.6.7:9999). Therefore, I set the
differentiated services field of the ip header to SERVICETYPE_GUARANTEED .
But analysis, using wireshark, shows that only the packets send on one
interface are marked with the right service type . Namely those that were
send on the first interface, where the quality of service was first set. Is
there a workaround or what am I doing wrong here ?

Code snippet:

if(WSAJoinLeaf(socket, (SOCKADDR*)&sock_addr_remote,
sizeof(sock_addr_remote), NULL, NULL, &qos1, NULL, JL_SENDER_ONLY) ==
SOCKET_ERROR)
{
DWORD error = ::WSAGetLastError();
printf("WSAJoinLeaf ERROR:%d", error);
}

if(WSAJoinLeaf(socket2, (SOCKADDR*)&sock_addr_remote2,
sizeof(sock_addr_remote2), NULL, NULL, &qos2, NULL, JL_SENDER_ONLY) ==
SOCKET_ERROR)
{
DWORD error = ::WSAGetLastError();
printf("WSAJoinLeaf ERROR:%d", error);
}

Here is socket1 != socket2, but sock_addr_remote1 == sock_addr_remote2 and
qos1 == qos2

When I make sock_addr_remote1 != sock_addr_remote2, by changing the port or
address, it seems to work. But that is not what I need.

Kind regards,
Mario


Jialiang Ge [MSFT]

unread,
Jan 7, 2010, 4:09:40 AM1/7/10
to
Hello Mario

I'm performing researches on this case. Can you tell me whether you get any
error from WSAJoinLeaf (WSAGetLastError)?

Regards,
Jialiang Ge
Microsoft Online Community Support

=================================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd...@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================

Pavel A.

unread,
Jan 7, 2010, 4:10:06 AM1/7/10
to
How you ensure that these sockets bind to different interfaces?
Have you bound them?
--pa

"Gert Leunen" <Gert....@newsgroup.nospam> wrote in message
news:unQbftsj...@TK2MSFTNGP04.phx.gbl...

Gert Leunen

unread,
Jan 7, 2010, 7:48:26 AM1/7/10
to
@Jialiang: I check both calls to WSAJoinLeaf for errors and no errors are
reported.

@Paval: To ensure that a certain interface is selected for the ougoing
multicast traffic the sockets indeed have to be bound to the right
interfaces. Which is the case and again no errors are reported.

kind regards,
Mario

"Gert Leunen" <Gert....@newsgroup.nospam> wrote in message
news:unQbftsj...@TK2MSFTNGP04.phx.gbl...

Jialiang Ge [MSFT]

unread,
Jan 13, 2010, 11:07:37 PM1/13/10
to
Hello Mario

I have involved some technical experts on this field into this case. The
person wonder which QoS API you are using and how you are configuring these
sockets?

Jialiang Ge [MSFT]

unread,
Jan 27, 2010, 11:00:43 PM1/27/10
to
Hello Mario

Have you ever tried this without calling WSAJoinLeaf? Basically, are you
intending to receive multicast messages with your code?

lb

unread,
Feb 9, 2010, 6:33:01 PM2/9/10
to

I'm also facing problems with WSAJoinLeaf and QOS2 API.

flowid = 0;
// Socket is bound
WSAJoinLeaf(sock, sockaddr, socklen, NULL, NULL, NULL, NULL,
JL_RECEIVER_ONLY);
if (QOSAddSocketToFlow(handle, sock, sockaddr, QOSTrafficTypeControl,
&flowid) != TRUE) {
printf("Failed to add sock to flow: %d\n", GetLastError());
}
//Call QOSSetFLow

QOSAddSocketToFlow returns an error 87 but if I call just before WSAJoinLeaf
then I get return value of success and able to modify DSCP value.

Could someone tell me what am I doing wrong? Is there any document that
explains all these conditions?
Thanks in advance.
lb

""Jialiang Ge [MSFT]"" wrote:

> .
>

0 new messages