This application claims the benefit, under 35 U.S.C. §365 of International Application PCT/CN2010/000362, filed Mar. 24, 2010, which was published in accordance with PCT Article 21(2) on Sep. 29, 2011 in English.
The present invention relates to method and apparatus for monitoring quality of service (QoS) of network.
In a TCP/IP communication network, a session between two applications on different hosts needs to be established for a communication therebetween, which is usually composed of source IP address and port as well as destination IP address and port. When a host is created for a specific session (a host is a kind of application programming interface through which the application can access TCP/IP protocol stack to implement inter-application communication), packets in the session can be received or sent through it.
For a TCP/IP network QoS monitor at an application level, it is a general idea to bind the socket of a sniffing application of the monitor to the same destination IP address and port as those of an application to be monitored.
SO_REUSEADDR is one of the generic socket options, which allows completely duplicate bindings: if a pair of IP address and port has already been bound to one socket, then the same pair can be bound to another socket if the transport protocol support this feature. Normally this feature is supported only for UDP (User Datagram Protocol) sockets.
This feature is used in multicasting to allow one or more applications to run multiple times on the same host simultaneously. When a UDP datagram which is destined for either a broadcast IP address or a multicast IP address arrives, every bound socket of the multiple applications is able to receive a copy of the datagram. However, a datagram which is destined for a unicast address can be delivered to only one socket. If there are multiple sockets that match a unicast datagram, the result of which socket will receive the datagram is implementation-dependent. That is to say, among the bound sockets in unicast sessions, only one indefinite socket can receive the unicast packets. This is called the unicast duplicate binding problem (UDBP).
According to one aspect of the invention, a communication method of two socket-bound applications in conformity with TCP/IP protocol is provided, wherein the sockets of the two applications are bound to the same IP address and port. The method comprising, at the level of either application, the steps of: upon the detection of a unicast packet received in its socket, replacing the destination IP address of the unicast packet with the local host address (127.0.0.1) and forwarding the unicast packet.
According to another aspect of the invention, a Quality of Service monitor for a media player is provided. The socket of the Quality of Service monitor is bound to that of the media player for capturing media plackets sent to the media player. The monitor comprises: means for detecting whether a captured media packet is a unicast one; and means for replacing the destination IP address of the captured unicast media packet with the local host address (127.0.0.1) and forwarding the packet.
These and other aspects, features and advantages of the present invention will become apparent from the following description in connection with the accompanying drawings in which:
In the following description, various aspects of an embodiment of the present invention will be described. For the purpose of explanation, specific configurations and details are set forth in order to provide a thorough understanding. However, it will also be apparent to one skilled in the art that the present invention may be practiced without the specific details present herein.
To improve the accuracy of QoE (Quality of Experience) assessment of media applications or services, the QoS (Quality of Service) of a communication network needs to be monitored or measured. There are some known network QoS measurement methods, all of which need to sniff the interested packets. Then the captured packets can be traced and analyzed to get real-time QoS metrics, such as PLR (Packet Loss Rate), PLF (Packet Burst Loss Frequency), etc.
Media packets can be captured at different layers in TCP/IP protocol stack. For example, raw packets can be captured at the data-link layer by BPF (BSD (Berkeley Software Distribution) Packet Filter). However, according to an architectural principle known as Application Level Framing (ALF) which is based on a concept that applications understand their own needs better, it is preferable to sniff media packets at the application level.
When capturing packets at the application level for the purpose of QoS monitoring, a QoS monitor needs to be bound to the same IP address and port as those of a media player. In this case, it is important that the bound QoS monitor should not interfere with the operation of the media player.
However, due to the above described UDBP, the media player can play a multicast session normally when the QoS monitor is sniffing, while it is not the case for a unicast session. This is shown respectively in
In view of the above problem, a solution is provided to make the QoS monitor, upon the receipt of a unicast packet, forward the packet to the socket of the media player.
Next, a process of a QoS monitor for sniffing a media player at the application level according to an embodiment of the invention will be described in detail.
In order to monitor media packets of a media player, a QoS monitor needs to bind its socket to the same destination IP address and port as the media player.
As shown in
Next, the QoS monitor sets receiver buffer size at the step S403 and enables reuse of session IP and port at the step S405 by setsocketopt( ) call with arguments SO_RCVBUF and SO_REUSEADDR respectively.
Then at the step S407, the QoS monitor binds its socket to the same destination IP address and port as the media player by bind( ) call.
In current multimedia communication, normally audio and video packets are transmitted in different sessions with different ports. Therefore, the QoS monitor will receives audio and video packets respectively by its different master sockets, and forward (if needed) the audio and video packets to respective slave sockets of the media player. This process is shown in
As shown in
Then the QoS monitor determines at the step S603 whether a unicast packet arrives by monitoring this socket using select( ) call. If the result is “Yes”, the QoS monitor will determine at the step S605 whether a video packet is received via the type of socket through which this packet arrived. It can be appreciated by a person skilled in the art that if the result is “No”, which means a multicast or broadcast packet is received, the normal process instead of the method of the embodiment of the invention will be applied.
If the result of the step S605 is “Yes”, at the step S607 the monitor will replace the destination IP address of the unicast video packet with the local host address (127.0.0.1) and forward the packet to the video socket of the media player. If the result of the step S605 is “No”, which means that an audio packet is received, at the step S609 the QoS monitor will replace the destination IP address of the unicast audio packet with the local host address (127.0.0.1) and forward the packet to the audio socket of the media player.
Since the QoS monitor in the embodiment is used to evaluate the video QoS of the media player, for the captured video packets, the QoS monitor will analyze the packet to update the statistics data of QoS metrics. Specifically at the step S611 the monitor records RTP header and arrival timestamp into log file and at the step S613 it uses sequence number in RTP header to determine the loss of packet and accumulate statistical data, for example, into statData which is a data structure for accumulating statistical data, including PLR, PLL, PLF and PDR.
In this embodiment, the QoS monitor directly forwards the received unicast audio packets to audio slave socket. However, it can be appreciated by a person skilled in the art that audio packets can also be analyzed if needed.
As shown in
The principle of the invention was described with reference to a QoS monitor of a media player. However, it can be appreciated by a person skilled in the art that the invention can be applied to all two bound applications for purpose of overcoming the unicast duplicate binding problem as described above.
It is to be understood that numerous modifications may be made to the illustrative embodiments and that other arrangements may be devised without departing from the spirit and scope of the present invention as defined by the appended claims.
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/CN2010/000362 | 3/24/2010 | WO | 00 | 9/13/2012 |
Publishing Document | Publishing Date | Country | Kind |
---|---|---|---|
WO2011/116494 | 9/29/2011 | WO | A |
Number | Name | Date | Kind |
---|---|---|---|
7058727 | Dingsor et al. | Jun 2006 | B2 |
7263555 | Banerjee et al. | Aug 2007 | B2 |
20020083199 | Dingsor et al. | Jun 2002 | A1 |
20020141352 | Fangman et al. | Oct 2002 | A1 |
20040128665 | Gouleau et al. | Jul 2004 | A1 |
20050002395 | Kondo | Jan 2005 | A1 |
20050128963 | Gazda et al. | Jun 2005 | A1 |
20050238022 | Panigrahy | Oct 2005 | A1 |
20070183418 | Riddoch et al. | Aug 2007 | A1 |
20080028071 | Miyajima | Jan 2008 | A1 |
20090135835 | Gallatin et al. | May 2009 | A1 |
20090271512 | Jorgensen | Oct 2009 | A1 |
20110175976 | Cho | Jul 2011 | A1 |
Number | Date | Country |
---|---|---|
101051961 | Oct 2007 | CN |
101217464 | Jul 2008 | CN |
101499965 | Aug 2009 | CN |
1858199 | Nov 2007 | EP |
2001209503 | Aug 2001 | JP |
2004535704 | Nov 2004 | JP |
2009171357 | Jul 2009 | JP |
9900938 | Jan 1999 | WO |
Entry |
---|
Search Rept: Dec. 30, 2010. |
Number | Date | Country | |
---|---|---|---|
20130021937 A1 | Jan 2013 | US |